You are here: Start » AVL.NET » AVL.DetectCorners_CornerResponse
Detects corners using corner response method.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
public static void DetectCorners_CornerResponse ( AvlNet.Image inMonoImage, NullableRef<AvlNet.Region> inRoi, AvlNet.CornerResponseMethod inCornerResponseMethod, int inKernelSize, float? inThreshold, IList<AvlNet.Point2D> outCorners )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inMonoImage | AvlNet.Image | Input image. | |||
inRoi | AvlNet.NullableRef<AvlNet.Region> | Range of pixels to be processed. Default value: atl::NIL. | |||
inCornerResponseMethod | AvlNet.CornerResponseMethod | Method for computing corner response. | |||
inKernelSize | int | <1, 10> | 3 | Method kernel size. Default value: 3. | |
inThreshold | float? | <0.0f, 255.0f> | 50.0f | Threshold for corner response value, between 0 and 255, default value is taken from SelectThresholdValue on outCornerResponseImage and entropy method. Default value: 50.0f. | |
outCorners | System.Collections.Generic.IList<AvlNet.Point2D> | Found corner points. |
Description
The operation detects corners using either Harris or Kanade-Tomasi corner response method,
depending on inCornerResponseMethod.
For every square window of size inKernelSize 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.
Harris' corner response is computed the following way:
\[H = \mathrm{det}(M) - k \mathrm{tr}^2(M) \]
where k is a constant set to 0.01.
Kanade-Tomasi corner response is given by:
\[KT = \mathrm{min}(\lambda_1, \lambda_2)\]
where \(\lambda_1, \lambda_2\) are eigenvalues of the convolution matrix.
Values H or KT give corner response image.
Then a few steps are performed in order to extract corner points. First, the normalized corner response function is thresholded with inThreshold with a small hysteresis, then the remained points are split into connected regions (blobs) and the center of each blob is determined.
Examples
Remarks
Both methods give similar results and are quite fast. However, they tend to be less accurate than DetectCorners_Foerstner.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Unknown algorithm in DetectCorners_CornerResponse. |
Function Overrides
- DetectCorners_CornerResponse(Image, CornerResponseMethod, Int32, IList<Point2D>, Image)
- DetectCorners_CornerResponse(Image, NullableRef<Region>, CornerResponseMethod, Int32, Nullable<Single>, IList<Point2D>, Image)