當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python cucim.skimage.filters.threshold_triangle用法及代碼示例

用法:

cucim.skimage.filters.threshold_triangle(image, nbins=256)

根據三角形算法返回閾值。

參數

image(N, M[, ..., P]) ndarray

灰度輸入圖像。

nbins整數,可選

用於計算直方圖的 bin 數量。對於整數數組,此值將被忽略。

返回

threshold浮點數

上閾值。強度高於此值的所有像素都被假定為前景。

參考

1

Zack, G. W., Rogers, W. E. and Latt, S. A., 1977, Automatic Measurement of Sister Chromatid Exchange Frequency, Journal of Histochemistry and Cytochemistry 25 (7), pp. 741-753 DOI:10.1177/25.7.70454

2

ImageJ AutoThresholder code, http://fiji.sc/wiki/index.php/Auto_Threshold

例子

>>> from skimage.data import camera
>>> image = camera()
>>> thresh = threshold_triangle(image)
>>> binary = image > thresh

相關用法


注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cucim.skimage.filters.threshold_triangle。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。