用法:
cucim.skimage.measure.moments_normalized(mu, order=3)
計算所有歸一化的中心圖像矩,直到某個順序。
請注意,歸一化中心矩是平移和尺度不變的,但不是旋轉不變的。
- mu:(M,[ …,] M) 數組
中心圖像時刻,其中 M 必須大於或等於
order
。- order:整數,可選
時刻的最大順序。默認值為 3。
- nu:(
order + 1
,[ …,]order + 1
) 數組 歸一化的中心圖像時刻。
- nu:(
參數:
返回:
注意:
由於數組大小較小,這個函數在 CPU 上應該更快。考慮將
mu
傳輸到主機並運行skimage.measure.moments_normalized
。參考:
- 1
Wilhelm Burger, Mark Burge. Principles of Digital Image Processing: Core Algorithms. Springer-Verlag, London, 2009.
- 2
B. Jähne. Digital Image Processing. Springer-Verlag, Berlin-Heidelberg, 6. edition, 2005.
- 3
T. H. Reiss. Recognizing Planar Objects Using Invariant Image Features, from Lecture notes in computer science, p. 676. Springer, Berlin, 1993.
- 4
例子:
>>> import cupy as cp >>> from cucim.skimage.measure import (moments, moments_central, ... moments_normalized) >>> image = cp.zeros((20, 20), dtype=cp.float64) >>> image[13:17, 13:17] = 1 >>> m = moments(image) >>> centroid = (m[0, 1] / m[0, 0], m[1, 0] / m[0, 0]) >>> mu = moments_central(image, centroid) >>> moments_normalized(mu) array([[ nan, nan, 0.078125 , 0. ], [ nan, 0. , 0. , 0. ], [0.078125 , 0. , 0.00610352, 0. ], [0. , 0. , 0. , 0. ]])
相關用法
- Python cucim.skimage.measure.moments_coords用法及代碼示例
- Python cucim.skimage.measure.moments_central用法及代碼示例
- Python cucim.skimage.measure.moments_coords_central用法及代碼示例
- Python cucim.skimage.measure.moments_hu用法及代碼示例
- Python cucim.skimage.measure.moments用法及代碼示例
- Python cucim.skimage.measure.label用法及代碼示例
- Python cucim.skimage.measure.perimeter用法及代碼示例
- Python cucim.skimage.measure.regionprops用法及代碼示例
- Python cucim.skimage.measure.centroid用法及代碼示例
- 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.moments_normalized。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。