LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert "Grayscale I16" to "RGB U64"

Solved!
Go to solution

Hello, 

I need to convert an image from Grayscale I16 to RGB U64, but it doesn't work (I have joined a zip file).

I think there is a bug in the NI Vision, or it's not implemented because I have no problem to do it from Grayscale U8 to RBG32. 

Can you help me to find a solution to do that? 

I need to use ReplaceColorPlane function or equivalent because I have to perform various treatments on each layer (RGB).

Thanks

 

0 Kudos
Message 1 of 4
(4,352 Views)

Nobody has an idea?

Please help me :mansad:

0 Kudos
Message 2 of 4
(4,325 Views)

Hi

 

If you put a probe to the outgoing image you can verify the pixels are there. Also if you probe the frontpanel image you can see that the RGB values are correct.

 

But like already with I16 images you have find a compromise because standard graphic adapters can only display  24 Bit colors.
Where would you display a grey (because all planes are like) U64 image?

 

But that is still better than the (I feel) ridiculus SIGNED format for I16. I used to work with only the upper 15 bits. But still you have to find some compression to come back to 8 for display.

 

Gabi

7.1 -- 2013
CLA
0 Kudos
Message 3 of 4
(4,314 Views)
Solution
Accepted by topic author badgones73

Hi Badgones73,

 

The U64 image is composed of four U16 values (R, G, B and alpha). LabVIEW represents 16-bit images as an I16. When the IMAQ Extract Color Planes is called, the U16 value must be converted into I16 values. This is done by converting all values with a MSB of 1 to a value of 0. This means all the values from 32,768 to 65,535 are now 0. To avoid using losing these values, you must read the image into LabVIEW without using the vision functions.

 

Once you have extracted the U16 values, they can be converted from U16 images to I16 images. Once this is done, you will be able to use all of the Vision functions.

 

Also, i invite you to read the information on our website:

How Do I Convert a Color Image to Grayscale?

http://digital.ni.com/public.nsf/allkb/ED42C55C29B9B34C862570A60079952E?OpenDocument

 

Regards,

0 Kudos
Message 4 of 4
(4,241 Views)