求两个带角度矩形的 交集,后续可以 计算iou参数定义:rect 矩形的 x,y w h ,theta这里的角度定义 逆时针为负,顺时针为正 rect1 = ((50,50), (100,100), 0...) # x,y w,hrect2 = ((90,100), (50,2), 60)r1 = cv2.rotatedRectangleIntersection(rect1, rect2) # 区分正负角度...w,另一个边为h,旋转的角度为theta具体算法不做讲解(我也不会)box = np.array([[0,100],[0,0],[50,0],[50,100],])rect3 = cv2.minAreaRect...(box)print(rect3)box = np.array([[29,167], [493,167],[511,404], [9,404]]) # # 原始的角度 0.0# # [400,404],...[50,404]])rect3 = cv2.minAreaRect(box)print(rect3)