From 4ae63bb3889465255b127369bebfac931e06cdbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gr=C3=BCter?= Date: Sun, 28 Aug 2022 13:47:47 +0200 Subject: [PATCH] Tweak segmentation parameters in solution For some reason active_contour and random_walker return different results now. Earlier dependencies were not tested. The results with tweaked active_contour and random_walker (as before excpect for fixed indexing) are similar if slightly worse than before. --- lectures/solutions/4_segmentation.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lectures/solutions/4_segmentation.ipynb b/lectures/solutions/4_segmentation.ipynb index 58ddf5e..b99ab22 100644 --- a/lectures/solutions/4_segmentation.ipynb +++ b/lectures/solutions/4_segmentation.ipynb @@ -361,7 +361,7 @@ "metadata": {}, "outputs": [], "source": [ - "snake = seg.active_contour(astronaut_gray, points, alpha=0.1, w_edge=1.3)" + "snake = seg.active_contour(astronaut_gray, points, alpha=0.1)" ] }, { @@ -459,7 +459,7 @@ "indices = draw.circle_perimeter(100, 220, 25)\n", "\n", "astronaut_labels[indices] = 1\n", - "astronaut_labels[points[:, 1].astype(np.int), points[:, 0].astype(np.int)] = 2\n", + "astronaut_labels[points[:, 0].astype(int), points[:, 1].astype(int)] = 2\n", "\n", "image_show(astronaut_labels);" ]