Page 185 - The Definitive Guide to Building Java Robots
P. 185

Preston_5564C06.fm  Page 166  Friday, September 23, 2005  5:13 AM



                 166    CHAPTER 6  ■  VISION



                            • Sharpening: Sharpening/focusing an image
                            • Edge finding: finding edges
                            • Hough transform: Line finding

                            We’ll also use combinations of these filters to optimize and help us identify a beverage
                        from the refrigerator. For that, we’ll process three different-colored soda cans. They’re also
                        coincidentally colored red (Coke), green (7-Up), and blue (Pepsi). Or RGB for short.

                        What Is RGB?
                        RGB stands for red, green, and blue. The colors utilize an additive model. In this model, the
                        three colors are added together to form other colors (see Figure 6-1).
































                        Figure 6-1. The RGB spectrum

                            For example, moving from the top left clockwise we have the following values:

                            Red = 255, 0, 0
                            Magenta = 255, 0, 255

                            Blue = 0, 0, 255
                            Cyan = 0, 255, 255
                            Green = 0, 255, 0

                            Yellow = 255, 255, 0
   180   181   182   183   184   185   186   187   188   189   190