Page 278 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 278
Chapter 9: Airbor ne V ideo Systems 257
Figure 9.39 Test image of bicycle after outline edge detection.
Now you should be able to see the fence in the foreground, the trees in the background,
and the bicycle frame. I was fairly sure that the bicycle wheels would not be detectable
because of the poor contrast and limited pixel resolution. It is important to recognize that
the frame shape is out of context with its surroundings, thus making it easier to detect. By
out of context, I am referring to the vertical trees and fence sticks as well as the horizontal
fence parts. The frame is conspicuous because it has edges that are neither vertical nor
horizontal and are contiguous, or close together. This edge characteristic makes the object
identification a bit easier and is one of the cornerstones that experts in airborne video
surveillance constantly use.
I also decided to apply the Canny edge detection to the test image of the bicycle. Figure
9.40 is the result. Believe it or not, although the bicycle frame is in the image, it is just about
invisible because of the default Canny parameters that were initially used. After some
parameter adjustments, I was able to obtain the results shown in Figure 9.41.
Yes, the only edges showing in the figure belong to the bicycle frame! It really is quite
amazing what can be accomplished when you use clever image-processing techniques.
Admittedly, I had to play around with the parameters until I achieved this remarkable result.
The Gaussian Theta setting had to be changed from 1.0 to 1.5. This setting occurs in step 1 in
the Canny algorithm that deals with pre-blurring. The other change I made was to raise the
High Threshold from 30 to 83. The threshold settings occur in step 3 in the algorithm.
Higher Resolution Test Image
I decided to repeat the test-image experiment with a DSLR image instead of one from the
economy camera. My goal was to determine what effects image quality would have on edge
recognition. Unsurprisingly, it turned out that image quality has a significant effect on edge
detection. Figure 9.42 is another picture of the bike, this time taken with a Canon 40D
equipped with a 70- to 200-mm telephoto lens.