8000 Fix deprecated import from plot_matches to plot_matched_features by diegocatalao · Pull Request #2377 · tensorflow/docs · GitHub
[go: up one dir, main page]

Skip to content

Fix deprecated import from plot_matches to plot_matched_features #2377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statem 8000 ent. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions site/en/hub/tutorials/tf_hub_delf_module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"import numpy as np\n",
"from PIL import Image, ImageOps\n",
"from scipy.spatial import cKDTree\n",
"from skimage.feature import plot_matches\n",
"from skimage.feature import plot_matched_features\n",
"from skimage.measure import ransac\n",
"from skimage.transform import AffineTransform\n",
"from six import BytesIO\n",
Expand Down Expand Up @@ -326,16 +326,20 @@
" # Visualize correspondences.\n",
" _, ax = plt.subplots()\n",
" inlier_idxs = np.nonzero(inliers)[0]\n",
" plot_matches(\n",
" ax,\n",
" plot_matched_features(\n",
" image1,\n",
" image2,\n",
" locations_1_to_use,\n",
" locations_2_to_use,\n",
" np.column_stack((inlier_idxs, inlier_idxs)),\n",
" matches_color='b')\n",
" keypoints0=locations_1_to_use,\n",
" keypoints1=locations_2_to_use,\n",
" matches=np.column_stack((inlier_idxs, inlier_idxs)),\n",
" ax=ax,\n",
" )\n",
"\n",
" ax.axis('off')\n",
" ax.set_title('DELF correspondences')\n"
" ax.set_title('DELF correspondences')\n",
"\n",
" for line in ax.lines:\n",
" line.set_color('b')\n"
]
},
{
Expand Down
0