mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-06 13:30:21 +08:00
Unique rows after getting the pixel corners
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user