LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert an 8-bit grayscale image into an RGB image

To convert an RGB image into an 8-bit grayscale, using Vision Assistant, you would need to convert from the RGB color space to the HSL color space, and extract the luminance layer.

Is it possible, within Vision Assistant, to convert an 8-bit grayscale image into an RGB image by applying the gray level pixel value to the three color components: red, green, and blue?
Mensaje editado por ispbarum
0 Kudos
Message 1 of 14
(13,576 Views)

Hi ispbarum,

to convert an 8 bit grayscale image to RGB you only need to write the value to all three components. If all values R,G and B are equal, then you get gray as color.

 

Hope it helps.

Mike

0 Kudos
Message 2 of 14
(13,543 Views)

In the Vison Utilities>>Image Management pallete there is a IMAQ Cast Image function.  You should be able to use this to convert from U8 to RGB U32.

 

It's weird that you can only change to other grayscales in the Vision Assistant.

Randall Pursley
0 Kudos
Message 3 of 14
(13,533 Views)

Hi,

 

is it possible to do that without the vision module?

I work with a USB camera and the resulting array. I want tocreate a RBG image which will be the overlay of the three images.

Thanks for your help.

Sébastien

0 Kudos
Message 4 of 14
(11,735 Views)

CIML wrote:

is it possible to do that without the vision module?

I work with a USB camera and the resulting array. I want tocreate a RBG image which will be the overlay of the three images.


You already attached some code. Does it work?

0 Kudos
Message 5 of 14
(11,728 Views)

Yesn, I've attached the file in the 2012 version.

Maybe I can try with the v.8

Download All
0 Kudos
Message 6 of 14
(11,726 Views)

I was just wondering if you are asking a question or providing a solution. Your post read as a question so I wasn't sure.

 

You can eliminate the subVI and FOR loops as follows (don't kow if it is faster or slower ;)):

 

 

0 Kudos
Message 7 of 14
(11,721 Views)

Thanks, yes, it's a question!

With your solution, the resulting image doesn't display the overlay of the 3 images.

 

Thanks

0 Kudos
Message 8 of 14
(11,716 Views)

All you need is "draw unflattened pixmap" and send it to an 2D image indicator. This is part of plain LabVIEW, no vision module needed.

 

An intensity graph is not suitable to display an RGB image.

 

0 Kudos
Message 9 of 14
(11,703 Views)

I am working on image dehazing using labVIEW .I somehow manage to do the dehazing in grayscale ,now how do I convert the dehazed image to view in rgb I have used extract color plane on the original image then tried to replace it with replace color plane with grayscale image as source still it is not converting please help , I am new in this field.

 

0 Kudos
Message 10 of 14
(3,310 Views)