5-4
|
ni.com
Chapter 5
Image Sensor
Gain
Gain is a multiplier applied to the analog signal prior to digitization. Increasing the gain
increases the amplitude of the signal. Gain allows you to trade off between making smaller
signals more visible at the cost of increased noise and no longer being able to differentiate
between larger signals. For most applications, the NI 17xx Smart Camera default gain setting
optimizes the balance between small signals and large signals.
Figure 5-4 shows what happens when gain is applied to a signal.
Figure 5-4.
Effect of Gain on the Video Signal
In Figure 5-4a, low gain has been applied to the signal. The pixel values in the image are grouped
close together. In Figure b, medium gain has been applied to the signal; there are now more
notable differences in pixel value within the image. In Figure c, high gain has been applied to
the signal; at high gain, mid-range and bright portions of the image are now both represented as
white, the highest pixel value. In Figure c, several bright areas of the image have been clipped
to the maximum pixel value, and you can no longer distinguish subtle shading in the brightest
areas of the image.
Gain can be useful when there is not enough available light and you need to increase the
brightness of your images. However, increasing gain multiplies both the signal and noise. When
possible, it is preferable to add additional lighting.
Hardware Binarization
The NI Smart Camera supports binarization and inverse binarization of acquired images.
Binarization and inverse binarization segment an image into two regions—a particle region and
a background region. Use binarization and inverse binarization to isolate objects of interest in an
image.
To separate objects under consideration from the background, select a pixel value range. This pixel
value range is known as the gray-level interval, or the threshold interval. When enabled,
binarization sets all image pixels that fall within the threshold interval to the image white value and
sets all other image pixels to black. Pixels inside the threshold interval are considered part of the
particle region. Pixels outside the threshold interval are considered part of the background region.
a
Low Gain
b
Medium Gain
c
High Gain
255
Pix
el V
a
l
u
e
255
Pix
el V
a
l
u
e
255
Pix
el V
a
l
u
e
a
.
b
.
c.