SHARE
TWEET

Untitled

a guest Jun 25th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import cv2 as cv
  2. import numpy as np
  3.  
  4. img = cv.imread('sudoku.png',0)
  5.  
  6.  
  7.  _,th1 =cv.threshold(img,127,255,cv.THRESH_BINARY)
  8.      
  9. th2=cv.adaptiveThreshold
  10. (img,255,cv.ADAPTIVE_THRESH_MEAN_C,cv.THRESH_BINARY,11,2)
  11.  
  12.  cv.imshow("Image",img)
  13.  cv.imshow("th1",th1)
  14.  cv.imshow("th2",th2)
  15.  
  16.  cv.waitKey(0)
  17.  cv.destroyAllWindows()
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