Kavindu99 commited on
Commit
91efbe0
·
1 Parent(s): 8b5d768
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,24 +5,24 @@ rng = range(1,225)
5
 
6
  sobel_verticle = np.array([[-1,0,1],
7
  [-1,0,1],
8
- [-1,0,1]]).float()
9
 
10
  sobel_horizontal = np.array([[-1,-1,11],
11
  [ 0, 0, 0],
12
- [ 1, 1, 1]]).float()
13
 
14
  laplacian = np.array([[ 0,-1, 0],
15
  [-1, 5,-1],
16
- [ 0,-1, 0]]).float()
17
 
18
  average = np.array([[1/9,1/9, 1/9],
19
  [1/9,1/9, 1/9],
20
- [1/9,1/9, 1/9]]).float()
21
 
22
 
23
  weighted_average = np.array([[1/16,2/16, 1/16],
24
  [2/16,4/16, 2/16],
25
- [1/16,2/16, 1/16]]).float()
26
 
27
 
28
  def convolve(img, kernel):
 
5
 
6
  sobel_verticle = np.array([[-1,0,1],
7
  [-1,0,1],
8
+ [-1,0,1]])
9
 
10
  sobel_horizontal = np.array([[-1,-1,11],
11
  [ 0, 0, 0],
12
+ [ 1, 1, 1]])
13
 
14
  laplacian = np.array([[ 0,-1, 0],
15
  [-1, 5,-1],
16
+ [ 0,-1, 0]])
17
 
18
  average = np.array([[1/9,1/9, 1/9],
19
  [1/9,1/9, 1/9],
20
+ [1/9,1/9, 1/9]])
21
 
22
 
23
  weighted_average = np.array([[1/16,2/16, 1/16],
24
  [2/16,4/16, 2/16],
25
+ [1/16,2/16, 1/16]])
26
 
27
 
28
  def convolve(img, kernel):