|
115 | 115 | "import numpy as np\n",
|
116 | 116 | "from PIL import Image, ImageOps\n",
|
117 | 117 | "from scipy.spatial import cKDTree\n",
|
118 |
| - "from skimage.feature import plot_matches\n", |
| 118 | + "from skimage.feature import plot_matched_features\n", |
119 | 119 | "from skimage.measure import ransac\n",
|
120 | 120 | "from skimage.transform import AffineTransform\n",
|
121 | 121 | "from six import BytesIO\n",
|
|
326 | 326 | " # Visualize correspondences.\n",
|
327 | 327 | " _, ax = plt.subplots()\n",
|
328 | 328 | " inlier_idxs = np.nonzero(inliers)[0]\n",
|
329 |
| - " plot_matches(\n", |
330 |
| - " ax,\n", |
| 329 | + " plot_matched_features(\n", |
331 | 330 | " image1,\n",
|
332 | 331 | " 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", |
337 | 338 | " 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" |
339 | 343 | ]
|
340 | 344 | },
|
341 | 345 | {
|
|
0 commit comments