简体   繁体   中英

Centroid of a contour

在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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM