-
Notifications
You must be signed in to change notification settings - Fork 38
Vision
The main processing pipeline segments the highest-resolution color images from the camera, forms connected regions, and recognizes objects from the statistics of the colored regions. The color segmentation routine classifies individual pixels in the image based upon their YUV values. Based upon a number of training images, a Gaussian mixture model is used to segment the YCbCr color cube into the following colors:
- Orange (Ball)
- Yellow (Goal)
- Cyan (Goal)
- Green (Field)
- White (Lines)
Once pixels in the image are classified according to their colors, they are segmented into either connected components or edge regions. After the image is segmented, the regions are classified into relevant objects by comparing various image statistics of the regions. These statistics include the bounding box of the region, the centroid location, and the chord lengths in the region. In this manner, the location of the ball and goal posts are detected.
Object Detection Visualizer
Field line recognition decreases the need for robots to actively search for landmarks, enabling them to chase the ball more effectively. The first step in line identification is to find white pixels that neighbor pixels of field green color. Once these pixels are located, a Hough transform is used to search for relevant line directions.
In the Hough transform, each possible line pixel (x, y) in the image is transformed into a discrete set of points (θi , ri ) which satisfy:
x * cos(θi ) + y * sin(θi ) = ri
Hough transformation for field line detection in images.
The pairs (θi , ri ) are accumulated in a matrix structure where lines appear as large values as shown. To speed the search for relevant lines, our implementation only considers possible line directions that are either parallel or perpendicular to the maximal value of the accumulator array. Once these lines are located, they are identified as either interior or exterior field lines based upon their position, then used to aid in localization.