Skip to content

Commit 4a634a2

Browse files
Merge pull request #2377 from diegocatalao:fix/deprecated-import-plot-matches
PiperOrigin-RevId: 752645444
2 parents a8576ce + 6045090 commit 4a634a2

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

site/en/hub/tutorials/tf_hub_delf_module.ipynb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"import numpy as np\n",
116116
"from PIL import Image, ImageOps\n",
117117
"from scipy.spatial import cKDTree\n",
118-
"from skimage.feature import plot_matches\n",
118+
"from skimage.feature import plot_matched_features\n",
119119
"from skimage.measure import ransac\n",
120120
"from skimage.transform import AffineTransform\n",
121121
"from six import BytesIO\n",
@@ -326,16 +326,20 @@
326326
" # Visualize correspondences.\n",
327327
" _, ax = plt.subplots()\n",
328328
" inlier_idxs = np.nonzero(inliers)[0]\n",
329-
" plot_matches(\n",
330-
" ax,\n",
329+
" plot_matched_features(\n",
331330
" image1,\n",
332331
" image2,\n",
333-
" locations_1_to_use,\n",
334-
" locations_2_to_use,\n",
335-
" np.column_stack((inlier_idxs, inlier_idxs)),\n",
336-
" matches_color='b')\n",
332+
" keypoints0=locations_1_to_use,\n",
333+
" keypoints1=locations_2_to_use,\n",
334+
" matches=np.column_stack((inlier_idxs, inlier_idxs)),\n",
335+
" ax=ax,\n",
336+
" )\n",
337+
"\n",
337338
" ax.axis('off')\n",
338-
" ax.set_title('DELF correspondences')\n"
339+
" ax.set_title('DELF correspondences')\n",
340+
"\n",
341+
" for line in ax.lines:\n",
342+
" line.set_color('b')\n"
339343
]
340344
},
341345
{

0 commit comments

Comments
 (0)