04-21-2010 05:14 AM
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.
04-21-2010 10:37 AM
Please see the discussions at
http://digital.ni.com/public.nsf/allkb/8AAAE9435D30CEB886256F80007A39AD
I hope this helps.
04-22-2010 02:41 AM
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.
04-22-2010 07:30 AM
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:
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:
Best regards,
Sebastian