Feature2D
import { Feature2D } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.
Base Classes *********************************** Abstract base class for 2D image feature detectors and descriptor extractors
Constructors and members
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
detect
Detects keypoints in an image (first variant) or image set (second variant).
detect(image: Mat, keypoints: KeyPointVector, mask: Mat): void;2 available overloads
detect(image: Mat, keypoints: KeyPointVector): void;detect(image: Mat, keypoints: KeyPointVector, mask: Mat): void;imageImage.
keypointsOutput destination, filled by the native operation. The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .
maskMask specifying where to look for keypoints (optional). It must be a 8-bit integer matrix with non-zero values in the region of interest.
detect1
Detects keypoints in an image (first variant) or image set (second variant).
detect1(images: MatVector, keypoints: KeyPointVectorVector, masks: MatVector): void;2 available overloads
detect1(images: MatVector, keypoints: KeyPointVectorVector): void;detect1(images: MatVector, keypoints: KeyPointVectorVector, masks: MatVector): void;imagesImage set.
keypointsOutput destination, filled by the native operation. The detected keypoints. In the second variant of the method keypoints[i] is a set of keypoints detected in images[i] .
masksMasks for each input image specifying where to look for keypoints (optional). masks[i] is a mask for images[i].
compute
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
compute(image: Mat, keypoints: KeyPointVector, descriptors: Mat): void;imageImage.
keypointsInput/output value, modified by the native operation. Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).
descriptorsOutput destination, filled by the native operation. Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.
compute1
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
compute1(images: MatVector, keypoints: KeyPointVectorVector, descriptors: MatVector): void;imagesImage set.
keypointsInput/output value, modified by the native operation. Input collection of keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: SIFT duplicates keypoint with several dominant orientations (for each orientation).
descriptorsOutput destination, filled by the native operation. Computed descriptors. In the second variant of the method descriptors[i] are descriptors computed for a keypoints[i]. Row j is the keypoints (or keypoints[i]) is the descriptor for keypoint j-th keypoint.
detectAndCompute
Detects keypoints and computes the descriptors
detectAndCompute(image: Mat, mask: Mat, keypoints: KeyPointVector, descriptors: Mat, useProvidedKeypoints: boolean): void;2 available overloads
detectAndCompute(image: Mat, mask: Mat, keypoints: KeyPointVector, descriptors: Mat): void;detectAndCompute(image: Mat, mask: Mat, keypoints: KeyPointVector, descriptors: Mat, useProvidedKeypoints: boolean): void;imageimage argument (Mat).
maskmask argument (Mat).
keypointsOutput destination, filled by the native operation. keypoints argument (KeyPointVector).
descriptorsOutput destination, filled by the native operation. descriptors argument (Mat).
useProvidedKeypointsuse provided keypoints argument (boolean).
descriptorSize
Return the number of elements in one descriptor produced by this feature algorithm.
descriptorSize(): number;The number result.
descriptorType
Return the OpenCV element type of the descriptor matrix produced by this algorithm.
descriptorType(): number;The number result.
defaultNorm
Return the distance norm recommended for matching this algorithm's descriptors.
defaultNorm(): number;The number result.
write
Stores algorithm parameters in a file storage
write(fileName: EmbindString): void;fileNamefile name argument (EmbindString).
write1
see corresponding cv::Algorithm method
write1(fs: FileStorage, name: EmbindString): void;fsfs argument (FileStorage).
namename argument (EmbindString).
read
see corresponding cv::Algorithm method
read(fileName: EmbindString): void;fileNamefile name argument (EmbindString).
read1
see corresponding cv::Algorithm method
read1(arg1: FileNode): void;arg1arg1 argument (FileNode).
empty
Return true if detector object is empty
empty(): boolean;The boolean result.
getDefaultName
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
getDefaultName(): string;The string result.
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.