{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / feature / util / plot_matched_features

function

skimage.feature.util:plot_matched_features

source: /dev/scikit-image/src/skimage/feature/util.py :44

Signature

def   plot_matched_features ( image0 image1 * keypoints0 keypoints1 matches ax keypoints_color = k matches_color = None only_matches = False alignment = horizontal )

Summary

Plot matched features between two images.

Extended Summary

Parameters

image0 : (N, M [, 3]) array

First image.

image1 : (N, M [, 3]) array

Second image.

keypoints0 : ndarray of shape (K1, 2)

First keypoint coordinates as (row, col).

keypoints1 : ndarray of shape (K2, 2)

Second keypoint coordinates as (row, col).

matches : (Q, 2) array

Indices of corresponding matches in first and second sets of descriptors, where matches[:, 0] (resp. matches[:, 1]) contains the indices in the first (resp. second) set of descriptors.

ax : matplotlib.axes.Axes

The Axes object where the images and their matched features are drawn.

keypoints_color : matplotlib color, optional

Color for keypoint locations.

matches_color : matplotlib color or sequence thereof, optional

Single color or sequence of colors for each line defined by matches, which connect keypoint matches. See [1] for an overview of supported color formats. By default, colors are picked randomly.

only_matches : bool, optional

Set to True to plot matches only and not the keypoint locations.

alignment : {'horizontal', 'vertical'}, optional

Whether to show the two images side by side ('horizontal'), or one above the other ('vertical').

Notes

To make a sequence of colors passed to matches_color work for any number of matches, you can wrap that sequence in itertools.cycle.

Aliases

  • skimage.feature.plot_matched_features