PointsCloudQuadrilateralRelativeDistortionLimit Property |
Namespace: Accord.Math.Geometry
The value of this property is used to calculate distortion limit used by FindQuadrilateralCorners(IEnumerableIntPoint), when processing potential corners and making decision if the provided points form a quadrilateral or a triangle. The distortion limit is calculated as:
distrtionLimit = RelativeDistortionLimit * ( W * H ) / 2,
To explain the idea behind distortion limit, let’s suppose that quadrilateral finder routine found
the next candidates for corners:
As we can see on the above picture, the shape there potentially can be a triangle, but not quadrilateral
(suppose that points list comes from a hand drawn picture or acquired from camera, so some
inaccuracy may exist). It may happen that the D point is just a distortion (noise, etc).
So the FindQuadrilateralCorners(IEnumerableIntPoint) check what is the distance between a potential corner
(D in this case) and a line connecting two adjacent points (AB in this case). If the distance is smaller
then the distortion limit, then the point may be rejected, so the shape turns into triangle.
An exception is the case when both C and D points are very close to the AB line, so both their distances are less than distortion limit. In this case both points will be accepted as corners - the shape is just a flat quadrilateral.
Default value is set to 0.1.