08-05-2022 03:39 PM
Hi!
I'm using a Basler acA1920-155uc USB color camera with LabVIEW. I'm able to acquire and display grayscale images with "IMAQdx Grab2.vi" and "IMAQdx Get Image Data.vi", but now I want to display a color image using "IMAQ Bayer to RGB.vi" .
Here's an example; I initialize two IMAQ images outside of the while loop, and the "IMAQdx Grab2.vi" and "IMAQdx Get Image Data.vi" are inside of the while loop. The camera outputs 1920x1200 pixels in the U8 format.
If I comment out the "IMAQ Bayer to RGB.vi" part, everything runs ok. However, when this part of the code is included, I get an error: "Error -1074396080 occurred at IMAQ BayerToRGB - Invalid image type. "
Do you have a suggestion for how to fix this error?
One additional question: after I'm able to display the image in color, how can I get access to the three RGB arrays to do additional processing and saving?
Thanks in advance!
08-07-2022 03:54 AM
Basler acA1920-155uc is in general color camera. May be the camera is not in U8 mode, but already in color? Then this error is expected.
You can check the type of the image on the input of IMAQ BayerToRGB with IMAQ GetImageInfo SubVI expected on the input is U8, U16 or I16 only.
And you can extract single RGB channels with IMAQ ExtractColorPlanes or IMAQ ExtractSingleColorPlane functions.