用法:
skimage.filters.rank.pop_bilateral(image, footprint, out=None, mask=None, shift_x=False, shift_y=False, s0=10, s1=10)
返回像素的本地數量(人口)。
像素數定義為足跡和掩碼中包含的像素數。此外,像素必須在區間 [g-s0, g+s1] 內具有灰度級,其中 g 是中心像素的灰度值。
- image:二維數組(uint8,uint16)
輸入圖像。
- footprint:二維陣列
鄰域表示為 1 和 0 的二維數組。
- out:二維數組(與輸入相同的 dtype)
如果沒有,則分配一個新數組。
- mask:ndarray
定義包含在本地鄰域中的圖像的 (>0) 區域的掩碼數組。如果沒有,則使用完整的圖像(默認)。
- shift_x, shift_y:int
添加到封裝中心點的偏移量。 Shift 受限於封裝尺寸(中心必須在給定封裝內)。
- s0, s1:int
圍繞中心像素的灰度值定義 [s0, s1] 區間,以計算該值。
- out:二維數組(與輸入圖像相同的 dtype)
輸出圖像。
- selem:DEPRECATED
已棄用以支持足跡。
參數:
返回:
其他參數:
例子:
>>> import numpy as np >>> from skimage.morphology import square >>> import skimage.filters.rank as rank >>> img = 255 * np.array([[0, 0, 0, 0, 0], ... [0, 1, 1, 1, 0], ... [0, 1, 1, 1, 0], ... [0, 1, 1, 1, 0], ... [0, 0, 0, 0, 0]], dtype=np.uint16) >>> rank.pop_bilateral(img, square(3), s0=10, s1=10) array([[3, 4, 3, 4, 3], [4, 4, 6, 4, 4], [3, 6, 9, 6, 3], [4, 4, 6, 4, 4], [3, 4, 3, 4, 3]], dtype=uint16)
相關用法
- Python skimage.filters.rank.pop用法及代碼示例
- Python skimage.filters.rank.noise_filter用法及代碼示例
- Python skimage.filters.rank.sum用法及代碼示例
- Python skimage.filters.rank.autolevel用法及代碼示例
- Python skimage.filters.rank.mean用法及代碼示例
- Python skimage.filters.rank.maximum用法及代碼示例
- Python skimage.filters.rank.equalize用法及代碼示例
- Python skimage.filters.rank.enhance_contrast用法及代碼示例
- Python skimage.filters.rank.gradient用法及代碼示例
- Python skimage.filters.rank.entropy用法及代碼示例
- Python skimage.filters.rank.otsu用法及代碼示例
- Python skimage.filters.rank.windowed_histogram用法及代碼示例
- Python skimage.filters.rank.sum_bilateral用法及代碼示例
- Python skimage.filters.rank.threshold用法及代碼示例
- Python skimage.filters.rank.majority用法及代碼示例
- Python skimage.filters.rank.geometric_mean用法及代碼示例
- Python skimage.filters.rank.subtract_mean用法及代碼示例
- Python skimage.filters.rank.minimum用法及代碼示例
- Python skimage.filters.rank.mean_bilateral用法及代碼示例
- Python skimage.filters.rank.modal用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.filters.rank.pop_bilateral。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。