用法:
cucim.skimage.measure.perimeter(image, neighbourhood=4)
計算二值圖像中所有對象的總周長。
- image:(N, M) ndarray
二維二值圖像。
- neighbourhood:4 或 8,可選
用於確定邊界像素的鄰域連通性。它用於計算輪廓。更高的鄰域加寬了計算周長的邊界。
- perimeter:浮點數
二值圖像中所有對象的總周長。
參數:
返回:
參考:
- 1
K. Benkrid, D. Crookes. Design and FPGA Implementation of a Perimeter Estimator. The Queen’s University of Belfast. http://www.cs.qub.ac.uk/~d.crookes/webpubs/papers/perimeter.doc
例子:
>>> from skimage import data, util >>> from skimage.measure import label >>> # coins image (binary) >>> img_coins = data.coins() > 110 >>> # total perimeter of all objects in the image >>> perimeter(img_coins, neighbourhood=4) 7796.867... >>> perimeter(img_coins, neighbourhood=8) 8806.268...
相關用法
- Python cucim.skimage.measure.profile_line用法及代碼示例
- Python cucim.skimage.measure.label用法及代碼示例
- Python cucim.skimage.measure.moments_coords用法及代碼示例
- Python cucim.skimage.measure.moments_normalized用法及代碼示例
- Python cucim.skimage.measure.moments_central用法及代碼示例
- Python cucim.skimage.measure.moments_coords_central用法及代碼示例
- Python cucim.skimage.measure.regionprops用法及代碼示例
- Python cucim.skimage.measure.moments用法及代碼示例
- Python cucim.skimage.measure.centroid用法及代碼示例
- Python cucim.skimage.measure.moments_hu用法及代碼示例
- Python cucim.skimage.measure.regionprops_table用法及代碼示例
- Python cucim.skimage.measure.block_reduce用法及代碼示例
- Python cucim.skimage.morphology.dilation用法及代碼示例
- Python cucim.skimage.morphology.closing用法及代碼示例
- Python cucim.skimage.morphology.erosion用法及代碼示例
- Python cucim.skimage.morphology.white_tophat用法及代碼示例
- Python cucim.skimage.morphology.remove_small_holes用法及代碼示例
- Python cucim.skimage.morphology.black_tophat用法及代碼示例
- Python cucim.skimage.morphology.reconstruction用法及代碼示例
- Python cucim.skimage.morphology.remove_small_objects用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cucim.skimage.measure.perimeter。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。