rect = cv2.minAreaRect(cnt)box = cv2.cv.BoxPoints(rect) # cv2.boxPoints(rect) for OpenCV 3.xbox = np.int0(box)cv2.drawContours(im,[box],0,(0,0,255),2)
应该可以。
1)http://opencvpython.blogspot.in/2012/06/contours-2-brotherhood.html
2)Python OpenCV Box2D
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)