Page 239 - The Definitive Guide to Building Java Robots
P. 239
Preston_5564C06.fm Page 220 Friday, September 23, 2005 5:13 AM
220 CHAPTER 6 ■ VISION
In section 6.2, I introduced a new webcam viewer called DoubleWebCamViewer that
allows for real-time viewing of image processing. I also introduced a class called FilterParameters
that allows for generic combinations of filters to be added to the DoubleWebCamViewer class.
Finally, I introduced the ImageProcessor class for performing some basic image analysis.
In section 6.3, I showed you how to process images by color and introduced more methods
in the ImageProcessor class to process with color and get color statistics from the webcam
image. I then introduced a data structure called ColorGram that represents the ratios of colors
to one another in the form of a linear equation, which when used with its corresponding Color-
GramCalibration class can take a thumbnail image and optimize its ColorGram as something to
look for during processing.
Finally, in section 6.4, I used some methods of image processing from Java Advanced
Imaging to smooth, sharpen, and find edges, and perform the Hough transform for finding lines.
I’m now almost ready to have my robot get me a can of soda. I just need to teach it to move,
which is the topic of the next chapter.
97022d2480fe4a63cfdfa123a6e70098