Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2 as cv
- import numpy as np
- img = cv.imread('sudoku.png',0)
- _,th1 =cv.threshold(img,127,255,cv.THRESH_BINARY)
- th2=cv.adaptiveThreshold
- (img,255,cv.ADAPTIVE_THRESH_MEAN_C,cv.THRESH_BINARY,11,2)
- cv.imshow("Image",img)
- cv.imshow("th1",th1)
- cv.imshow("th2",th2)
- cv.waitKey(0)
- cv.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement