Rotate a point around a point with OpenCV
问题 Does anyone know how I can rotate a point around another in OpenCV? I am looking for a function like this: Point2f rotatePoint(Point2f p1, Point2f center, float angle) { /* MAGIC */ } 回答1: These are the steps needed to rotate a point around another point by an angle alpha: Translate the point by the negative of the pivot point Rotate the point using the standard equation for 2-d (or 3-d) rotation Translate back The standard equation for rotation is: x' = x cos(alpha) - y sin(alpha) y' = x sin