FindQuadrilateralCorners() public static method

Find corners of quadrilateral or triangular area, which contains the specified collection of points.

The method makes an assumption that the specified collection of points form some sort of quadrilateral/triangular area. With this assumption it tries to find corners of the area.

The method does not search for bounding quadrilateral/triangular area, where all specified points are inside of the found quadrilateral/triangle. Some of the specified points potentially may be outside of the found quadrilateral/triangle, since the method takes corners only from the specified collection of points, but does not calculate such to form true bounding quadrilateral/triangle.

See QuadrilateralRelativeDistortionLimit property for additional information.

public static FindQuadrilateralCorners ( IEnumerable cloud ) : List
cloud IEnumerable Collection of points to search quadrilateral for.
return List
Example #1
0
 // Get optimized quadrilateral area
 private List <IntPoint> GetShapeCorners(List <IntPoint> edgePoints)
 {
     return(shapeOptimizer.OptimizeShape(PointsCloud.FindQuadrilateralCorners(edgePoints)));
 }