From 23f5ae5bb7c8deb98d08376f94100b19497c46cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sun, 1 Dec 2013 11:34:59 +0100 Subject: [PATCH] Fix plot_matching example --- doc/examples/plot_matching.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/examples/plot_matching.py b/doc/examples/plot_matching.py index 9fa0b41c..5812fa37 100644 --- a/doc/examples/plot_matching.py +++ b/doc/examples/plot_matching.py @@ -123,15 +123,15 @@ fig, ax = plt.subplots(nrows=2, ncols=1) plt.gray() -inlier_idxs = np.nonzero(inliers) +inlier_idxs = np.nonzero(inliers)[0] plot_matches(ax[0], img_orig_gray, img_warped_gray, src, dst, - inlier_idxs, inlier_idxs, matches_color='b') + np.column_stack((inlier_idxs, inlier_idxs)), matches_color='b') ax[0].axis('off') ax[0].set_title('Correct correspondences') -outlier_idxs = np.nonzero(outliers) +outlier_idxs = np.nonzero(outliers)[0] plot_matches(ax[1], img_orig_gray, img_warped_gray, src, dst, - outlier_idxs, outlier_idxs, matches_color='r') + np.column_stack((outlier_idxs, outlier_idxs)), matches_color='r') ax[1].axis('off') ax[1].set_title('Faulty correspondences')