available modules. When a module is selected, it is inserted
in the programming window at the bottom of the figure.
In general, each time an image is acquired from the active
camera, all of the selected modules are applied in
consecutive order to that image. Start by clicking the
Options button and selecting the camera you are using
from a drop-down menu. After a camera has been
designated, the Camera button can then be used to turn it
on and off.
In order to demonstrate how easily vision can be
implemented, let’s create a simple program that can track a
red object in the camera’s operational view. Expand the
Colors option in the left column and select Color_Filter.
When you do, you will get the window shown in Figure 2.
You can add basic colors to be detected, as well as choose
specific colors from the current image. After you have
selected colors (or a variety of shades of the
same color) you wish to track, adjust the
parameters in the lower right corner of the
window so that only the object you wish to track
can be seen in the video window of Figure 1.
After your adjustments allow the desired
object to be seen as you move it within the
camera’s view, you are ready to add another
module. Expand the Blobs option in the left
column and select Blob_Size to expose the
window shown in Figure 3. You can make
adjustments so that only groups of pixels (blobs)
of a specified size and intensity are displayed. At
this point, the video display should show only the
movement of the object you wish to track. If
necessary, you can fine-tune your options in each
of the modules.
Next, expand Analysis and select
Center_of_Gravity. You should see the window shown in
Figure 4. This module will essentially find the center of a
blob of pixels and insert statistics about that blob (such as
its x,y coordinates) into a number of predefined variables.
A box will be drawn around the blob and the coordinates
displayed. You can choose to have this information overlaid
on the source images as shown in Figure 5.
If everything is adjusted properly, the image will be
tagged with coordinates representing its position on the
screen when it comes in view. As you move the object, the
SERVO 07.2011 57