Skip to content

Commit

Permalink
Update edgedetection.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ad33edub authored Jan 14, 2025
1 parent 4bb454a commit 54ba1bb
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions content/edgedetection.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,7 @@ ___
## 4.1: The Filter-Kernels
There are a variety of different Kernels used for edge detection; some of the most common ones are Sobel, Scharr, and Prewitt - Kernels.

<div style="background-color:rgb(235, 235, 235); border: 1px solid rgb(235, 235, 235); border-radius: 15px; padding: 15px; margin: 10px 0;">
<strong>Sobel:</strong>

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}$

---

<strong>Scharr:</strong>

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}$

---

<strong>Prewitt:</strong>

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}$
</div>

<center><img src="../filter.png" width="659" height="333"></center>

When applying these Filter-Kernels to an image through __convolution__, you essentially create the derivative of the image.
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.
Expand Down

0 comments on commit 54ba1bb

Please sign in to comment.