,array的元素都是1或者0,计算1部分的重心"""
rows, cols = array.shape
area = 0
sum_x = 0
sum_y = 0...# 取图像的竖直方向为x方向
@nb.jit(nb.float32(nb.uint8[:, :], nb.float32), nopython=True)
def calc_Ix(array, axis...X轴(图像的竖直方向)的夹角
@nb.jit(nb.types.UniTuple(nb.float32, 3)(nb.float32, nb.float32, nb.float32), nopython...计算值与理论值非常接近,误差来自图像的离散(由一个一个像素组成)。...在某些简单情况下,惯性矩可作为图像的特征,用于图像分类。