use of boofcv.abst.shapes.polyline.PointsToPolyline in project BoofCV by lessthanoptimal.
the class FactoryShapeDetector method polygonContour.
public static <T extends ImageGray<T>> DetectPolygonFromContour<T> polygonContour(@Nonnull ConfigPolygonFromContour config, Class<T> imageType) {
config.checkValidity();
PointsToPolyline contourToPolygon = FactoryPointsToPolyline.create(config.contourToPoly);
BinaryContourFinder contour = FactoryBinaryContourFinder.linearChang2004();
contour.setConnectRule(config.contourRule);
return new DetectPolygonFromContour<>(contourToPolygon, config.minimumContour, config.clockwise, config.canTouchBorder, config.minimumEdgeIntensity, config.tangentEdgeIntensity, contour, imageType);
}
Aggregations