Draws keypoints
out = cv.drawKeypoints(im, keypoints)
out = cv.drawKeypoints(im, keypoints, 'OptionName', optionValue, ...)
Input
- im Source image.
- keypoints Keypoints from the source image.
A 1-by-N structure array with the following fields:
- pt coordinates of the keypoint
[x,y]
- size diameter of the meaningful keypoint neighborhood
- angle computed orientation of the keypoint (-1 if not
applicable). Its possible values are in a range [0,360) degrees.
It is measured relative to image coordinate system (y-axis is
directed downward), i.e in clockwise.
- response the response by which the most strong keypoints have
been selected. Can be used for further sorting or subsampling.
- octave octave (pyramid layer) from which the keypoint has been
extracted.
- class_id object id that can be used to clustered keypoints by an
object they belong to.
Output
- out Output image. Its content depends on the option values defining
what is drawn in the output image. See possible options below.
By default, the source image, and single keypoints will be drawn.
For each keypoint, only the center point will be drawn (without
a circle around the keypoint with the keypoint size and orientation).
Options
- Color Color of keypoints. If all -1, random colors are picked up.
default [-1,-1,-1,-1]
- DrawRichKeypoints For each keypoint, the circle around keypoint with
keypoint size and orientation will be drawn. default false.
- OutImage If set, keypoints will be drawn on existing content of output
image, otherwise source image is used instead. Default not set
(i.e keypoints are drawn on top of
im
).