Created
July 14, 2019 08:32
-
-
Save eLtronicsVilla/92c864f3bd02d385e95b49afbf1695ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
img = cv2.imread('test.jpg') | |
imgray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) | |
ret,thresh = cv2.threshold(imgray,127,255,0) | |
im2, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment