FeatureMatch#

class FeatureMatch(m, fv1: BaseFeature2D, fv2: BaseFeature2D, inliers=None)[source]#

Create feature match object

Parameters:
  • m (list of tuples (int, int, float)) – a list of match tuples (id1, id2, distance)

  • fv1 (BaseFeature2D) – first set of features

  • fv2 (class:BaseFeature2D) – second set of features

  • inliers (array_like of bool) – inlier status

A FeatureMatch object describes a set of correspondences between two feature sets. The object is constructed from two feature sets and a list of tuples (id1, id2, distance) where id1 and id2 are indices into the first and second feature sets. distance is the distance between the feature’s descriptors.

A FeatureMatch object:

  • has a length, the number of matches it contains

  • can be sliced to extract a subset of matches

  • inlier/outlier status of matches

Note

This constructor would not be called directly, it is used by the match method of the BaseFeature2D subclass.

Seealso:

BaseFeature2D.match cv2.KeyPoint

Methods

by_id1(id)

Find match by feature id in first set

by_id2(i)

Find match by feature id in second set

correspondence()

Feature correspondences

estimate(func[, method])

list()

List matches

plot(*pos[, darken, ax, width, block])

Plot matches

plot_correspondence(*arg[, offset])

subset([N])

Select subset of features

table()

Print matches in tabular form

Properties

descriptor1

Feature descriptor in first image

descriptor2

Feature descriptor in second image

distance

Distance between corresponding features

id1

Feature id in first image

id2

Feature id in second image

inliers

Extract inlier matches

outliers

Extract outlier matches

p1

Feature coordinate in first image

p2

Feature coordinate in second image

status

Inlier status of matches