Merge pull request #3742 from StevenPuttemans:fix_4151

This commit is contained in:
Vadim Pisarevsky 2015-03-02 11:30:16 +00:00
commit e28a5803d9

View File

@ -30,7 +30,7 @@ import cv2
im = cv2.imread('test.jpg') im = cv2.imread('test.jpg')
imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY) imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
ret,thresh = cv2.threshold(imgray,127,255,0) ret,thresh = cv2.threshold(imgray,127,255,0)
contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE) im2, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
@endcode @endcode
See, there are three arguments in **cv2.findContours()** function, first one is source image, second See, there are three arguments in **cv2.findContours()** function, first one is source image, second
is contour retrieval mode, third is contour approximation method. And it outputs the contours and is contour retrieval mode, third is contour approximation method. And it outputs the contours and