2017 FRC Control SystemVision Processing GRIPProcessing Images from the 2009 FRC Game

Processing Images from the 2009 FRC Game

In the FRC 2009 game, Lunacy, robots were required to put orbit balls into the trailers of opponents robots. To differentiate robots on each of the two alliances, a "flag" was attached to the center of the goal. The flag was a cylinder that was green on top and red on the bottom or red on top with green on the bottom. During the autonomous period, robots could look for opponent robots and shoot balls into their trailer using the vision targets.

Using the Find Contours operation to find targets

In this example the image, in this case a file, you can see the green and red halves of the vision target. The strategy is to:

  1. Look for objects that are either green or red using two different HSL Threshold operations, one for each color. Setting the appropriate parameters on the threshold allow it to detect the two halves of the target.
  2. Erode the images to get rid of any very small objects that slipped through
  3. Find contours in each of the resultant binary images
  4. Send the red and green contours lists to the robot, It will look for objects with the correct aspect ratio, proximity, and orientation with respect to each other. From this the robot program can determine which sets are targets.

0 Report Errors

Use this form to report any errors with the documentation. For help with WPILib, please use the FIRST Forums at http://forums.usfirst.org For reporting WPILib bugs, please submit an issue on GitHub at https://github.com/wpilibsuite/allwpilib/issues/new