You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
image=cv2.imread("test_img.jpg") #read in the image
image=cv2.resize(image,(1300,800)) #resizing because opencv does not work well with bigger images
orig=image.copy()
gray=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) #RGB To Gray Scale
cv2.imshow("Title",gray)
blurred=cv2.GaussianBlur(gray,(5,5),0) #(5,5) is the kernel size and 0 is sigma that determines the amount of blur
cv2.imshow("Blur",blurred)
edged=cv2.Canny(blurred,30,50) #30 MinThreshold and 50 is the MaxThreshold
cv2.imshow("Canny",edged)
image,contours,hierarchy=cv2.findContours(edged,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE) #retrieve the contours as a list, with simple apprximation model