用法:
cucim.skimage.measure.centroid(image)
返回圖像的(加權)質心。
- image:數組
輸入圖像。
- center:浮點元組,長度
image.ndim
image
中(非零)像素的質心。
- center:浮點元組,長度
參數:
返回:
例子:
>>> import cupy as cp >>> from cucim.skimage.measure import centroid >>> image = cp.zeros((20, 20), dtype=np.float64) >>> image[13:17, 13:17] = 0.5 >>> image[10:12, 10:12] = 1 >>> centroid(image) array([13.16666667, 13.16666667])
相關用法
- 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.perimeter用法及代碼示例
- Python cucim.skimage.measure.regionprops用法及代碼示例
- Python cucim.skimage.measure.moments用法及代碼示例
- Python cucim.skimage.measure.moments_hu用法及代碼示例
- Python cucim.skimage.measure.profile_line用法及代碼示例
- 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.centroid。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。