diff --git a/skimage/filter/rank/_core16.pxd b/skimage/filter/rank/_core16.pxd index 92c6f7d6..5f7de9df 100644 --- a/skimage/filter/rank/_core16.pxd +++ b/skimage/filter/rank/_core16.pxd @@ -5,7 +5,7 @@ cdef int int_max(int a, int b) cdef int int_min(int a, int b) -# 16 bit core kernel receives extra information about data bitdepth +# 16-bit core kernel receives extra information about data bitdepth cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, Py_ssize_t, Py_ssize_t, Py_ssize_t, float, float, Py_ssize_t, Py_ssize_t), diff --git a/skimage/filter/rank/_core8.pxd b/skimage/filter/rank/_core8.pxd index 503d2df0..38236b87 100644 --- a/skimage/filter/rank/_core8.pxd +++ b/skimage/filter/rank/_core8.pxd @@ -10,7 +10,7 @@ cdef np.uint8_t is_in_mask(Py_ssize_t rows, Py_ssize_t cols, np.uint8_t * mask) -# 8 bit core kernel receives extra information about data inferior and superior +# 8-bit core kernel receives extra information about data inferior and superior # percentiles cdef void _core8(np.uint8_t kernel(Py_ssize_t *, float, np.uint8_t, float, float, Py_ssize_t, Py_ssize_t), diff --git a/skimage/filter/rank/bilateral_rank.pyx b/skimage/filter/rank/bilateral_rank.pyx index 73434bb5..0ec299b0 100644 --- a/skimage/filter/rank/bilateral_rank.pyx +++ b/skimage/filter/rank/bilateral_rank.pyx @@ -7,8 +7,8 @@ Reference: Huang, T. ,Yang, G. ; Tang, G.. "A fast two-dimensional median filtering algorithm", IEEE Transactions on Acoustics, Speech and Signal Processing, Feb 1979. Volume: 27 , Issue: 1, Page(s): 13 - 18. -Input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit), 8 bit -images are casted in 16 bit the number of histogram bins is determined from the +Input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit), 8-bit +images are casted in 16-bit the number of histogram bins is determined from the maximum value present in the image. The pixel neighborhood is defined by: @@ -19,7 +19,7 @@ The pixel neighborhood is defined by: The kernel is flat (i.e. each pixel belonging to the neighborhood contributes equally). -Result image is 16 bit with respect to the input image. +Result image is 16-bit with respect to the input image. """ @@ -115,9 +115,9 @@ def bilateral_mean(image, selem, out=None, mask=None, shift_x=False, Notes ----- - * input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit) + * input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit) - * 8 bit images are casted in 16 bit + * 8-bit images are casted in 16-bit Examples -------- diff --git a/skimage/filter/rank/percentile_rank.pyx b/skimage/filter/rank/percentile_rank.pyx index 5e506035..1c194f4b 100644 --- a/skimage/filter/rank/percentile_rank.pyx +++ b/skimage/filter/rank/percentile_rank.pyx @@ -11,11 +11,11 @@ Reference: Huang, T. ,Yang, G. ; Tang, G.. "A fast two-dimensional median filtering algorithm", IEEE Transactions on Acoustics, Speech and Signal Processing, Feb 1979. Volume: 27 , Issue: 1, Page(s): 13 - 18. -Input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit), for 16 bit +Input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit), for 16-bit input images, the number of histogram bins is determined from the maximum value present in the image. -Result image is 8 or 16 bit with respect to the input image. +Result image is 8 or 16-bit with respect to the input image. """ diff --git a/skimage/filter/rank/rank.pyx b/skimage/filter/rank/rank.pyx index 763a702f..02720216 100644 --- a/skimage/filter/rank/rank.pyx +++ b/skimage/filter/rank/rank.pyx @@ -5,11 +5,11 @@ Reference: Huang, T. ,Yang, G. ; Tang, G.. "A fast two-dimensional median filtering algorithm", IEEE Transactions on Acoustics, Speech and Signal Processing, Feb 1979. Volume: 27 , Issue: 1, Page(s): 13 - 18. -Input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit), for 16 bit +Input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit), for 16-bit input images, the number of histogram bins is determined from the maximum value present in the image. -Result image is 8 or 16 bit with respect to the input image. +Result image is 8 or 16-bit with respect to the input image. """ @@ -243,7 +243,7 @@ def maximum(image, selem, out=None, mask=None, shift_x=False, shift_y=False): Note ---- - * input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit) + * input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit) * the lower algorithm complexity makes the rank.maximum() more efficient for larger images and structuring elements @@ -402,7 +402,7 @@ def minimum(image, selem, out=None, mask=None, shift_x=False, shift_y=False): Note ---- - * input image can be 8 bit or 16 bit with a value < 4096 (i.e. 12 bit) + * input image can be 8-bit or 16-bit with a value < 4096 (i.e. 12 bit) * the lower algorithm complexity makes the rank.minimum() more efficient for larger images and structuring elements diff --git a/skimage/filter/rank/tests/test_rank.py b/skimage/filter/rank/tests/test_rank.py index 6a8a19d4..d8bcba52 100644 --- a/skimage/filter/rank/tests/test_rank.py +++ b/skimage/filter/rank/tests/test_rank.py @@ -108,7 +108,7 @@ def test_structuring_element8(): [ 0, 0, 0, 255, 255, 0], [ 0, 0, 0, 0, 0, 0]]) - # 8bit + # 8-bit image = np.zeros((6, 6), dtype=np.uint8) image[2, 2] = 255 elem = np.asarray([[1, 1, 0], [1, 1, 1], [0, 0, 1]], dtype=np.uint8) @@ -119,7 +119,7 @@ def test_structuring_element8(): shift_x=1, shift_y=1) assert_array_equal(r, out) - # 16bit + # 16-bit image = np.zeros((6, 6), dtype=np.uint16) image[2, 2] = 255 out = np.empty_like(image) @@ -171,8 +171,8 @@ def test_compare_autolevels(): assert_array_equal(loc_autolevel, loc_perc_autolevel) -def test_compare_autolevels_16bit(): - # compare autolevel(16bit) and percentile autolevel(16bit) with p0=0.0 and +def test_compare_autolevels_16-bit(): + # compare autolevel(16-bit) and percentile autolevel(16-bit) with p0=0.0 and # p1=1.0 should returns the same arrays image = data.camera().astype(np.uint16) * 4 @@ -185,8 +185,8 @@ def test_compare_autolevels_16bit(): assert_array_equal(loc_autolevel, loc_perc_autolevel) -def test_compare_8bit_vs_16bit(): - # filters applied on 8bit image ore 16bit image (having only real 8bit of +def test_compare_8-bit_vs_16-bit(): + # filters applied on 8-bit image ore 16-bit image (having only real 8-bit of # dynamic) should be identical image8 = data.camera() @@ -352,7 +352,7 @@ def test_entropy(): data = np.tile(np.reshape(np.arange(64),(8,8)),(10,10)).astype(np.uint8) assert(np.max(rank.entropy(data,selem))==60) - # 8 bit per pixel + # 8-bit per pixel data = np.tile(np.reshape(np.arange(256),(16,16)),(10,10)).astype(np.uint8) assert(np.max(rank.entropy(data,selem))==80)