Page 274 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 274

Chapter  9: Airbor ne V ideo  Systems       253

























                             Figure 9.32  Elev-8 negative.




                             could replace Adobe Photoshop, I will say that RoboRealm seems to contain many of the
                             same camera adjustments that are found in the more expensive Photoshop application as
                             well as a few that are missing in the much more expensive program.


                             Canny Edge Detection
                             Edge detection is important because it facilitates shape detection and object separation.
                             I selected the Canny edge detector as a representative image-processing algorithm that
                             RoboRealm efficiently executes. This algorithm is named after John Canny who first
                             published it in 1986. He wanted to create what he termed an optimal edge detector, one that
                             would perform better than the many in existence at that time. His algorithm is a multistep
                             one that I summarize below:

                                1.  Noise reduction—This first step deliberately introduces a slight amount of blurring in
                                    the raw image through a Gaussian distribution that is convolved with the original
                                    image. The purpose is to eliminate or drastically reduce the effects of single noisy
                                    pixels.
                                2.  Determination of intensity gradients—This next step determines the direction through
                                    which the edge or intensity gradient travels.
                                3.  Non-maximum suppression—This step is essentially an edge-thinning technique. It
                                    uses an iterative approach that applies a 3  × 3 pixel filter to the edge that was
                                    determined in the previous step, which further refines that edge.
                                4.  Edge tracing and hysteresis thresholding—This final step follows the intensity gradient,
                                    or edge, by ensuring that it is continuous or really the end of the edge. Once finished,
                                    every image pixel is marked as being either an edge or a non-edge.

                                The next two figures are from Wikipedia showing how the Canny edge detection works.
                             Figure 9.33 is the original, unprocessed image of valves that are part of a steam engine. This
                             figure contains many distinct edges and is a real test of the Canny algorithm.
   269   270   271   272   273   274   275   276   277   278   279