用法:
skimage.measure.moments_coords(coords, order=3)
计算达到特定顺序的所有原始图像时刻。
- 可以从原始图像时刻计算以下属性:
- 区域为:
M[0, 0]
。 - 质心为:{
M[1, 0] / M[0, 0]
,M[0, 1] / M[0, 0]
}。
- 区域为:
请注意,原始矩既不是平移、缩放也不是旋转不变的。
- coords:(N, D) 双精度或 uint8 数组
说明笛卡尔空间中 D 维图像的 N 点数组。
- order:int 可选
时刻的最大顺序。默认值为 3。
- M:(
order + 1
,order + 1
,...)数组 原始图像时刻。 (D 尺寸)
- M:(
参数:
返回:
参考:
- 1
Johannes Kilian. Simple Image Analysis By Moments. Durham University, version 0.2, Durham, 2001.
例子:
>>> coords = np.array([[row, col] ... for row in range(13, 17) ... for col in range(14, 18)], dtype=np.double) >>> M = moments_coords(coords) >>> centroid = (M[1, 0] / M[0, 0], M[0, 1] / M[0, 0]) >>> centroid (14.5, 15.5)
相关用法
- Python skimage.measure.moments_coords_central用法及代码示例
- Python skimage.measure.moments_central用法及代码示例
- Python skimage.measure.moments_hu用法及代码示例
- Python skimage.measure.moments_normalized用法及代码示例
- Python skimage.measure.moments用法及代码示例
- Python skimage.measure.ransac用法及代码示例
- Python skimage.measure.profile_line用法及代码示例
- Python skimage.measure.perimeter_crofton用法及代码示例
- Python skimage.measure.LineModelND用法及代码示例
- Python skimage.measure.block_reduce用法及代码示例
- Python skimage.measure.shannon_entropy用法及代码示例
- Python skimage.measure.euler_number用法及代码示例
- Python skimage.measure.perimeter用法及代码示例
- Python skimage.measure.EllipseModel用法及代码示例
- Python skimage.measure.regionprops用法及代码示例
- Python skimage.measure.find_contours用法及代码示例
- Python skimage.measure.CircleModel用法及代码示例
- Python skimage.measure.label用法及代码示例
- Python skimage.measure.regionprops_table用法及代码示例
- Python skimage.metrics.hausdorff_distance用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.measure.moments_coords。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。