用法:
skimage.filters.threshold_minimum(image=None, nbins=256, max_num_iter=10000, *, hist=None)
根據最小方法返回閾值。
如果未提供輸入
image
的直方圖,則計算它並對其進行平滑處理,直到隻有兩個最大值。那麽兩者之間的最小值就是閾值。必須提供圖像或曆史記錄。如果給出 hist,則忽略圖像的實際直方圖。
- image:(N, M[, ..., P]) ndarray,可選
灰度輸入圖像。
- nbins:int 可選
用於計算直方圖的 bin 數量。對於整數數組,此值將被忽略。
- max_num_iter:int 可選
平滑直方圖的最大迭代次數。
- hist:數組,或數組的 2 元組,可選
用於確定閾值的直方圖和相應的 bin 中心強度數組。或者,隻能通過直方圖。
- threshold:浮點數
上閾值。強度高於此值的所有像素都被假定為前景。
- max_iter:DEPRECATED
已棄用以支持max_num_iter。
- RuntimeError
如果無法在直方圖中找到兩個局部最大值,或者平滑需要超過 1e4 次迭代。
參數:
返回:
其他參數:
拋出:
參考:
- 1
C. A. Glasbey, “An analysis of histogram-based thresholding algorithms,” CVGIP: Graphical Models and Image Processing, vol. 55, pp. 532-537, 1993.
- 2
Prewitt, JMS & Mendelsohn, ML (1966), “The analysis of cell images”, Annals of the New York Academy of Sciences 128: 1035-1053 DOI:10.1111/j.1749-6632.1965.tb11715.x
例子:
>>> from skimage.data import camera >>> image = camera() >>> thresh = threshold_minimum(image) >>> binary = image > thresh
相關用法
- Python skimage.filters.threshold_mean用法及代碼示例
- Python skimage.filters.threshold_multiotsu用法及代碼示例
- Python skimage.filters.threshold_otsu用法及代碼示例
- Python skimage.filters.threshold_li用法及代碼示例
- Python skimage.filters.threshold_niblack用法及代碼示例
- Python skimage.filters.threshold_triangle用法及代碼示例
- Python skimage.filters.threshold_local用法及代碼示例
- Python skimage.filters.threshold_isodata用法及代碼示例
- Python skimage.filters.threshold_yen用法及代碼示例
- Python skimage.filters.threshold_sauvola用法及代碼示例
- Python skimage.filters.try_all_threshold用法及代碼示例
- Python skimage.filters.unsharp_mask用法及代碼示例
- Python skimage.filters.rank.noise_filter用法及代碼示例
- Python skimage.filters.gaussian用法及代碼示例
- Python skimage.filters.rank.sum用法及代碼示例
- Python skimage.filters.window用法及代碼示例
- Python skimage.filters.gabor用法及代碼示例
- Python skimage.filters.rank.autolevel用法及代碼示例
- Python skimage.filters.rank.pop用法及代碼示例
- Python skimage.filters.rank.mean用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.filters.threshold_minimum。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。