Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access imaqdx's Bayer Filter algorithm?

Solved!
Go to solution

I have a Bumblebee2 Stereo Camera from PointGrey Research Inc. This camera must be used in Format_7 Mode 3 to obtain both stereo images at the same time. The resulting image has 640x480 16-bit values, where the first 8 bits comes from one image and the last 8 bits from the other. The camera is connected to a CVS unit via Firewire, limiting me to IMAQdx VIs

 

If I use the IMAQdx Get Image VI, it outputs an RGB image from Bayer demosaicing, but due to the demosaicing the additional bits of the 16-bit image have been lost.

 

If I use the IMAQdx Get Image Data VI (to get the raw data) it outputs the 16-bit values which I can easily split to 2 640x480 8-bit arrays. However, there doesn't seem to be an equivalent to the IMAQ Bayer Color Decode VI in IMAQdx. Obviously, Bayer demosaicing IS available, since IMAQdx Get Image makes use of it, but it doesn't seem that I'm able to access it for the usage I envision (input the 'grayscale' image and the Bayer pattern and output the RGB image). Any help?

0 Kudos
Message 1 of 16
(7,704 Views)

Hey,

 

Have you looked at 'IMAQ  Bayer Color Decode.vi'?  It allows you to pass it a grayscale image (encoded with bayer data) and specify the bayer pattern desired and it returns an RGB image derived from the decoded bayer information. It's not a function of IMAQdx, but it should do the trick

 

Good Luck,

Evan D.
Installer R&D
National Instruments
0 Kudos
Message 2 of 16
(7,691 Views)
Hi BullDozier, thanks for your reply. Unfortunately, as mentioned in my OP, I'm deploying my VI on a CVS, and as such cannot use any IMAQ VIs, only IMAQdx. imaq.dll is not installed on my CVS, and there doesn't seem, based on my research on these forums and the kb articles, that it is possible, since the CVS is seen as a 'firewire-only' unit, hence not needing any IMAQ VIs.
0 Kudos
Message 3 of 16
(7,683 Views)
Solution
Accepted by topic author Lost And Found

Hey,


I've written a couple of VI's that behave like the IMAQ Bayer Decode and IMAQ Create Bayer LUT, but don't require IMAQ.  Try these out and let me know if that works for you.  It should do the trick

 

 

Take Care,

Evan D.
Installer R&D
National Instruments
Download All
0 Kudos
Message 4 of 16
(7,651 Views)

Thanks BullDozier! Its close to midnight Friday here, so I'll check this out on Monday and come back to this thread.

0 Kudos
Message 5 of 16
(7,651 Views)
Thanks, this works just fine. Marking solved.
0 Kudos
Message 6 of 16
(7,626 Views)

Is there a reason you password protected these VI's?  I would have liked to check out the internals.  Thanks for posting them, and I would like to see them included in the default distribution of IMAQdx if possible.

 

Also, you don't mention the LabVIEW version these are made with, although I was able to open them in LabVIEW 8.2, for what it is worth.

 

Thanks,

Chris Davis

0 Kudos
Message 7 of 16
(7,608 Views)
I agree with CSD concerning the distribution of these VIs with IMAQdx. I'm sure I'm not the only one who will be wanting to the CVS with a colour camera and have access to the raw data.
0 Kudos
Message 8 of 16
(7,605 Views)

Lost and Found,

 

I am trying to do the same as you, however when I use the IMAQdx Get Image Data it is outputting an 8 bit array not a 16 bit array. Would you be able to explain your solution a little better or perhaps post an example? Thank you very much!

 

Brandon

0 Kudos
Message 9 of 16
(7,176 Views)
Hi BrandonGT. In the end I used IMAQdx Get Image Data and decimated the 1D Array that it produced, converting those into images using IMAQ ArrayToImage (you'll need to resize the 1D array to 640x480), then used the VI uploaded here to convert to colour.
Message 10 of 16
(7,147 Views)