Detect ORB keypoints and return an
Detect ORB Keypoints in Grayscale Image
Read an image into the workspace.
I = imread('businessCard.png');
Convert the image into a grayscale image.
I = im2gray(I);
Display the grayscale image.
Detect and store ORB keypoints.
points = detectORBFeatures(I);
Display the grayscale image and plot the detected ORB keypoints. Suppress the display of circles around the detected keypoints. The ORB keypoints are detected in regions with high intensity variance.
figure imshow(I) hold on plot(points,'ShowScale',false) hold off
Detect ORB Keypoints In Binary Shape Image
Read a binary image into the workspace.
I = imread('star.png');
Display the image.
Detect and store ORB keypoints. Specify the scale factor for image decomposition as 1.01 and the number of decomposition levels as 3.
points = detectORBFeatures(I,'ScaleFactor',1.01,'NumLevels',3);
Display the image and plot the detected ORB keypoints. The inflection points in the binary shape image are detected as the ORB keypoints.
figure imshow(I) hold on plot(points) hold off
I — Input image
M-by-N grayscale image
Input image, specified as an M-by-N grayscale image. The input image must be real and nonsparse.
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
ScaleFactor — Scale factor for image decomposition
1.2 (default) | scalar greater than 1
Scale factor for image decomposition, specified as the comma-separated pair
'ScaleFactor' and a scalar greater than 1. The scale
value at each level of decomposition is
ScaleFactor(level-1), where level is any value in the range [0,
Numlevels-1]. Given the input image of size
M-by-N, the image size at each level of
decomposition is .
NumLevels — Number of decomposition levels
8 (default) | scalar greater than or equal to 1
Number of decomposition levels, specified as the comma-separated pair consisting
'NumLevels' and a scalar greater than or equal to 1. Increase
this value to extract keypoints from the image at more levels of decomposition.
The number of decomposition levels for extracting keypoints is limited by the image size at that level. The image size at a level of decomposition must be at least 63-by-63 for detecting keypoints. The maximum level of decomposition is calculated as
If either the default value or the specified value of
'NumLevels' is greater than
levelmax, the function modifies
NumLevels to levelmax
and returns a warning.
ROI — Region of interest
[1 1 M
N] (default) | four-element vector
Region of interest for keypoint detection, specified as the comma-separated pair
'ROI' and a vector of the format
height]. The first two elements represent the location of the upper
left corner of the region of interest. The last two elements represent the width and
the height of the region of interest. The width and height of the region of interest
must each be a value greater than or equal to 63.
The function detects keypoints from the input image by using the ORB feature detection method in .
 Rublee, E., V. Rabaud, K. Konolige, and G. Bradski. "ORB: An Efficient Alternative to SIFT or SURF." In Proceedings of the 2011 International Conference on Computer Vision, 2564–2571. Barcelona, Spain: IEEE, 2011.