用法:
cucim.skimage.measure.moments_hu(nu)
计算胡的图像矩集(2D-only)。
请注意,这组矩被证明是平移、缩放和旋转不变的。
- nu:(M, M) 数组
归一化中心图像矩,其中 M 必须 >= 4。
- nu:(7,) 数组
胡的一组形象瞬间。
参数:
返回:
注意:
由于数组大小较小,这个函数在 CPU 上会更快。如果设备上不需要这些时刻,请考虑将
nu
传输到主机并运行skimage.measure.moments_hu
。参考:
- 1
M. K. Hu, “Visual Pattern Recognition by Moment Invariants”, IRE Trans. Info. Theory, vol. IT-8, pp. 179-187, 1962
- 2
Wilhelm Burger, Mark Burge. Principles of Digital Image Processing: Core Algorithms. Springer-Verlag, London, 2009.
- 3
B. Jähne. Digital Image Processing. Springer-Verlag, Berlin-Heidelberg, 6. edition, 2005.
- 4
T. H. Reiss. Recognizing Planar Objects Using Invariant Image Features, from Lecture notes in computer science, p. 676. Springer, Berlin, 1993.
- 5
例子:
>>> import cupy as cp >>> from cucim.skimage.measure import (moments_central, moments_hu, ... moments_normalized) >>> image = cp.zeros((20, 20), dtype=np.float64) >>> image[13:17, 13:17] = 0.5 >>> image[10:12, 10:12] = 1 >>> mu = moments_central(image) >>> nu = moments_normalized(mu) >>> moments_hu(nu) array([7.45370370e-01, 3.51165981e-01, 1.04049179e-01, 4.06442107e-02, 2.64312299e-03, 2.40854582e-02, 4.33680869e-19])
相关用法
- 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.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_hu。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。