SHARE
TWEET

Untitled

a guest Jun 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import cv2
  2. import numpy as np
  3.  
  4. img = cv2.imread('#IMAGE_PATH', 0)
  5. img = cv2.medianBlur(img, 5)
  6. ret, thresh =
  7. cv2.threshold(img,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
  8.  
  9. canny = cv2.Canny(thresh,100,200)
  10. cv2.imwrite("cannyt.jpg",canny)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top