Make sure non-zero values are treated as True

This commit is contained in:
Johannes Schönberger
2013-03-27 22:25:59 +01:00
parent a784e28012
commit 23cf8b7dfb
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ __all__ = ['bilateral_mean', 'bilateral_pop']
def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y, s0, s1):
selem = img_as_ubyte(selem)
selem = img_as_ubyte(selem > 0)
image = np.ascontiguousarray(image)
if mask is None:
+1 -1
View File
@@ -35,7 +35,7 @@ __all__ = ['percentile_autolevel', 'percentile_gradient',
def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y, p0, p1):
selem = img_as_ubyte(selem)
selem = img_as_ubyte(selem > 0)
image = np.ascontiguousarray(image)
if mask is None:
+1 -1
View File
@@ -28,7 +28,7 @@ __all__ = ['autolevel', 'bottomhat', 'equalize', 'gradient', 'maximum', 'mean',
def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y):
selem = img_as_ubyte(selem)
selem = img_as_ubyte(selem > 0)
image = np.ascontiguousarray(image)
if mask is None: