simplify modification image + comment

This commit is contained in:
François Boulogne
2013-07-07 12:21:34 +02:00
parent 7048a9c995
commit acdfd8bc71
+9 -2
View File
@@ -30,8 +30,15 @@ image = np.array(
original_image = np.copy(image)
chull = convex_hull_image(image)
image[chull] += 1.7
image -= -1.7
image[chull] += 1
# image is now:
#[[ 0. 0. 0. 0. 0. 0. 0. 0. 0.]
# [ 0. 0. 0. 0. 2. 0. 0. 0. 0.]
# [ 0. 0. 0. 2. 1. 2. 0. 0. 0.]
# [ 0. 0. 2. 1. 1. 1. 2. 0. 0.]
# [ 0. 2. 1. 1. 1. 1. 1. 2. 0.]
# [ 0. 0. 0. 0. 0. 0. 0. 0. 0.]]
fig = plt.subplots(figsize=(10, 6))
plt.subplot(1, 2, 1)