extract interest point descriptors -凯发k8网页登录
extract interest point descriptors
syntax
description
[
returns
extracted feature vectors, also known as descriptors, and their corresponding
locations, from a binary or intensity image.features
,validpoints
]
= extractfeatures(i
,points
)
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
.
[
specifies options using one or more name-value arguments in addition to any
combination of arguments from previous syntaxes. for example,
features
,validpoints
]
= extractfeatures(i
,points
,name=value
)extractfeatures(i,points,method="block")
sets the method to
extract descriptors to block
.
examples
extract corner features from an image.
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);
extract surf features from an image
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);
extract mser features from an image
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);
input arguments
i
— input image
binary image | m-by-n 2-d grayscale
image
input image, specified as either a binary or 2-d grayscale image.
data types: logical
| single
| double
| int16
| uint8
| uint16
points
— center location point
m-by-2 matrix | point feature object
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
.
method
— descriptor extraction method
"auto"
| point feature object | m-by-2 matrix
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:
method | feature vector (descriptor) | ||||
---|---|---|---|---|---|
sift | scale-invariant feature transform (sift). the function sets the | ||||
brisk | binary robust invariant scalable keypoints (brisk). the function sets the | ||||
freak | fast retina keypoint (freak). the function sets the
| ||||
surf | speeded-up robust features (surf). the function sets the when you use an | ||||
orb | oriented fast and rotated brief (orb) features. the | ||||
kaze | non-linear pyramid-based features. the function sets the
when you use an
the | ||||
block | simple square neighbhorhood. the | ||||
auto | the function selects the
for an
m-by-2 input matrix of
[x
y] coordinates, the function
implements the |
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 .
blocksize
— block size
11
(default) | odd integer scalar
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.
upright
— rotation invariance flag
false
| logical scalar
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.
featuresize
— length of feature vector
64
(default) | 128
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
features
— feature vectors
m-by-n matrix | binaryfeatures
object
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.
validpoints
— valid points
m-by-2 matrix of
[x,y] coordinates | point feature object
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
c/c code generation
generate c and c code using matlab® coder™.
usage notes and limitations:
'method'
must be a compile-time constant.supports matlab® function block for
brisk
,freak
, andsurf
methods only.generates portable c code using a c compiler that links to opencv libraries for
sift
,brisk
,orb
,freak
, andsurf
methods. see .the
kaze
method and the function do not support code generation.
version history
introduced in r2011a
see also
打开示例
您曾对此示例进行过修改。是否要打开带有您的编辑的示例?
matlab 命令
您点击的链接对应于以下 matlab 命令:
请在 matlab 命令行窗口中直接输入以执行命令。web 浏览器不支持 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
- (español)
- (english)
- (english)
europe
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
asia pacific
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)