Skip to content

Commit 54ba1bb

Browse files
authored
Update edgedetection.md
1 parent 4bb454a commit 54ba1bb

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

content/edgedetection.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,7 @@ ___
2525
## 4.1: The Filter-Kernels
2626
There are a variety of different Kernels used for edge detection; some of the most common ones are Sobel, Scharr, and Prewitt - Kernels.
2727

28-
<div style="background-color:rgb(235, 235, 235); border: 1px solid rgb(235, 235, 235); border-radius: 15px; padding: 15px; margin: 10px 0;">
29-
<strong>Sobel:</strong>
30-
31-
X-Direction: $\begin{bmatrix}1&0&-1\\2&0&-2\\1&0&-1\end{bmatrix}$ &emsp;&emsp;&emsp;&emsp;&emsp;&nbsp;&nbsp;&nbsp; Y-Direction: $\begin{bmatrix}1&2&1\\0&0&0\\-1&-2&-1\end{bmatrix}$
32-
33-
---
34-
35-
<strong>Scharr:</strong>
36-
37-
X-Direction: $\begin{bmatrix}47&0&-47\\162&0&-162\\47&0&-47\end{bmatrix}$ &emsp;&emsp;&emsp;&nbsp;&nbsp;Y-Direction: $\begin{bmatrix}47&162&47\\0&0&0\\-47&-162&-47\end{bmatrix}$
38-
39-
---
40-
41-
<strong>Prewitt:</strong>
42-
43-
X-Direction: $\begin{bmatrix}1&0&-1\\1&0&-1\\1&0&-1\end{bmatrix}$ &emsp;&emsp;&emsp;&emsp;&emsp;&nbsp;&nbsp;&nbsp;Y-Direction: $\begin{bmatrix}1&1&1\\0&0&0\\-1&-1&-1\end{bmatrix}$
44-
</div>
45-
28+
<center><img src="../filter.png" width="659" height="333"></center>
4629

4730
When applying these Filter-Kernels to an image through __convolution__, you essentially create the derivative of the image.
4831
This is because these Kernels result in higher pixel-values in regions, where the image contains a sharp change in brightness (similar to derivatives in analysis). This "derivation" is performed in X- and Y-direction seperately.

0 commit comments

Comments
 (0)