06-04-2020 03:38 AM
I'm trying to convert a gray scale image to RGB image using the IMAQdx on labview. I tried to used the color utilities. Any help would be appreciated.
the code is attached
06-04-2020 08:33 AM
It is too bad that the LabVIEW Vision Functions are so minimally documented, with so few examples. Understanding Color is One of the Mysteries!
So you want to take a Grayscale Image, which has no color information, and "colorize" it. Let's assume you have a 16-bit Grayscale Image -- the pixel "values" can range from 0 to 65535. RGB Color uses a 32-bit pixel, devoting 24 bits to the "color space". This means that if you want a unique mapping from Gray to Color, there are 256 Color choices for every 16-bit pixel "Grayness". The various Color Palettes define a very tiny subset of these mappings.
But why bother? What is the advantage of "colorizing" a Grayscale image that has no color information? One answer is that with the right mapping, two pixels "near" each other in Grayscale representation (and hence largely indistiguishable by eye on a monitor, particularly one that doesn't have 16-bit "intensity depth") can appear very different if they are different colors (I was going to say "green doesn't look very different than red", but Red-Green color-blindness is quite common ...).
If you have an Image already, you can colorize it using a Property node:
The missing dotted line is the Error Line. The Image was generated with a background Pixel value consisting of a Gaussian with mean "Bias" and Standard Deviation "Noise", on which was super-imposed an Image (I thiink it was a series of lines) having amplitude "Intensity", so Intensity/Bias was "Signal-to-Noise". Coloring it made the (faint) Gray image much easier to see.
I was mentoring a BME undergraduate who has probably now finished her PhD, and haven't thought about these thorny problems for a few years ...
Bob Schor