gapi_goodFeaturesToTrack
import { gapi_goodFeaturesToTrack } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Determines strong corners on an image.
The function finds the most prominent corners in the image or in the specified image region, as described in [Shi94]
- Function calculates the corner quality measure at every source image pixel using the #cornerMinEigenVal or #cornerHarris .
- Function performs a non-maximum suppression (the local maximums in 3 x 3 neighborhood are retained).
- The corners with the minimal eigenvalue less than
\texttt{qualityLevel} \cdot \max_{x,y} qualityMeasureMap(x,y)are rejected. - The remaining corners are sorted by the quality measure in the descending order.
- Function throws away each corner for which there is a stronger corner at a distance less than maxDistance.
The function can be used to initialize a point-based tracker of an object.
Note: - If the function is called with different values A and B of the parameter qualityLevel , and A > B, the vector of returned corners with qualityLevel=A will be the prefix of the output vector with qualityLevel=B .
- Function textual ID is "org.opencv.imgproc.feature.goodFeaturesToTrack"
gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number, mask: Mat, blockSize: number, useHarrisDetector: boolean, k: number): GArray_Point2f;5 available overloads
gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number): GArray_Point2f;gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number, mask: Mat): GArray_Point2f;gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number, mask: Mat, blockSize: number): GArray_Point2f;gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number, mask: Mat, blockSize: number, useHarrisDetector: boolean): GArray_Point2f;gapi_goodFeaturesToTrack(image: GMat, maxCorners: number, qualityLevel: number, minDistance: number, mask: Mat, blockSize: number, useHarrisDetector: boolean, k: number): GArray_Point2f;imageInput 8-bit or floating-point 32-bit, single-channel image.
maxCornersMaximum number of corners to return. If there are more corners than are found, the strongest of them is returned.
maxCorners <= 0implies that no limit on the maximum is set and all detected corners are returned.qualityLevelParameter characterizing the minimal accepted quality of image corners. The parameter value is multiplied by the best corner quality measure, which is the minimal eigenvalue (see #cornerMinEigenVal ) 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.
minDistanceMinimum possible Euclidean distance between the returned corners.
maskOptional 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.
blockSizeSize of an average block for computing a derivative covariation matrix over each pixel neighborhood. See cornerEigenValsAndVecs .
useHarrisDetectorParameter indicating whether to use a Harris detector (see #cornerHarris) or #cornerMinEigenVal.
kFree parameter of the Harris detector.
vector of detected corners. Release returned native handles with using or delete(), including handles nested in results.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.