1. Home
  2. Docs
  3. Computer Vision
  4. Image Processing Function...
  5. Gradients
  6. Problem

Problem

Apply sobel filter for the following image on non border cells to detect horizontal and vertical edges

1010202030
1020304050
2030405060
3040506070
4050607080

Marking non border cells

1010202030
1020304050
2030405060
3040506070
4050607080

Therefore we have to compute 3*3 matrix of Gx and Gy

01234
01010202030
11020304050
22030405060
33040506070
44050607080
.
.
.
Gx
.
.
.
Gy

Computing Gx

1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 20 and apply the horizontal kernel

-101
-202
-101
70
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 30 and apply the horizontal kernel

-101
-202
-101
7070
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-101
-202
-101
707070
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 30 and apply the horizontal kernel

-101
-202
-101
707070
80
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-101
-202
-101
707070
8080
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 50 and apply the horizontal kernel

-101
-202
-101
707070
808080
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-101
-202
-101
707070
808080
80
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 50 and apply the horizontal kernel

-101
-202
-101
707070
808080
8080
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 60 and apply the horizontal kernel

-101
-202
-101
707070
808080
808080

Computing Gy

1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 20 and apply the horizontal kernel

-1-2-1
000
121
70
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 30 and apply the horizontal kernel

-1-2-1
000
121
7090
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-1-2-1
000
121
7090110
.
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 30 and apply the horizontal kernel

-1-2-1
000
121
7090110
80
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-1-2-1
000
121
7090110
8080
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 50 and apply the horizontal kernel

-1-2-1
000
121
7090110
808080
.
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 40 and apply the horizontal kernel

-1-2-1
000
121
7090110
808080
80
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 50 and apply the horizontal kernel

-1-2-1
000
121
7090110
808080
8080
1010202030
1020304050
2030405060
3040506070
4050607080

Find the neighbors of 60 and apply the horizontal kernel

-1-2-1
000
121
7090110
808080
808080

Gx

707070
808080
808080

Gy

7090110
808080
808080

Loading

Views: 9

How can we help?

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments