erode & dilate -> private functions

This commit is contained in:
François Boulogne
2013-07-06 14:30:17 +02:00
parent e5e0c73755
commit e74b971335
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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)