1
$\begingroup$

Strictly speaking, the $x$ direction derivative should be the difference between the left and right pixel of each pixel. So, then I should be using a $1\times 3$ filter:

\begin{bmatrix}-1&0&1\end{bmatrix}

If that is so, why is the Sobel operator a $3\times 3$? \begin{bmatrix}-1&0&1\\-2&0&2\\-1&0&1\end{bmatrix}

Is it so that the approximation of the derivative is less susceptible to noise?

$\endgroup$

1 Answer 1

3
$\begingroup$

Indeed, it adds smoothing in the $y$ direction. The Sobel filter is the separable combination of the centered derivative $[−1,\;0,\;1]$ along $x$, and the $3$-point binomial smoother $[1,\;2,\;1]$ along $y$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.