The indirect Time-of-Flight(iToF) camera can output the IR image as well as the depth image. Since the images of the depth image and the IR image are from the same sensor output, the two images are perfectly aligned in timing and pixel-by-pixel in space. The camera sensor converts the light intensity of a pixel into an equivalent digital value. The number value is proportional to the light intensity of the pixel and thus has a linear relationship. However, the human eye perceives an image as a logarithmic function of intensity rather than a linear one. If the image from the sensor is displayed directly on the display device, the scene will appear unnatural due to the difference between the sensor and the human eye perception. How are IR images adjusted to compensate for this? Let us learn about it.
Table of Contents
What is gain of IR image?
The gain can change the brightness of the image, is used to control the amplification of the camera sensor signal, including background noise. The relationships are as follows:
For example, the effect of different gain on the IR image is as follows:
What is gamma of IR image?
In camera, gamma refers to the operation of encoding a linear value recorded by a camera into a nonlinear relationship (or reversing the decoding process). Gamma encoding was developed to compensate for the brightness characteristics of Cathode Ray Tube (CRT) displays. The relationships are as follows:
What is gamma correction of IR image?
Gamma is a machine vision technique used to correct for discrepancies between digital image reading and human eye perceives, gamma primarily affects the mid-tones. Gamma correction is to apply the inverse gamma curve of the display to get the final output color before the display is displayed. We multiply each linear color of the output by this inverse gamma curve, it will balance all the colors, and the resulting color will become linear. When dealing with reflective surfaces, there may be spots of reflected light, and the scenario around this spot is not visible to the human eye, and the use of gamma correction can counteract this effect to certain degree. The implementation process is as follows:
For example, the effect of different correction on the image is as follows:
Software API of gain and gamma correction in SDK
Sample code:
BaseSDK/Windows/Samples/Base/NYX650/DeviceParamSetGet.
Gain API:
//Set the device gain on a device.
ScStatus scSetIRGMMGain(ScDeviceHandle device, uint8_t gmmgain);
//Returns the the device's gain.
ScStatus scGetIRGMMGain(ScDeviceHandle device, uint8_t* pGmmgain);
Gamma Correction API:
//Set the device IR GMM Correction on a device.
ScStatus scSetIRGMMCorrection(ScDeviceHandle device, const ScIRGMMCorrectionParams params);
//Return the device IR GMM Correction on a device.
ScStatus scGetIRGMMCorrection(ScDeviceHandle device, ScIRGMMCorrectionParams* pParams);