main content

extract interest point descriptors -凯发k8网页登录

extract interest point descriptors

description

example

[features,validpoints] = extractfeatures(i,points) returns extracted feature vectors, also known as descriptors, and their corresponding locations, from a binary or intensity image.

the function derives the descriptors from pixels surrounding an interest point. the pixels represent and match features specified by a single-point location. each single-point specifies the center location of a neighborhood. the method you use for descriptor extraction depends on the class of the input points.

example

[features,validpoints] = extractfeatures(i,points,name=value) specifies options using one or more name-value arguments in addition to any combination of arguments from previous syntaxes. for example, extractfeatures(i,points,method="block") sets the method to extract descriptors to block.

examples

read the image.

i = imread("cameraman.tif");

find and extract corner features from the image.

corners = detectharrisfeatures(i);
[features,valid_corners] = extractfeatures(i,corners);

display image.

figure;
imshow(i); 
hold on

plot valid corner points.

plot(valid_corners);

figure contains an axes object. the axes object contains 2 objects of type image, line. one or more of the lines displays its values using only markers

read image.

i = imread("cameraman.tif");

find and extract features from the input image.

points = detectsurffeatures(i);
[features,valid_points] = extractfeatures(i,points);

display and plot ten strongest surf features.

figure;
imshow(i);
hold on;
plot(valid_points.selectstrongest(10),showorientation=true);

figure contains an axes object. the axes object contains 3 objects of type image, line. one or more of the lines displays its values using only markers

read image.

i = imread("cameraman.tif");

find features in the image using mser feature detection.

regions = detectmserfeatures(i);
[features,valid_points] = extractfeatures(i,regions,upright=true);

display features corresponding to the mser ellipse centers.

figure;
imshow(i);
hold on;
plot(valid_points,showorientation=true);

figure contains an axes object. the axes object contains 3 objects of type image, line. one or more of the lines displays its values using only markers

input arguments

input image, specified as either a binary or 2-d grayscale image.

data types: logical | single | double | int16 | uint8 | uint16

center location point of a square neighborhood,specified as an m-by-2 matrix of m number of [x y] coordinates, or as one of the point feature objects described in . the table lists the possible input classes of points that can be used for extraction.

name-value arguments

specify optional pairs of arguments as name1=value1,...,namen=valuen, where name is 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.

example: extractfeatures(i,points,method="block") sets the method to extract descriptors to block.

descriptor extraction method, specified as one of the point feature objects described in or "auto".

the table describes how the function implements the descriptor extraction methods:

methodfeature vector (descriptor)
sift

scale-invariant feature transform (sift).

the function sets the orientation property of the validpoints output object to the orientation of the extracted features, in radians.

brisk

binary robust invariant scalable keypoints (brisk).

the function sets the orientation property of the validpoints output object to the orientation of the extracted features, in radians.

freak

fast retina keypoint (freak).

the function sets the orientation property of the validpoints output object to the orientation of the extracted features, in radians.

surf

speeded-up robust features (surf).

the function sets the orientation property of the validpoints output object to the orientation of the extracted features, in radians.

when you use an mserregions object with the surf method, the centroid property of the object extracts surf descriptors. the axes property of the object selects the scale of the surf descriptors such that the circle representing the feature has an area proportional to the mser ellipse area. the scale is calculated as 1/4*sqrt((majoraxes/2).*(minoraxes/2)) and saturated to 1.6, as required by the surfpoints object.

orb

oriented fast and rotated brief (orb) features.

the orientation property of the validpoints output object is automatically set to the orientation property of the input orbpoints object points.

kaze

non-linear pyramid-based features.

the function sets the orientation property of the validpoints output object to the orientation of the extracted features, in radians.

when you use an mserregions object with the kaze method, the location property of the object is used to extract kaze descriptors.

the axes property of the object selects the scale of the kaze descriptors such that the circle representing the feature has an area proportional to the mser ellipse area.

block

simple square neighbhorhood.

the block method extracts only the neighborhoods fully contained within the image boundary. therefore, the output, validpoints, can contain fewer points than the input points.

auto

the function selects the method, based on the class of the input points and implements:

the freak method for a input object.
the surf method for a or input object.
the brisk method for a input object.
the orb method for a input object.

for an m-by-2 input matrix of [x y] coordinates, the function implements the block method.

note

the descriptor extraction method must be orb, if the input points is an object. also, orb descriptor extraction method is not supported for any other class of points, except .

block size, specified as an odd integer scalar. this value defines the local square neighborhood blocksize-by-blocksize, centered at each interest point. this option applies only when the function implements the block method.

rotation invariance flag, specified a logical scalar. when you set this property to true, the orientation of the feature vectors are not estimated and the feature orientation is set to pi/2. set this to true when you do not need the image descriptors to capture rotation information. when you set this property to false, the orientation of the features is estimated and the features are then invariant to rotation.

note

the rotation invariance flag "upright" is not supported if the input points is an orbpoints object.

length of the feature vector (descriptor), specified as 64 or 128. this option applies only when the function implements the surf or kaze method. the larger feature size of 128 provides greater accuracy, but decreases the feature matching speed.

output arguments

feature vectors, returned as a object or an m-by-n matrix of m feature vectors, also known as descriptors. each descriptor is of length n.

valid points associated with each output feature vector (descriptor) in features, returned in the same format as the input. valid points can be an m-by-2 matrix of [x,y] coordinates or as one of the point feature objects described in .

the function extracts descriptors from a region around each interest point. if the region lies outside of the image, or if interest point lies too close to the edge of the image, the function cannot compute the feature descriptor. in this case, the function ignores the point. the point is not included in the valid points output.

for sift features, more than one descriptor can be extracted at a single location, but at different orientations. therefore, the number of points returned in validpoints can be greater than or equal to the number of input points to extractfeatures. for input feature points other than sift, validpoints can be less than or equal to the number of input points.

references

[1] g. bradski and a. kaehler, learning opencv : computer vision with the opencv library, o'reilly, sebastopol, ca, 2008.

[2] herbert bay, andreas ess, tinne tuytelaars, luc van gool, surf: speeded up robust features", computer vision and image understanding (cviu), vol. 110, no. 3, pp. 346--359, 2008

[3] bay, herbert, andreas ess, tinne tuytelaars, and luc van gool, "surf: speeded up robust features", computer vision and image understanding (cviu), vol. 110, no. 3, pp. 346--359, 2008.

[4] alahi, alexandre, ortiz, raphael, and pierre vandergheynst, "freak: fast retina keypoint", ieee conference on computer vision and pattern recognition, 2012.

[5] alcantarilla, p.f., a. bartoli, and a.j. davison. "kaze features", eccv 2012, part vi, lncs 7577 pp. 214, 2012

extended capabilities

version history

introduced in r2011a

网站地图