You are here: Start » AVL.NET » Function Reference » Computer Vision » Image Analysis » AVL.DetectCorners_Foerstner

AVL.DetectCorners_Foerstner

Detects corners using the Foerstner algorithm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void DetectCorners_Foerstner
(
	AvlNet.Image inMonoImage,
	NullableRef<AvlNet.Region> inRoi,
	float inCornerQuality,
	float inStrengthThreshold,
	int inLocalness,
	IList<AvlNet.Point2D> outPoints
)

Parameters

Name Type Range Default Description
inMonoImageAvlNet.ImageInput image.
inRoiAvlNet.NullableRef<AvlNet.Region>Range of pixels to be processed. Default value: atl::NIL.
inCornerQualityfloat<0.0f, 1.0f>0.8fThreshold on regularity of the corner. Default value: 0.8f.
inStrengthThresholdfloat<0.0f, 255.0f>50.0fThreshold on contrast of gradients forming the corner. Default value: 50.0f.
inLocalnessint<1, 11>3How big-scaled the corners should be. Default value: 3.
outPointsSystem.Collections.Generic.IList<AvlNet.Point2D>Found corner points.

Description

The operation detects corners using Foerstner algorithm. Its goal is to find corners defined as crossings of image edges.
For every square window of size 2*inLocalness+1 a convolution matrix is computed: \[M = \left(\begin{array}{ccc} \sum g_r^2 & \sum g_c g_r \\ \sum g_c g_r & \sum g_c^2 \end{array} \right) \] where the summation is performed over the whole window and \(g_r, g_c\) denote horizontal and vertical gradient respectively at the point.
Then the strength and so called roundness of the window is computed, where: \[strength = \mathrm{tr}(M)\] \[roundness = \mathrm{tr}(M)^2 / (4*\mathrm{det}(M))\] Roundness measures how similar are the gradients which form the corner.
Only windows with strength greater than inStrengthThreshold and roundness greater than inCornerQuality are considered. Then the non-maximum suppression on the window roundness is performed.
Finally the window's candidate for the corner is determined. It is done by minimizing square distance to all tangent lines (i.e. perpendicular to gradients) within the window, with distances weighted with gradient lengths.

Examples

DetectCorners_Foerstner with different inStrengthThreshold values.

Remarks

Strength of the window corresponds to average gradient strength within the window.
Roundness of the window is always between 0 and 1. For most applications inCornerQuality values below 0.5 are not recommended.
Higher inLocalness values (e.g. greater than 4) may help to get rid of noise on the image, but decrease precision.

Errors

List of possible exceptions:

Error type Description
DomainError Not supported inMonoImage pixel format in DetectCorners_Foerstner. Supported formats: 1xUInt8, 1xInt8, 1xUInt16, 1xInt16, 1xInt32, 1xReal.

Function Overrides

See also