06-14-2013 03:31 AM
According to the function reference help, imgBayerColorDecode can be called with a void* for source and destination pointer, so in principle it should be able to handle Bayer encoded images of 16 bits per pixel, right?
However, when I look at this older thread, it would appear that it is not possible, as only 32-bit RGB can be output. When I look at the "IMAQ Bayer Color Decode.vi" on our system, the dll call is that of:
"int32_t imgBayerColorDecode(int32_t dst, int32_t src, uint32_t rows, uint32_t cols, int32_t dstRowPixels, int32_t srcRowPixels, const uint32_t *redGain, const uint32_t *greenGain, const uint32_t *blueGain, uint8_t bayerPattern, int32_t bitDepth, uint32_t reserved);"
But the parameters can be changed apparently. So my guess is that imgBayerColorDecode can nowadays convert 16-bit Bayer encoded images into 48-bit or 64-bit (+alpha) RGB(A) images, but I cannot seem to find any reference of this in the "What's new with NI-IMAQ" page.
Can someone from NI please confirm that it can nowadays be done or is the older thread still valid?
Solved! Go to Solution.
06-14-2013 04:29 AM
As a follow-up, I had a look at the RGB LookUp Tables. It would seem the limitation is already apparent there: for e.g. 10 bits/px, the maximum value of the arrays returned is still 255, whereas I would have expected 1023 (at a gain value of 1).
If I were to gerenate the LUTs myself and pass them to imgBayerColorDecode, would it work then, or is there still a limitation?
06-14-2013 11:22 AM
Hi Oliver,
In the 2012 SP1 timeframe, new Bayer decoding support was added to Vision. The Bayer functions exported from the IMAQ DLL are deprecated as they don't have any of the new functionality. While the functions are now in Vision, I believe they do not need a Vision Development Module license (they are part of the basic API).
The new Bayer functions are significantly faster, have multiple algorithms with varing quality, and support conversion from >8bit to RGB64.
imaqBayerToRGB() is what you should look at in nivision.h.
Eric
06-17-2013 08:20 AM
Eric, thanks for the pointer (pun intended). In our lab we use the 2010 version, so for now we'll continue the old-fashioned way.