LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring Bayer encoded images

I was using a LV driver to acquire images from a 12-bit monochrome camera, and the driver returns the images in the form of a 2D array of integers. Now I need to acquire images from a color version of the same camera, which employs a Bayer Mosaic sensor. I used the same LV driver, but performed Bayer Color Decode. However, the color images did not turn out right. Can anyone tell me what I did not do right?

I am using LV 7.1 with IMAQ Vision 7.

Thanks.
0 Kudos
Message 1 of 2
(3,035 Views)
Kian,

What LabVIEW driver are you using? Is it NI-IMAQ or a 3rd party driver? If it is NI-IMAQ, which version of NI-IMAQ are you using and which IMAQ board?

I found an example program for LabVIEW 7.0 & Vision 7.0 and later which shows how to do Bayer decoding for images over 8 bits. I hope this helps:

This example demonstrates how to decode and display Bayer-coded images that are saved with signed values and have higher than 8-bit resolutions (10-, 12-, 14-, and 16- bit resolutions).

This VI opens light.tif, which is saved as a 16-bit file, and converts the image into a 2D array. The 16-bit image is converted from a signed to an unsigned format by adding 32,768 to each value. The active bits must also be shifted appropriately before decoding.

Use the path control in the VI to select light.tif, and then run the VI.
Message 2 of 2
(3,025 Views)