Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- img = cv2.imread('#IMAGE_PATH', 0)
- img = cv2.medianBlur(img, 5)
- ret, thresh =
- cv2.threshold(img,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
- canny = cv2.Canny(thresh,100,200)
- cv2.imwrite("cannyt.jpg",canny)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement