OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Thu, 28 Sep 2017 08:04:27 -0500Compute Angle of each contour pointhttp://answers.opencv.org/question/175291/compute-angle-of-each-contour-point/Hello,
After a Findcontour, how to compute the angle of each point of the contour ?
Thank you,
Christophe cjacquelThu, 28 Sep 2017 08:04:27 -0500http://answers.opencv.org/question/175291/ellipse approximation of blob using contours moments : confusing orientation anglehttp://answers.opencv.org/question/75181/ellipse-approximation-of-blob-using-contours-moments-confusing-orientation-angle/ Dear all,
I want to draw the ellipse approximating an isolated blob (the largest contour found with findContours). Using the formulas of paper :http://goo.gl/yvcUO5 for the major and minor axes I obtain consistent axes lengths. However using the formula to compute the orientation angle from the same paper( and which I find almost everywhere) I obtain odd results. This is the formula : theta = 0.5*atan (2*mu11 / (mu20-mu02)) ;
As long as the blob (which represents a human silhouette) is not close to horizontal, the formula returns a consistent value of the orientation angle but as soon as the blob becomes almost horizontal the sign of the orientation angle is flipped suddenly. I know the reason of such a behavior. If we refer to the formula above : when the blob is not horizontal mu20 is smaller than mu02. This is true while the blob starts climbing (falling) counter clockwise until it reaches an orientation of about 45 degrees. When it reaches that value the pxels distribution of the blob becomes horizontal rather than vertical and mu20 becomes larger than mu02 which implies inversion of the angle's sign. I don't know if this formula is correct.
Thanks a lot for your help.louniceMon, 02 Nov 2015 11:07:20 -0600http://answers.opencv.org/question/75181/find tilt and pan with opencvhttp://answers.opencv.org/question/69249/find-tilt-and-pan-with-opencv/ hi every one
i write a cod and get the image moment and now i want to get pan and tilt of contour with this moment how to do it?
please tell me how to calculate pan and tilt angle of contour?
just c++
i appreciate it
JimmY_NotroNSun, 23 Aug 2015 17:02:27 -0500http://answers.opencv.org/question/69249/