Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

OPENCV GET CONTOURS

im = cv.imread('test.jpg')
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
ret, thresh = cv.threshold(imgray, 127, 255, 0)
contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)

cv.drawContours(img, [CONTOURS], 0, (0,255,0), 3)
 
PREVIOUS NEXT
Tagged: #OPENCV #GET #CONTOURS
ADD COMMENT
Topic
Name
1+9 =