Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Python :: take two numbers as inout in single line in python 
Python :: django update increment 
Python :: Remove the First Character From the String in Python Using the Slicing 
Python :: python transpose list 
Python :: python input map 
Python :: remove duplicates without changing order python 
Python :: export sklearn.metrics.classification_report as csv 
Python :: python get all methods of object 
Python :: pathlib recursive search 
Python :: how to print hello in python 
Python :: python number with comma to float 
Python :: ordered char list python 
Python :: python list rotation 
Python :: how to clean a mask cv2 in python 
Python :: How to convert text into audio file in python? 
Python :: how to move a column to last in pandas 
Python :: python intersection of two lists 
Python :: python save .mat 
Python :: how to use colorama 
Python :: hello world flask python 
Python :: switching versions of python 
Python :: python get current user windows 
Python :: how to change the datatype of a row in pandas 
Python :: capitalize first letter in python 
Python :: fastest sort python 
Python :: open text file in python 
Python :: char list to string python 
Python :: python if not path exist make path 
Python :: python enum declare 
Python :: python current utc offset 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =