mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 16:32:32 +08:00
fix doctest in rank
This commit is contained in:
+13
-13
@@ -78,9 +78,9 @@ def autolevel(image, selem, out=None, mask=None, shift_x=False, shift_y=False):
|
||||
... [0, 0, 0, 0, 0]], dtype=np.uint16)
|
||||
>>> autolevel(ima16, square(3))
|
||||
array([[ 0, 0, 0, 0, 0],
|
||||
[ 0, 4096, 4096, 4096, 0],
|
||||
[ 0, 4096, 0, 4096, 0],
|
||||
[ 0, 4096, 4096, 4096, 0],
|
||||
[ 0, 4095, 4095, 4095, 0],
|
||||
[ 0, 4095, 0, 4095, 0],
|
||||
[ 0, 4095, 4095, 4095, 0],
|
||||
[ 0, 0, 0, 0, 0]], dtype=uint16)
|
||||
|
||||
"""
|
||||
@@ -218,11 +218,11 @@ def equalize(image, selem, out=None, mask=None, shift_x=False, shift_y=False):
|
||||
... [0, 1, 1, 1, 0],
|
||||
... [0, 0, 0, 0, 0]], dtype=np.uint16)
|
||||
>>> equalize(ima16, square(3))
|
||||
array([[3072, 2730, 2048, 2730, 3072],
|
||||
[2730, 4096, 4096, 4096, 2730],
|
||||
[2048, 4096, 4096, 4096, 2048],
|
||||
[2730, 4096, 4096, 4096, 2730],
|
||||
[3072, 2730, 2048, 2730, 3072]], dtype=uint16)
|
||||
array([[3071, 2730, 2047, 2730, 3071],
|
||||
[2730, 4095, 4095, 4095, 2730],
|
||||
[2047, 4095, 4095, 4095, 2047],
|
||||
[2730, 4095, 4095, 4095, 2730],
|
||||
[3071, 2730, 2047, 2730, 3071]], dtype=uint16)
|
||||
"""
|
||||
selem = img_as_ubyte(selem)
|
||||
if mask is not None:
|
||||
@@ -502,11 +502,11 @@ def meansubstraction(image, selem, out=None, mask=None, shift_x=False, shift_y=F
|
||||
... [0, 1, 1, 1, 0],
|
||||
... [0, 0, 0, 0, 0]], dtype=np.uint16)
|
||||
>>> meansubstraction(ima16, square(3))
|
||||
array([[1536, 1365, 1024, 1365, 1536],
|
||||
[1365, 3185, 2730, 3185, 1365],
|
||||
[1024, 2730, 2048, 2730, 1024],
|
||||
[1365, 3185, 2730, 3185, 1365],
|
||||
[1536, 1365, 1024, 1365, 1536]], dtype=uint16)
|
||||
array([[1535, 1364, 1023, 1364, 1535],
|
||||
[1364, 3184, 2729, 3184, 1364],
|
||||
[1023, 2729, 2047, 2729, 1023],
|
||||
[1364, 3184, 2729, 3184, 1364],
|
||||
[1535, 1364, 1023, 1364, 1535]], dtype=uint16)
|
||||
|
||||
"""
|
||||
selem = img_as_ubyte(selem)
|
||||
|
||||
Reference in New Issue
Block a user