Last active
October 22, 2016 11:23
-
-
Save lucapiccinelli/f04989f54fada39681d3449df3750f59 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 cv2 | |
import matplotlib.pyplot as plt | |
#caricamento dell'immagine da disco | |
im = cv2.imread(r'img\text.jpg', cv2.IMREAD_GRAYSCALE) | |
h, w = im.shape | |
#ridimensionamento dell'immagine | |
im = cv2.resize(im, (w/3,h/3)) | |
#canny edge detector | |
im = cv2.Canny(im, 100, 200) | |
plt.imshow(im, cmap='Greys_r') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment