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

250     Bu il d  Y o ur  O w n  Q u a d c o p t e r































                             Figure 9.28  Live video filtered by a Canny edge algorithm.





                                Fourteen different edge filter selections appear when the + symbol is clicked on the
                             Edges content selection. Other content selections will have multiple selections associated
                             with them. At first glance, this would appear to be a bit overwhelming with so many different
                             selections; however, you will likely use only a few to achieve what you want. The RoboRealm
                             designers created a highly capable image-processing system that meets many different user
                             needs. Incidentally, the Canny Edge Detector will be explained in greater detail later in
                             this section.
                                An inherent problem with processing live video is that the original image is constantly
                             changing, which makes it difficult to assess what the effect of multiple filter operations on
                             an image will be. That is why I strongly recommend that you take a snapshot of the video
                             and apply the processing to that image. In that way, you not only retain the original image,
                             but you can also save separate images of all the processed images. To take a snapshot, simply
                             click on the Snap button located on the bottom menu bar, and enter a name for the snapshot
                             when prompted.
                                Figure 9.29 is a snapshot of my Elev-8 that I captured from a video taken with the RC310
                             camera. I will use this snapshot as the raw image to demonstrate a few of the image-
                             processing algorithms.

                             The Histogram
                             The first processing effect I will show is the histogram, which is probably the algorithm that
                             will be familiar to most readers. Many DSLRs have histogram displays to help photographers
                             determine if their photos are properly exposed. The display is a small graph of vertical lines
                             that show the distribution of all the red, green, and blue (RGB) pixel intensities contained
   266   267   268   269   270   271   272   273   274   275   276