Ask Your Question

Revision history [back]

Ah the good old issue of coordinate system orientation.

  • clockwise means moving from x axis towards the y axis if you consider a upstraight coordinate system, so Y running from bottom to top.
  • however OpenCV uses the top left corner as origin and has a downwards pointing y axis.
  • this means to achieve this you need to warp the movement over the x axis.
  • and thus your rotation is actually clockwise in the OpenCV coordinate system.

I know it is sometimes a bit sketchy because coordinate systems are used in different constellations inside OpenCV, but now you know why you get this result.

Ah the good old issue of coordinate system orientation.

  • clockwise means moving from x axis towards the y axis if you consider a upstraight coordinate system, so Y running from bottom to top.
  • however OpenCV uses the top left corner as origin and has a downwards pointing y axis.
  • this means to achieve this you need to warp the movement over the x axis.
  • and thus your rotation is actually clockwise in the OpenCV coordinate system.

I know it is sometimes a bit sketchy because coordinate systems are used in different constellations inside OpenCV, but now you know why you get this result.

VISUAL EXPLANATION

image description