# inverse matrix of simple rotation is reversed rotation.M_inv = cv2.getRotationMatrix2D((100/2, 300/2),-30,1)# pointspoints = np.array([[35., 0.], [175., 0.], [105., 200.], [105., 215.], ])# add onesones = np.ones(shape=(len(points), 1))points_ones = np.hstack([points, ones])# transform pointstransformed_points = M_inv.dot(points_ones.T).T
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)