You are here: Start » FIL.NET » Function Reference » Computer Vision » Image Analysis » FIL.DetectCorners_Foerstner
Detects corners using the Foerstner algorithm.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void DetectCorners_Foerstner ( FilNet.Image inMonoImage, NullableRef<FilNet.Region> inRoi, float inCornerQuality, float inStrengthThreshold, int inLocalness, IList<FilNet.Point2D> outPoints, FilNet.Image diagRoundnessImage, FilNet.Image diagStrengthImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inMonoImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inCornerQuality | float | <0.0f, 1.0f> | 0.8f | Threshold on regularity of the corner. Default value: 0.8f. |
![]() | inStrengthThreshold | float | <0.0f, 255.0f> | 50.0f | Threshold on contrast of gradients forming the corner. Default value: 50.0f. |
![]() | inLocalness | int | <1, 11> | 3 | How big-scaled the corners should be. Default value: 3. |
![]() | outPoints | System.Collections.Generic.IList<FilNet.Point2D> | Found corner points. | ||
![]() | diagRoundnessImage | FilNet.Image | Calculated roundness for each input pixel. | ||
![]() | diagStrengthImage | FilNet.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.
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
- DetectCorners_Foerstner(Image, Single, Single, Int32, IList<Point2D>)
- DetectCorners_Foerstner(Image, NullableRef<Region>, Single, Single, Int32, IList<Point2D>)