Image Processing Reference
In-Depth Information
have a pixel with the following RGB values ( 255 , 250 , 250 ) . This will be interpreted
as very close to white and hence containing no color. But it might be that the real
values are ( 10000 , 250 , 250 ) . You have no way of knowing, since the red value is
saturated in the image acquisition process. So the red pixel is incorrectly classified
as (close to) white. In general you should try to avoid saturated pixels in the image
acquisition process, but when you do encounter them, please take great care before
using the color of such a pixel. In fact, you are virtually always better off ignoring
such pixels.
4.4.2 Thresholding in Video
When you need to threshold a single image you can simply try all possible thresh-
old values and see which one provides the best result. When you built a system that
operates on live input video the situation is different. Imagine you have constructed
a setup with a camera and some lighting etc. You connect a monitor and look at the
images being captured by the camera. If nothing is happening in the images (static
scene) the images will seem to be exactly the same. But they are not. For example, if
the camera is mounted on a table which moves slightly whenever someone is walk-
ing nearby, the images will change slightly. Another typical situation is the fact that
most indoor lighting is powered by an alternating light source, for example 50 Hz,
meaning that the level of illumination changes rapidly over time. Such changes can
often not be detected by simply looking at the scene. But if you subtract two con-
secutive images 2 and display the result, you can experience this phenomena. If the
images are in fact exactly the same, then the output image (after image subtraction)
should only contain zeros, hence be black. The more non-zero pixels you have in
the output image the more “noise” is present in your setup. Another way of illustrat-
ing such small changes is to calculate and visualize the histogram for each image.
No matter what, it is always a good idea to use one of these methods to judge the
uncertainties in your image acquisition/setup.
Due to these uncertainties you always need to learn the threshold values when
processing video. In this context, learning means to evaluate what the right thresh-
old value is in different situations and then select a representative value, see Ap-
pendix C. Approaching the threshold value selection like this will help in many
situation. But if you have a scenario where the lighting can change significantly,
then you need a different approach.
A significant change is especially observed when sunlight enters the scene, ei-
ther because the system operates outside or due to windows in the room where
the setup is located. When a cloud passes in front of the sun an abrupt change
can be seen in the images. Even without clouds, the changing position (and in-
tensity) of the sun during the day can also result in large changes accumulating
over time. Further abrupt changes appear due to the auto gain being enabled, see
2 How to subtract images is explained in Sect. 4.6 . This technique plays a major role in Chap. 8.
Search WWH ::

Custom Search