Skip to content

Tutorial: Find the Aerial Assist Goals

Thomas Clark edited this page Jan 13, 2016 · 1 revision

Processing images from the First Robotics Competition 2014 game

This is a quick demonstration using GRIP to process a single image from the First Robotics Competition 2014 Aerial Assist. Please keep in mind that we are working with just a single image, so the result is not necessarily a particularly robust algorithm- you should really be taking many pictures from different distances, angles, and lighting conditions to ensure that your resulting algorithm will perform well in all those cases.


##The sample image

The original image.

The original image is shown here and represents the hot goal being indicated by the retroreflective tape on the movable board. When the goal is hot, the horizontal piece of tape is facing the robot. When it is not hot, the board that the tape is attached is flipped up so it doesn't reflect and that horizontal line would not be present.


##The actual algorithm depicted in GRIP

The original algorithm.

This shows the pipeline as it was developed in GRIP.

  1. First, the image was re-sized by 0.35 to make it fit better for this presentation.
  2. A HSV threshold operation is done to filter out everything but the blue-green lines that are shown in the initial image.
  3. An erosion operation was done to reduce some of the noise. This also reduced the line thickness.
  4. A dilation is done to make the lines a little thicker in hopes of better detecting them.
  5. Next, we use the line detection operation. We found 4 lines in this case, since it looks like a few artifacts of noise registered as lines too.
  6. Lastly, we use the Filter Lines operation to remove these "noise" lines. Filter lines allows you to specify a minimum line size to focus only on the lines you want.

##A simpler approach

A simpler algorithm.

Looking back on our pipeline, it seems like the erosion and dilation might not be necessary since there was very little noise showing up in the images. So for this attempt, we successfully implemented the same algorithm without those extra steps. In this case the algorithm is shorter and would run more quickly, but might not be as robust as the one with the potentially better filtering.