476
社区成员
发帖
与我相关
我的任务
分享
我假设以下几点用作说明:
(50,70),(170,152),(152,48)
dist1 = cv2.pointPolygonTest(contours[0], (50, 70), True)
dist2 = cv2.pointPolygonTest(contours[0], (170, 152), True)
dist3 = cv2.pointPolygonTest(contours[0], (152, 48), True)
print('dist1 : ', dist1)
print('dist2 : ', dist2)
print('dist3 : ', dist3)
输出:
('dist1 : ', -45.17742799230607)
('dist2 : ', 49.9799959983992)
('dist3 : ', -0.0)