Submitted by: Max Maeder ([email protected])
Draws boundary lines of the path defined by the cones, and saves the result as answer.png
The image processing pipeline I used was:
- Extract red channel from image
- Apply threshold to isolate really-red objects
- Find contours in image
- Generate a bounding box around each contour
- Throw out contours with too small an area
- Throw out contours that are too squat (can't be cones)
- Find center of contour
- Draw regression lines using contour centers as points on the lines
I struggled to find a good way to bound the different cones since I have limited experience with OpenCV. I'm happy with the solution I ended up with.
- OpenCV
- STD