Skip to content

Instantly share code, notes, and snippets.

@THEFASHIONGEEK
Created March 26, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save THEFASHIONGEEK/9a785da0bffa14e86588468b4d0e3c73 to your computer and use it in GitHub Desktop.
Save THEFASHIONGEEK/9a785da0bffa14e86588468b4d0e3c73 to your computer and use it in GitHub Desktop.
import numpy as np
import cv2
import scipy
from matplotlib import pyplot as plt
img = cv2.imread("imgs/chapter5/rain.jpg", 0);
edges = cv2.Canny(img,150,200)
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(edges, cmap = "gray");
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment