Takes in List and outputs filtered List based off perimeter, area, and desired shape
FindCirclesPipe
Input: Pair<Mat, List<Contour>>
Ouput: List<CVShape>
Pipelines
Fleshed out ColouredShapePipeline
Testing
Not too much testing done yet. TODOs for testing include:
[x] Use powercell images from WPI's ML dataset
[x] Use more FRC specific targets instead of perfect polygons
Triangles
Quadrilaterals
Circles
General Things left
[x] Test more
[x] Replace draw2dcontours pipe with draw2dshapes pipe
[x] Add solvepnp support
[x] Make HoughCircles params a part of FindCirclesPipe params
Results from power cell test images
Higher resolution and less blur give better results and you might need to play around with the cannyMaxThresh and accuracy to pick up circles and not duck tape/similar shapes wires. But filterShapesPipe should take care of it if you want to define a min Area, peri or the minDist, min/max radius in the FindCirclespipe.
Solvepnp
Tried to draw a cube enclosing the circle, but ran into a wall with that since drawing over a contour made it impossible. Instead, a single square worked nicely.
Pipes
FindPolygonsPipe
List<Contour>
List<CVShape>
FilterPolygonsPipe
FindCirclesPipe
Pair<Mat, List<Contour>>
List<CVShape>
Pipelines
Testing
Not too much testing done yet. TODOs for testing include:
Triangles
Quadrilaterals
Circles
General Things left
Results from power cell test images
Higher resolution and less blur give better results and you might need to play around with the cannyMaxThresh and accuracy to pick up circles and not duck tape/similar shapes wires. But filterShapesPipe should take care of it if you want to define a min Area, peri or the minDist, min/max radius in the FindCirclespipe.
Solvepnp
Tried to draw a cube enclosing the circle, but ran into a wall with that since drawing over a contour made it impossible. Instead, a single square worked nicely.