Search in sources :

Example 1 with PointsToPolyline

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);
}
Also used : PointsToPolyline(boofcv.abst.shapes.polyline.PointsToPolyline) BinaryContourFinder(boofcv.abst.filter.binary.BinaryContourFinder) FactoryBinaryContourFinder(boofcv.factory.filter.binary.FactoryBinaryContourFinder)

Aggregations

BinaryContourFinder (boofcv.abst.filter.binary.BinaryContourFinder)1 PointsToPolyline (boofcv.abst.shapes.polyline.PointsToPolyline)1 FactoryBinaryContourFinder (boofcv.factory.filter.binary.FactoryBinaryContourFinder)1