Created
January 22, 2020 02:27
-
-
Save ritvikmath/3c482096ba78b9b3dc864b10a1a2216e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
%matplotlib inline | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#define the vertical filter | |
vertical_filter = [[-1,-2,-1], [0,0,0], [1,2,1]] | |
#define the horizontal filter | |
horizontal_filter = [[-1,0,1], [-2,0,2], [-1,0,1]] | |
#read in the pinwheel image | |
img = plt.imread('pinwheel.jpg') | |
#get the dimensions of the image | |
n,m,d = img.shape | |
#initialize the edges image | |
edges_img = img.copy() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment