mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-15 11:25:53 +08:00
ENH: Rename convex_hull to convex_hull_image to allow later clean API addition of convex_hull with labels.
This commit is contained in:
@@ -3,4 +3,4 @@ from selem import *
|
||||
from .ccomp import label
|
||||
from watershed import watershed, is_local_maximum
|
||||
from skeletonize import skeletonize, medial_axis
|
||||
from .convex_hull import convex_hull
|
||||
from .convex_hull import convex_hull_image
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
__all__ = ['convex_hull']
|
||||
__all__ = ['convex_hull_image']
|
||||
|
||||
import numpy as np
|
||||
from ._pnpoly import points_inside_poly, grid_points_inside_poly
|
||||
from ._convex_hull import possible_hull
|
||||
|
||||
def convex_hull(image):
|
||||
"""Compute the convex hull of a binary image.
|
||||
def convex_hull_image(image):
|
||||
"""Compute the convex hull image of a binary image.
|
||||
|
||||
The convex hull is the set of pixels included in the smallest convex
|
||||
polygon that surround all white pixels in the input image.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
from numpy.testing import assert_array_equal
|
||||
from numpy.testing.decorators import skipif
|
||||
from skimage.morphology import convex_hull
|
||||
from skimage.morphology import convex_hull_image
|
||||
from skimage.morphology._convex_hull import possible_hull
|
||||
|
||||
try:
|
||||
@@ -28,7 +28,7 @@ def test_basic():
|
||||
[0, 1, 1, 1, 1, 1, 1, 1, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
|
||||
|
||||
assert_array_equal(convex_hull(image), expected)
|
||||
assert_array_equal(convex_hull_image(image), expected)
|
||||
|
||||
@skipif(not scipy_spatial)
|
||||
def test_possible_hull():
|
||||
|
||||
Reference in New Issue
Block a user