Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read 12 bit data out of a colour ccd cam

 At the moment i try to read the 12bit data out of my camera. One of my problems with it is that I need the data of every single colour (RGB). At the moment I try to get these data with the "Get Image Data.vi" after I shift the bytes and reshape it into an 2D array I get an intensity image with values between 0 and 4095 as from a 12 bit picture expected. The Problem at this pint is, that this picture seems to include the whole three colours (interpolated) and I don't know how to extract the three colours out of it or extract the data I get with the "Get image data.vi" to get these.

 

I have attached a snipped of a chort example and a picture where you can find the bit allocation that is delivered by the cam.

 

Thank you for your help.

 

 

 

Download All
0 Kudos
Message 1 of 4
(3,580 Views)

Please see the discussions at

 

http://digital.ni.com/public.nsf/allkb/8AAAE9435D30CEB886256F80007A39AD

 

I hope this helps.

Robert Eastlund
Graftek Imaging, Inc.
Phone: (512) 416-1099 x101
Email: eastlund@graftek.com
0 Kudos
Message 2 of 4
(3,560 Views)

Thanks, that really can help me with decoding but at first I need to know if the picture that I get by my solution really gives me this raw picture where every pixel can only see one colour, I'm just suprised that it looks so well, I had expected that I would see something like a "chess board" style image.

Beside this I don't know if there isn't a easier way to get these three 12 bit colour planes.The LabVIEW VIs work fine for 8 bit but many people work with a higher bit depth so I think that there should be a really easy way -that I unfortunately can't see at the moment.

 

0 Kudos
Message 3 of 4
(3,544 Views)

 

Hello Steimers,

your code will in fact merge all color information into one plane - the "checkerboard" look of the sample image in the linked KB is only a result of the blue sky enabling only the "blue" pixels. Therefore, I would not try to re-invent the wheel for this kind of application - a brief search in LabVIEW's Example Finder should bring your attention to the examples for Bayer decoding:

get_bayer_1.gif

After verifying that the image colors are okay (I think you should chose the RGRG::GBGB Bayer pattern), you can then use the  "IMAQ ExtractColorPlanes.vi" to separate the color layers:

get_bayer_2.gif

Best regards,
Sebastian

0 Kudos
Message 4 of 4
(3,529 Views)