Created
March 27, 2020 05:48
-
-
Save THEFASHIONGEEK/d2aa545aca2ac39580ee9708e4170c69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
import skimage | |
from matplotlib import pyplot as plt | |
img = cv2.imread("imgs/chapter5/sudoku.png", 0); | |
img = cv2.blur(img, (3, 3)); | |
###################################FOCUS####################################### | |
robert_filter = skimage.filters.hessian(img, sigmas=range(1, 2, 1)) # Image binarization | |
############################################################################### | |
f = plt.figure(figsize=(15,15)) | |
f.add_subplot(1, 2, 1).set_title('Original Image'); | |
plt.imshow(img, cmap = "gray") | |
f.add_subplot(1, 2, 2).set_title('Filtered Image'); | |
plt.imshow(robert_filter, cmap = "gray"); | |
plt.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment