Line-following computer vision pipeline
As we did with the previous computer vision tasks, we will visualize this as a pipeline. Before we do, there are many methods for tracking a line with computer vision.
Camera line-tracking algorithms
It is in our interests to pick one of the simplest ones, but as always, there is a trade-off, in that others will cope with more tricky situations or anticipate curves better than ours.
Here is a small selection of methods we could use:
- Using edge detection: An edge detection algorithm, such as the Canny edge detector, can be run across the image, turning any transitions it finds into edges. OpenCV has a built-in edge detection system if we wanted to use this. The system can detect dark-to-light and light-to-dark edges. It is more tolerant of less sharp edges.
- Finding differences along lines: This is like cheeky edge detection, but only on a particular row. By finding the difference between each pixel along a row in the image...