You are here: Start » AVL.NET » AVL.DetectCorners_Foerstner(AvlNet.Image, AvlNet.Region, float, float, int, AvlNet.Point2D[], AvlNet.Image, AvlNet.Image)

AVL.DetectCorners_Foerstner(AvlNet.Image, AvlNet.Region, float, float, int, AvlNet.Point2D[], AvlNet.Image, AvlNet.Image)

Detects corners using the Foerstner algorithm.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void DetectCorners_Foerstner(
	AvlNet.Image inMonoImage,
	AvlNet.Region inRoi,
	float inCornerQuality,
	float inStrengthThreshold,
	int inLocalness,
	out AvlNet.Point2D[] outPoints,
	out AvlNet.Image diagRoundnessImage,
	out AvlNet.Image diagStrengthImage
)

Parameters

inMonoImage
Type: AvlNet.Image
Input image
inRoi
Type: AvlNet.Region
Range of pixels to be processed, or null.
inCornerQuality
Type: System.Single
Threshold on regularity of the corner
inStrengthThreshold
Type: System.Single
Threshold on contrast of gradients forming the corner
inLocalness
Type: System.Int32
How big-scaled the corners should be
outPoints
Type: AvlNet.Point2D
Found corner points
diagRoundnessImage
Type: AvlNet.Image
Calculated roundness for each input pixel
diagStrengthImage
Type: AvlNet.Image
Calculated strength for each pixel

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.

See also