mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-09 17:31:34 +08:00
erode & dilate -> private functions
This commit is contained in:
@@ -8,7 +8,7 @@ cimport numpy as np
|
||||
from libc.stdlib cimport malloc, free
|
||||
|
||||
|
||||
def dilate(np.ndarray[np.uint8_t, ndim=2] image,
|
||||
def _dilate(np.ndarray[np.uint8_t, ndim=2] image,
|
||||
np.ndarray[np.uint8_t, ndim=2] selem,
|
||||
np.ndarray[np.uint8_t, ndim=2] out=None,
|
||||
char shift_x=0, char shift_y=0):
|
||||
@@ -63,7 +63,7 @@ def dilate(np.ndarray[np.uint8_t, ndim=2] image,
|
||||
return out
|
||||
|
||||
|
||||
def erode(np.ndarray[np.uint8_t, ndim=2] image,
|
||||
def _erode(np.ndarray[np.uint8_t, ndim=2] image,
|
||||
np.ndarray[np.uint8_t, ndim=2] selem,
|
||||
np.ndarray[np.uint8_t, ndim=2] out=None,
|
||||
char shift_x=0, char shift_y=0):
|
||||
|
||||
@@ -58,7 +58,7 @@ def erosion(image, selem, out=None, shift_x=False, shift_y=False):
|
||||
raise NotImplementedError("In-place erosion not supported!")
|
||||
image = img_as_ubyte(image)
|
||||
selem = img_as_ubyte(selem)
|
||||
return cmorph.erode(image, selem, out=out,
|
||||
return cmorph._erode(image, selem, out=out,
|
||||
shift_x=shift_x, shift_y=shift_y)
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ def dilation(image, selem, out=None, shift_x=False, shift_y=False):
|
||||
raise NotImplementedError("In-place dilation not supported!")
|
||||
image = img_as_ubyte(image)
|
||||
selem = img_as_ubyte(selem)
|
||||
return cmorph.dilate(image, selem, out=out,
|
||||
return cmorph._dilate(image, selem, out=out,
|
||||
shift_x=shift_x, shift_y=shift_y)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user