In the 2019-2020 FTC game, Skystone, a key component of the game is picking up stones (yellow oversized LEGO-type blocks). For our robot, we decided to create a computer vision intaking and pickup system. I worked on creating this system using the Java version of OpenCV. While it didn't make it onto the competition robot (we solved the intaking issue with multi-purpose grabbers), this computer vision system worked very well in testing. It is capable of accurately tracking the relative translation and orientation of the stones, even during rapid and blurry movement. It uses an inverse perspective transform to convert the images to virtual overhead views (a strategy often used in autonomous cars), multiple filtering and threshold passes, and finally a Hough lines analysis with binning of similar lines to extract a precise, stable, and accurate x, y, and rotation.
You can see some highlights of the system below.