You are here: Start » Filter Reference » Computer Vision » Image Analysis » DetectCorners_Foerstner
Module: | FoundationBasic |
---|
Detects corners using the Foerstner algorithm.
Applications
Name | Type | Range | Description | |
---|---|---|---|---|
inMonoImage | Image | Input image | ||
inRoi | Region* | Range of pixels to be processed | ||
inCornerQuality | Real | 0.0 - 1.0 | Threshold on regularity of the corner | |
inStrengthThreshold | Real | 0.0 - 255.0 | Threshold on contrast of gradients forming the corner | |
inLocalness | Integer | 1 - 11 | How big-scaled the corners should be | |
outPoints | Point2DArray | Found corner points | ||
diagRoundnessImage | Image | Calculated roundness for each input pixel | ||
diagStrengthImage | Image | Calculated strength for each pixel |
Requirements
For input inMonoImage only pixel formats are supported: 1⨯uint8, 1⨯int8, 1⨯uint16, 1⨯int16, 1⨯int32, 1⨯real.
Read more about pixel formats in Image documentation.
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
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
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inMonoImage pixel format in DetectCorners_Foerstner. Supported formats: 1xUInt8, 1xInt8, 1xUInt16, 1xInt16, 1xInt32, 1xReal. |
Complexity Level
This filter is available on Advanced Complexity Level.
Filter Group
This filter is member of DetectCorners filter group.
See Also
- DetectCorners_CornerResponse – Detects corners using corner response method.