LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ RGB Problem

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.

0 Kudos
Message 1 of 7
(3,068 Views)

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

 

 

Message 2 of 7
(3,023 Views)

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?

Message 3 of 7
(3,000 Views)
-Check if the property->Acquisition Attributes->Output Image type gives the RGB type or not.
-Do you get the same when used with LabVIEW inbuilt Grab example?
Thanks
uday
Message 4 of 7
(2,993 Views)

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.

0 Kudos
Message 5 of 7
(2,979 Views)

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 ...

IMAQdx ExperimentIMAQdx Experiment

I also attached the Attribute file produced above.

 

Bob Schor

0 Kudos
Message 6 of 7
(2,950 Views)
-Which camera are you using?
-IMAQ is different from IMAQdx(Ref which is suitable for you : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MEqSAM&l=en-IN)
-Many Color Camera do provide Monochrome image output(changed via attributes/MAX settings)
-As Bob suggested do check with simple webcam and see if it's giving Monochrome or Color image.
Thanks
uday
0 Kudos
Message 7 of 7
(2,937 Views)