-
Book Overview & Buying
-
Table Of Contents
Learn Robotics Programming - Third Edition
By :
Let's build a system to detect objects in a certain color range, and then we'll add a behavior to follow them.
The component architecture is the same as the face tracker; however, the internals of the detector are different, and the follower drives the main motors instead of the servo motors.
Test this on a floor, as this behavior can drive a robot off a desk.
Let's start with the colored object detector.
We are using colored pins from a kids' bowling set. They come in nice, bright primary colors. I will use green as an example. We will start with just a picture. However, a set of transformations to the data is needed to turn the picture into information the robot can use to make decisions.
A pipeline is a good way to design a set of transformations. Let's look at the color tracking as an image-processing pipeline in the following diagram:

Figure 14.15 – Color-tracking pipeline
The...