在Python下的OpenCV中,没有比使用函数cv2.moments
计算轮廓内部质心的方法更好的方法了,它可以计算直到3阶的所有力矩(并且是过大的)?
您可以使用cv2.connectedComponentsWithStats
它返回轮廓的质心和大小。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.