Method GoodFeaturesToTrack
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
GoodFeaturesToTrack(InputArray, int, double, double, InputArray, int, bool, double)
finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima
public static Point2f[] GoodFeaturesToTrack(InputArray src, int maxCorners, double qualityLevel, double minDistance, InputArray mask, int blockSize, bool useHarrisDetector, double k)
Parameters
srcInputArrayInput 8-bit or floating-point 32-bit, single-channel image.
maxCornersintMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
qualityLeveldoubleParameter characterizing the minimal accepted quality of image corners. The parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue or the Harris function response (see cornerHarris() ). The corners with the quality measure less than the product are rejected. For example, if the best corner has the quality measure = 1500, and the qualityLevel=0.01, then all the corners with the quality measure less than 15 are rejected.
minDistancedoubleMinimum possible Euclidean distance between the returned corners.
maskInputArrayOptional region of interest. If the image is not empty (it needs to have the type CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
blockSizeintSize of an average block for computing a derivative covariation matrix over each pixel neighborhood.
useHarrisDetectorboolParameter indicating whether to use a Harris detector
kdoubleFree parameter of the Harris detector.
Returns
- Point2f[]
Output vector of detected corners.
GoodFeaturesToTrack(InputArray, int, double, double, InputArray, int, int, bool, double)
finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima
public static Point2f[] GoodFeaturesToTrack(InputArray src, int maxCorners, double qualityLevel, double minDistance, InputArray mask, int blockSize, int gradientSize, bool useHarrisDetector, double k)
Parameters
srcInputArrayInput 8-bit or floating-point 32-bit, single-channel image.
maxCornersintMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
qualityLeveldoubleParameter characterizing the minimal accepted quality of image corners.
minDistancedoubleMinimum possible Euclidean distance between the returned corners.
maskInputArrayOptional region of interest. If the image is not empty (it needs to have the type CV_8UC1 and the same size as image ), it specifies the region in which the corners are detected.
blockSizeintSize of an average block for computing a derivative covariation matrix over each pixel neighborhood.
gradientSizeintAperture parameter for the Sobel operator used for derivatives computation.
useHarrisDetectorboolParameter indicating whether to use a Harris detector
kdoubleFree parameter of the Harris detector.
Returns
- Point2f[]
Output vector of detected corners.