Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

fitEllipse - angle of resulting rotated rect

$
0
0
It seems that fitEllipse realization miss the result RotatedRect angle computing in some cases. ... box.center.x = (float)rp[0] + c.x; box.center.y = (float)rp[1] + c.y; box.size.width = (float)(rp[2]*2); box.size.height = (float)(rp[3]*2); if( box.size.width > box.size.height ) { float tmp; CV_SWAP( box.size.width, box.size.height, tmp ); box.angle = (float)(90 + rp[4]*180/CV_PI); } if( box.angle < -180 ) box.angle += 360; if( box.angle > 360 ) box.angle -= 360; return box; If box.size.width <= box.size.height the angle of rotated rect would be indefinite. Please correct me, if I am wrong.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>