cv::findContours Orientation
Hello,
Are the contours returned by cv::findContours guaranteed to always have a consistent orientation? Is there any proof or documentation you can point to? Using version 2.4.5.
Thanks in advance!
What is consistent orientation ? and 2.4.5 please uptdate to 2.4.13.2 or opencv 3.3.0-rc
Hello LBerger,
Thanks for the quick response. Please see below.
'I am using OpenCV's cv::findContours function to extract contours in a binary image, in particular, I'm extracting a hierarchy of contours (using the CV_RETR_CCOMP flag). At some point in my further processing of those contours I need to rely on a consistent vertex orientation of these contours (i.e. counter-clockwise vs. clockwise).
Of course I can just determine that orientation myself using the sign of the contour's area (as computed by cv::contourArea(..., true)), but I wonder if that is even necessary (besides that, it won't even work for contours with an area of 0, i.e. thin lines in the source image) or if cv::findContours already guarantees a consistent orientation for the generated contours.'
I think answer is in this paper reference given here
Hello LBerger,
Thank you! Any particular line you can point out, please?
Best, Eric
May be in appendix 1 step 1 and 4