07-25-2019 03:41 PM
Hello, I currently have a grayscale image coming in from IMAQ Grab Acquire despite me changing the image type to RGB (U32) (one of the IMAQ Create inputs). In NI MAX the camera displays a color image, but I cannot change the image from black and white to color in my LabView program. Please let me know if you know how to solve this.
07-25-2019 08:06 PM
If I understand you correctly, when you open MAX and Snap (or Grab) an Image, MAX shows you a color image. Is this correct? If you "Snap" and get a single Image, you can get MAX to tell you about the Image, and use that to determine how you create the Image Buffer.
Now if you were to attach your VI, we could look at it, maybe test it, and make more direct suggestions ...
Bob Schor
07-26-2019 02:37 AM
IIRC, the IMAQ indicators can be set to grayscale, binary or colored color palette. By default I think it should be automatically adapting, but perhaps you changed it. Are probes also b\w?
07-26-2019 03:26 AM
07-26-2019 08:31 AM
Hey Bob,
Thanks for your reply. I've attached my VI to this reply. Also, I found that the IMAQ Create SubVI has the grayscale image type selected by default. I tried manually wiring the RGB U32 directly in the block diagram, but no luck. Let me know if this helps.
07-26-2019 10:23 PM
When in doubt, play "Scientist" instead of "Engineer", i.e. "Do an Experiment, Test a Hypothesis". So my Laptop has a WebCam, so I put together this trivial program that opens an IMAQdx Session, creates an Image Buffer as Grayscale, does a Snap and displays the Image, and also saves the Camera Attributes to a file. I also ask what Image Type comes out of the Snap.
So I get an RGB Image, even though my Image was created as a Grayscale (U8) (the Image Type reported is also RGB (U32)). When I look at the text file of Attributes, they appear to be the same as reported by MAX, a small subset of the GenICam Attributes. I don't see anything that suggests that this particular camera can operate in both B&W and Color -- it seems to be only Color. [I have another Camera from FLIR that is supposed to be only B&W).
Documentation for LabVIEW Vision is a little sparse, so sometimes "experimenting" can be helpful. Sorry this particular Experiment didn't yield more useful results ...
I also attached the Attribute file produced above.
Bob Schor
07-27-2019 01:13 AM