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);
th3 = cv.adaptiveThreshold(img, 255, cv.ADAPTIVE_THRESH_GAUSSIAN_C, cv.THRESH_BINARY, 11, 2);
cv.imshow("Image", img)
cv.imshow("THRESH_BINARY", th1)
cv.imshow("ADAPTIVE_THRESH_MEAN_C", th2)
cv.imshow("ADAPTIVE_THRESH_GAUSSIAN_C", th3)
cv.waitKey(0)
cv.destroyAllWindows()#close window
#===================================#
data used in this video
#===================================#
if you faced any issue contact me via
what's app : +201210894349
or facebook
Comments
Post a Comment
I hope you have benefited from this blog, and if you have any question, feel free to leave it here.