ocv_keypoints | R Documentation |
Find key points in images
ocv_keypoints(
image,
method = c("FAST", "Harris"),
control = ocv_keypoints_options(method, ...),
...
)
image |
an ocv grayscale image object |
method |
the type of keypoint detection algorithm |
control |
a list of arguments passed on to the algorithm |
... |
further arguments passed on to ocv_keypoints_options |
threshold threshold on difference between intensity of the central pixel and pixels of a circle around this pixel.
nonmaxSuppression if true, non-maximum suppression is applied to detected corners (keypoints).
type one of the three neighborhoods as defined in the paper: TYPE_9_16, TYPE_7_12, TYPE_5_8
numOctaves the number of octaves in the scale-space pyramid
corn_thresh the threshold for the Harris cornerness measure
DOG_thresh the threshold for the Difference-of-Gaussians scale selection
maxCorners the maximum number of corners to consider
num_layers the number of intermediate scales per octave
mona <- ocv_read('https://jeroen.github.io/images/monalisa.jpg')
mona <- ocv_resize(mona, width = 320, height = 477)
# FAST-9
pts <- ocv_keypoints(mona, method = "FAST", type = "TYPE_9_16", threshold = 40)
# Harris
pts <- ocv_keypoints(mona, method = "Harris", maxCorners = 50)
# Convex Hull of points
pts <- ocv_chull(pts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.