Main Content

KAZEPoints

Object for storing KAZE interest points

Description

This object provides the ability to pass data between the detectKAZEFeatures and extractFeatures functions. You can also use this object to manipulate and plot the data returned by these functions. Use the object to fill points interactively, where you might want to mix a non-KAZE interest point detector with a KAZE descriptor.

Creation

Description

points = KAZEPoints(location) constructs a KAZEPoints object from an M-by-2 array [x y] of location coordinates.

The scalar KAZEPoints object contains many points. Therefore numel(KAZEPoints) always returns 1. This value can be different than the result of length(KAZEPoints), which returns the true number of points contained in the object.

example

points = KAZEPoints(location,Name=Value) specifies options using one or more name-value arguments in addition to any combination of arguments from previous syntaxes. For example, points = KAZEPoints(Metric=10) sets the strength of detected KAZE features to 10.

example

Input Arguments

expand all

Location of points, specified as an M-by-2 array of [x y] coordinates.

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: points = KAZEPoints(Metric=10) sets the strength of detected KAZE features to 10.

Scale, specified as a scalar or an or M-element vector. The scale sets the size at which the interest points are detected and must be a value greater than or equal to 1.6.

Strength of detected features, specified as a numeric scalar. The KAZE algorithm uses a determinant of an approximated Hessian.

Orientation of the detected feature, specified as an angle in radians. The angle is measured from the x-axis with the origin set by the location input. Orientation property can be useful for visualizations. The extractFeatures function sets this property. Do not set it manually.

Properties

expand all

This property is read-only.

Location of points, specified as an M-by-2 matrix. Each row is of the form [x y] and represents the location of a point. M is the number of points. You cannot set this property, use the location input argument instead.

This property is read-only.

Number of points held by the object, specified as a nonnegative integer.

Object Functions

isemptyDetermine if points object is empty
lengthNumber of stored points
plotPlot points
selectStrongestSelect points with strongest metrics
sizeReturn size of points object
selectUniformSelect uniformly distributed subset of point features
selectSelect point or region features during code generation

Examples

collapse all

Detect KAZE features and display 10 strongest points.

Read an image.

I = imread('cameraman.tif');

Detect KAZE features in the image.

points = detectKAZEFeatures(I);

Select the 10 strongest points.

strongest = selectStrongest(points,10);

Display the selected points.

 imshow(I);
 hold on;

Display the location and scale. The size of the circles displayed relate to the scale.

plot(strongest);
hold on;

Figure contains an axes object. The hidden axes object contains 3 objects of type image, line. One or more of the lines displays its values using only markers

Display the [x y] coordinates for the strongest points in the MATLAB Command Window.

strongest.Location
ans = 10x2 single matrix

  138.5041   95.8063
  139.9253   95.8802
  111.8975   48.2950
  106.4036  174.1800
   44.3964  106.4899
  122.0368   65.9064
  116.2702  138.2877
  123.6542   64.7193
  104.2719   76.5821
  140.6228   97.9271

Read an image into the workspace.

I = imread("cameraman.tif");

Detect KAZE features in the image.

points = detectKAZEFeatures(I);

Select and display the last 5 points detected.

imshow(I);
hold on;
plot(points(end-4:end));
hold off;

Figure contains an axes object. The hidden axes object contains 3 objects of type image, line. One or more of the lines displays its values using only markers

Tips

  • Although KAZEPoints may hold many points, it is a scalar object. Therefore, numel(points) always returns 1. This value may differ from the resulting value of length(points), which returns the true number of points held by the object.

Extended Capabilities

Version History

Introduced in R2017b