Unique rows after getting the pixel corners

This commit is contained in:
Juan Nunez-Iglesias
2013-08-05 10:09:37 +10:00
parent a6ec1741dc
commit b03fa92478
+1 -2
View File
@@ -38,7 +38,6 @@ def convex_hull_image(image):
coords = possible_hull(image.astype(np.uint8))
# repeated coordinates can *sometimes* cause problems in
# scipy.spatial.Delaunay, so we remove them.
coords = unique_rows(coords)
N = len(coords)
# Add a vertex for the middle of each pixel edge
@@ -47,7 +46,7 @@ def convex_hull_image(image):
(-0.5, 0.5, 0, 0))):
coords_corners[i * N:(i + 1) * N] = coords + [x_offset, y_offset]
coords = coords_corners
coords = unique_rows(coords_corners)
try:
from scipy.spatial import Delaunay