Click or drag to resize
Accord.NET (logo)

PointsCloudQuadrilateralRelativeDistortionLimit Property

Relative distortion limit allowed for quadrilaterals, [0.0, 0.25].

Namespace:  Accord.Math.Geometry
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static float QuadrilateralRelativeDistortionLimit { get; set; }
Request Example View Source

Property Value

Type: Single
Remarks

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,
where W and H are width and height of the "points cloud" passed to the FindQuadrilateralCorners(IEnumerableIntPoint).

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.

See Also