Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Feature Detection » cvCornerSubPix

cvCornerSubPix


Refines the corner locations.

Name Type Range Description
inImage Image Input image.
inCorners Point2DArray Initial coordinates of the input corners.
inWinWidth Integer 1 - Half of the width of the search window.
inWinHeight Integer 1 - Half of the height of the search window.
inZeroZoneWidth Integer Half of the width of the dead region in the middle of the search zone over which the summation in the formula below is not done.
inZeroZoneHeight Integer Half of the height of the dead region in the middle of the search zone over which the summation in the formula below is not done.
inTcEpsilon Real Criteria termination of the iterative process of corner refinement. Process stops when either after inTcMaxCount iterations or when the corner position moves by less than inTcEpsilon.
inTcMaxCount Integer Criteria termination of the iterative process of corner refinement. Process stops when either after inTcMaxCount iterations or when the corner position moves by less than inTcEpsilon.
inTcType CvTerminationCriteria Indicates which termination criteria will be used.
outCorners Point2DArray Refined coordinates of input points.

Description

The operation iterates to find the sub-pixel accurate location of corners or radial saddle points. The actual corners are searched in area of dimensions twice as big as inWinWidth and inWidHeight, centered on the initial corners. The algorithm iterates to the moment when last refinement was smaller than inTcEpsilon or the number of iteration exceeds inTcMaxCount. The stopping condition can be set in inTcType.

Examples

Resulting corners of cvCornersSubPix performed on the sample image with inCorners from the sample image, inWinWidth = 12, inWinHeight = 12, inTcEpsilon = 0, inTcMaxCount = 30 and inTcType = 3, drawn on the sample image.

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 Corners array must not be empty in cvCornerSubPix.

Complexity Level

This filter is available on Basic Complexity Level.

See Also