<<Prev 1 2 3 4 5 6 7 8 Next>>
Image Thresholding
In order to create a binary image we use the Threshold module
and set the threshold to a point at 190. Note that as the setting is manual your lighting for your
parts should remain somewhat constant. Large changes in lighting will cause this segmentation to fail
and parts of the background may be mistaken for foreground objects.
This is just one way of segmenting objects from the background. There are others such as the
Automatic Threshold module or the Flood Fill module. These
modules allow for the overall lighting to change in the image while still creating a reasonable
thresholded image.
Note the difference in the image? The contrast is now 100% and the edges of the parts appear more jagged
due to the thresholding, but this is what we want. The parts are all one color and ready for the shape matching
module.
Before we add the Shape Matching module we need to create a database of files that contain the shapes we want to match.
This is done by taking the above image and cutting the image using your favorite paint program and saving the individual
shapes into each of their own files (.gif, png, ppm, etc.) within a single folder. This folder then contains 8 images one for each part.
Below are the individual images used for training.
Note that the actual image sizes can be different and that only one object is shown in each image. Be sure to name the
files with meaningful names as that will be the label used to identify the part.
Now onto shape matching ...
<<Prev 1 2 3 4 5 6 7 8 Next>>
|