LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use BCGTransform function to process 16-Bit Image?

Solved!
Go to solution

Hi~

 

I'm using LabWindowsCVI8.5 and NI Vision to do the Image processing. When I read the "IMAQ Vision for LabWindowsCVI Reference Manual", I found that the imaqBCGTransform function only supports 8-bit Image, while I have to do the BCG tranform on 16-bit image. Is there any solutions to use BCGTransform function to process 16-Bit Image? Or Is there any other functions which could do the Brightness, Contrast and Gamma correction on 16-bit Image?

 

Thanks a lot! 

0 Kudos
Message 1 of 3
(3,752 Views)
Solution
Accepted by topic author yuemuping

given that imaqBCGTransform is implemented as a lookup table, we can understand why it is limited to 8-bit images.

 

now let's have a look at the definition of each of this terms (from the NI Vision Concepts documentation):

- brightness: A constant added to the red, green, and blue components of a color pixel during the color decoding process; 

- contrast:  A constant multiplication factor applied to the luma and chroma components of a color pixel in the color decoding process.

- gamma correction: Expand the high gray-level information in an image while suppressing low gray-level information.  (the chapter on lookup tables gives some examples of gamma corrections)

 

now that you understand that this transform is a simple mathematical function, you only have to compute the correction for each pixel on your 16-bit image.

i don't know the exact formula used by the imaqBCGTransform function, but you should be able to approximate it by performing some test on 8 bit images with the original function... or you can roll your own formula... or find one on the net...or you can ask someone at NI to give you the formula...

Message 2 of 3
(3,732 Views)
Thanks a lot~ Could you please tell me that is there any example or samples for the lookup table? I still do not know how to create a lookup table and ues it in LabwindowsCVI. 
0 Kudos
Message 3 of 3
(3,486 Views)