Computes the descriptors for a set of keypoints detected in an image or image set.
[descriptors, keypoints] = obj.compute(img, keypoints)
[descriptors, keypoints] = obj.compute(imgs, keypoints)
Input
- img Image (first variant), 8-bit color image.
- imgs Image set (second variant), cell array of images.
- keypoints Input collection of keypoints. Keypoints for
which a descriptor cannot be computed are removed.
Sometimes new keypoints can be added, for example: cv.SIFT
duplicates keypoint with several dominant orientations
(for each orientation). In the first variant, this is a
struct-array of detected keypoints. In the second variant,
it is a cell-array, where
keypoints{i}
is a set of keypoints
detected in images{i}
(a struct-array like before).
Output
- descriptors Computed descriptors. In the second variant of
the method
descriptors{i}
are descriptors computed for a
keypoints{i}
. Row j
in descriptors
(or
descriptors{i}
) is the descriptor for j
-th keypoint.
- keypoints Optional output with possibly updated keypoints.