Optimizing your industrial camera set-up by using Gamma

How to use Gamma to your advantage

Gamma is used in machine vision cameras to correct between the digital image readout and the perception of the human eye. It is also used to correct over illuminated spots. In this article you will learn about Gamma correction.

What is ‘Gamma’?

A camera sensor will convert the light intensity of any pixel into equivalent digital value. The digital value is proportional to the light intensity of the pixel, therefore has a linear relationship. The human eye perceives these images as a logarithmic function of intensity rather than a linear function. If the images from the machine vision camera sensor are displayed on a device, it will appear unnatural due to the because of the discrepancies between the machine vision camera sensor and human eye perception. This is the reason why the image from the camera sensor can go through the gamma correction function to adjust the distribution of tones.


Comparison Gamma and Linear

In relation, you can observe the linear tones are focused on the brighter part of the image. Darker tones become indistinguishable whereas with the gamma correction, you can see you have darker tones.

Advantages of using Gamma

Gamma modifies digital images to suit how human eyes perceive them. The capacity to distinguish between dark tones in a darker image and a more realistic appearance of images are the key advantages of employing Gamma. Darker items in photos would become unrecognizable without gamma correction. Another advantage is the ability to correct over-illuminated regions in the image, which is very useful for computer vision applications. When working with reflective surfaces, it is possible to encounter patches where the light reflects in such a way that you are unable to see the area immediately around that spot. You can partially offset this impact with gamma correction.

Activating Gamma in the Galaxy Viewer

Open the Galaxy Viewer and connect the machine vision camera. Navigate to ‘Analog Control’ on the right side and set the value of the ‘GammaEnable’ to ‘true’. For a custom gamma value, you must switch the ‘Gamma Mode’ from ‘sRGB’ to ‘User’. You can then manually select a Gamma value.

Using the Gamma future in your vision application

Reduce the exposure duration until you can see what's behind the bright area to eliminate the over-illuminated spots on your image.. Afterwards, you can set a gamma value to increase the brightness of the image. You will see that the dark spots will get brighter, and the bright spots won’t get too bright again.

If you look at the 3 images below you can see that in the first image, you cannot read GeT Cameras properly. In the second image you can read GeT Cameras, but the left side is too dark. On the third image you can see what happens when we apply gamma. Now we can read GeT Cameras and the left side is evenly illuminated and bright enough.

Gamma = 1; Exposure Time 17ms, GeT Cameras not readable, colors on the left-hand side visible

Gamma = 1; Exposure Time 4ms, GeT Cameras readable but colors lefthand side not visible.

Gamma = 0.5; Exposure Time 4ms, GeT Cameras readable and colors on the lefthand side visible. 

Which industrial camera models support Gamma?

A list of industrial cameras that support gamma can be found in our download areaDo you need help selecting the the most suitable industrial camera for your application? Do not hesitate to reach out to us.