goodFeaturesToTrack function
VecPoint2f
goodFeaturesToTrack(
- InputArray image,
- int maxCorners,
- double qualityLevel,
- double minDistance, {
- VecPoint2f? corners,
- InputArray? mask,
- int blockSize = 3,
- int? gradientSize,
- bool useHarrisDetector = false,
- double k = 0.04,
GoodFeaturesToTrack determines strong corners on an image. The function finds the most prominent corners in the image or in the specified image region.
For further details, please see: https:///docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga1d6bb77486c8f92d79c8793ad995d541
Implementation
VecPoint2f goodFeaturesToTrack(
InputArray image,
int maxCorners,
double qualityLevel,
double minDistance, {
VecPoint2f? corners,
InputArray? mask,
int blockSize = 3,
int? gradientSize,
bool useHarrisDetector = false,
double k = 0.04,
}) {
final c = corners?.ptr ?? calloc<cvg.VecPoint2f>();
mask ??= Mat.empty();
if (gradientSize == null) {
cvRun(
() => cimgproc.cv_goodFeaturesToTrack(
image.ref,
c,
maxCorners,
qualityLevel,
minDistance,
mask!.ref,
blockSize,
useHarrisDetector,
k,
ffi.nullptr,
),
);
} else {
cvRun(
() => cimgproc.cv_goodFeaturesToTrack_1(
image.ref,
c,
maxCorners,
qualityLevel,
minDistance,
mask!.ref,
blockSize,
gradientSize,
useHarrisDetector,
k,
ffi.nullptr,
),
);
}
return corners ?? VecPoint2f.fromPointer(c);
}