selectUniform
Select uniformly distributed subset of feature points
Description
Examples
Select Uniformly Distributed Subset of KAZE Features
Detect and plot a subset of uniformly distributed KAZE features from an image.
Read an image.
im = imread('yellowstone_left.png');
Detect and display KAZE features.
points1 = detectKAZEFeatures(im2gray(im))
points1 = 6712x1 KAZEPoints array with properties: Location: [6712x2 single] Metric: [6712x1 single] Count: 6712 Scale: [6712x1 single] Orientation: [6712x1 single]
subplot(1,2,1) imshow(im) hold on plot(points1) hold off title('Original Points')
Select a uniformly distributed subset of points.
numPoints = 100; points2 = selectUniform(points1,numPoints,size(im))
points2 = 100x1 KAZEPoints array with properties: Location: [100x2 single] Metric: [100x1 single] Count: 100 Scale: [100x1 single] Orientation: [100x1 single]
subplot(1,2,2) imshow(im) hold on plot(points2) hold off title('Uniformly Distributed Points')
Select Uniformly Distributed Subset of Features from Image
Load an image.
im = imread('yellowstone_left.png');
Detect many corners by reducing the quality threshold.
points1 = detectHarrisFeatures(im2gray(im), 'MinQuality', 0.05);
Plot image with detected corners.
subplot(1,2,1); imshow(im); hold on plot(points1); hold off title('Original points');
Select a uniformly distributed subset of points.
numPoints = 100; points2 = selectUniform(points1,numPoints,size(im));
Plot images showing original and subset of points.
subplot(1, 2, 2); imshow(im); hold on plot(points2); hold off title('Uniformly distributed points');
Select A Uniformly Distributed Subset of Features From an Image
Load an image into the workspace.
im = imread('yellowstone_left.png');
Detect many corners by reducing the quality threshold.
points1 = detectBRISKFeatures(im2gray(im), 'MinQuality', 0.05);
Plot image with detected corners.
subplot(1,2,1); imshow(im); hold on plot(points1); hold off title('Original points');
Select a uniformly distributed subset of points.
numPoints = 100; points2 = selectUniform(points1,numPoints,size(im));
Plot images showing original and subset of points.
subplot(1, 2, 2); imshow(im); hold on plot(points2); hold off title('Uniformly distributed points');
Select Uniformly Distributed Subset Features from an Image
Load an image.
im = imread('yellowstone_left.png');
Detect and display SURF features.
points1 = detectSURFFeatures(im2gray(im)); subplot(1,2,1); imshow(im); hold on plot(points1); hold off title('Original points');
Select a uniformly distributed subset of points.
numPoints = 100; points2 = selectUniform(points1,numPoints,size(im));
Plot images showing original and subset of points.
subplot(1, 2, 2); imshow(im); hold on plot(points2); hold off title('Uniformly distributed points');
Input Arguments
points
— Points object
KAZEPoints
object | CornerPoints
object | BRISKPoints
object | SURFPoints
object | ORBPoints
object | SIFTPoints
Points object, specified as a points
object. The object
contains information about the feature points detected in the input image.
To obtain points, use the appropriate detect function.
N
— Number of points
integer
Number of uniformly distributed points to select, specified as an integer.
imageSize
— Size of image
2-element vector | 3-element vector
Size of image, specified as a 2-element vector for grayscale images or a 3-element vector for truecolor images.
Version History
See Also
Functions
detectKAZEFeatures
|detectBRISKFeatures
|detectFASTFeatures
|detectMinEigenFeatures
|detectHarrisFeatures
|detectORBFeatures
|detectSIFTFeatures
|extractFeatures
|matchFeatures
|detectSURFFeatures
Objects
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)