M-File Help: FeatureMatch View code for FeatureMatch

FeatureMatch

Feature correspondence object

This class represents the correspondence between two PointFeature objects. A vector of FeatureMatch objects can represent the correspondence between sets of points.

Methods

plot Plot corresponding points
show Show summary statistics of corresponding points
ransac Determine inliers and outliers
inlier Return inlier matches
outlier Return outlier matches
subset Return a subset of matches
display Display value of match
char Convert value of match to string

Properties

p1 Point coordinates in view 1 (2x1)
p2 Point coordinates in view 2 (2x1)
p Point coordinates in view 1 and 2 (4x1)
distance Match strength between the points

Properties of a vector of FeatureMatch objects are returned as a vector. If F is a vector (Nx1) of FeatureMatch objects then F.p1 is a 2xN matrix with each column the corresponding view 1 point coordinate.

Note

See also

PointFeature, SurfPointFeature, SiftPointFeature


FeatureMatch.FeatureMatch

Create a new FeatureMatch object

m = FeatureMatch(f1, f2, s) is a new FeatureMatch object describing a correspondence between point features f1 and f2 with a strength of s.

m = FeatureMatch(f1, f2) as above but the strength is set to NaN.

Notes

See also

PointFeature, SurfPointFeature, SiftPointFeature


FeatureMatch.char

Convert to string

s = M.char() is a compact string representation of the match object. If M is a vector then the string has multiple lines, one per element.


FeatureMatch.display

Display value

M.display() displays a compact human-readable representation of the feature pair. If M is a vector then the elements are printed one per line.

Notes

See also

FeatureMatch.char


FeatureMatch.inlier

Inlier features

m2 = M.inlier() is a subset of the FeatureMatch vector M that are considered to be inliers.

Notes

See also

FeatureMatch.outlier, FeatureMatch.ransac


FeatureMatch.outlier

Outlier features

m2 = M.outlier() is a subset of the FeatureMatch vector M that are considered to be outliers.

Notes

See also

FeatureMatch.inlier, FeatureMatch.ransac


FeatureMatch.p

Feature point coordinate pairs

p = M.p() is a 4xN matrix containing the feature point coordinates. Each column contains the coordinates of a pair of corresponding points [u1,v1,u2,v2].

See also

FeatureMatch.p1, FeatureMatch.p2


FeatureMatch.p1

Feature point coordinates from view 1

p = M.p1() is a 2xN matrix containing the feature points coordinates from view 1. These are the (u,v) properties of the feature F1 passed to the constructor.

See also

FeatureMatch.FeatureMatch, FeatureMatch.p2, FeatureMatch.p


FeatureMatch.p2

Feature point coordinates from view 2

p = M.p2() is a 2xN matrix containing the feature points coordinates from view 1. These are the (u,v) properties of the feature F2 passed to the constructor.

See also

FeatureMatch.FeatureMatch, FeatureMatch.p1, FeatureMatch.p


FeatureMatch.plot

Show corresponding points

M.plot() overlays the correspondences in the FeatureMatch vector M on the current figure. The figure must comprise views 1 and 2 side by side, for example by:

idisp({im1,im2})
m.plot()

M.plot(ls) as above but the optional line style arguments ls are passed to plot.

Notes

See also

idisp


FeatureMatch.ransac

Apply RANSAC

M.ransac(func, options) applies the RANSAC algorithm to fit the point correspondences to the model described by the function func. The options are passed to the RANSAC() function. Elements of the FeatureMatch vector have their status updated in place to indicate whether they are inliers or outliers.

Example

f1 = isurf(im1);
f2 = isurf(im2);
m = f1.match(f2);
m.ransac( @fmatrix, 1e-4);

See also

fmatrix, homography, ransac


FeatureMatch.show

Display summary statistics of the FeatureMatch vector

M.show() is a compact summary of the FeatureMatch vector M that gives the number of matches, inliers and outliers (and their percentages).


FeatureMatch.subset

Subset of matches

m2 = M.subset(n) is a FeatureMatch vector with no more than n elements sampled uniformly from M.


 

© 1990-2012 Peter Corke.