User Tools

Site Tools


opencv_tutorials_t4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
opencv_tutorials_t4 [2016/06/06 18:34] joaomatosopencv_tutorials_t4 [2016/06/07 14:49] joaomatos
Line 139: Line 139:
 </Code> </Code>
  
-Now that we have an image with the edges detected , we can use it as input on the function that will find the contours.First need to be declared the vector that will store the points of the contours detected and a vector to define the hierarchy (just initialize it without any value and it is fine). The function is **"findContours"** and will take as input the edge image and will give as output a vector with the contours point ( that we will need to draw this vector on the image after ). The rest of the arguments we does not need to change for the most of applications. The last argument can be useful in some situations , as it define a contour offset  (shift every point of the detected contour ). You can read more about it [[http://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=findcontours|here.]]+Now that we have an image with the edges detected , we can use it as input on the function that will find the contours.First need to be declared the vector that will store the points of the contours detected and a vector to define the hierarchy - the hierarchy vector contain as many element as the number of contours found (if we know its size , we know how many contours were found, and contains information about the image topology. The function is **"findContours"** and will take as input the edge image and will give as output a vector with the contours point ( that we will need to draw this vector on the image after ). The rest of the arguments we does not need to change for the most of applications. The last argument can be useful in some situations , as it define a contour offset  (shift every point of the detected contour ). You can read more about it [[http://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=findcontours|here.]]
  
  
opencv_tutorials_t4.txt · Last modified: 2017/05/13 17:32 by acater