Main task: I fit the ellipse using the fitEllipse()
method and then I'd like to count the rotation angle between the horizontal axis and the major axis of the generated ellipse. I'm going to do this using the 3rd returned argument from the fitEllipse()
method - $\theta$ (rotation angle).
Main issue: I can't find exact information about which axes this angle is located between.
Other: If I'm right the length of minor axis and the length of major axis in ellipse it's the same lengths as two sides in a rotated rectangle.
Sources:
- From documentation here (section nb. 9) it seems that this angle is between horizontal axis and the first side how it's written in CvBox2D section. So, it means that the angle can be between the horizontal axis and minor or major axis. But:
- In this article (section 3) the first example is good but in the 2nd example the angle should be between horizontal axis and height instead of width (referring to my aforementioned first point).
- In this article it shows that the angle is between vertical axis and one side of rectangle.
So, where is the rotated angle located in fitEllipse() method?
Any hints how it works are welcome.