skimage2.feature.plot_matched_features#
- skimage2.feature.plot_matched_features(image0, image1, *, keypoints0, keypoints1, matches, ax, keypoints_color='k', matches_color=None, only_matches=False, alignment='horizontal')[source]#
Plot matched features between two images.
Added in version 0.23.
- Parameters:
- image0(N, M [, 3]) array
First image.
- image1(N, M [, 3]) array
Second image.
- keypoints0ndarray of shape (K1, 2)
First keypoint coordinates as
(row, col).- keypoints1ndarray 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.- axmatplotlib.axes.Axes
The Axes object where the images and their matched features are drawn.
- keypoints_colormatplotlib color, optional
Color for keypoint locations.
- matches_colormatplotlib 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_matchesbool, 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_colorwork for any number ofmatches, you can wrap that sequence initertools.cycle().References