Edge
- A sharp change in brightness
- Ideal edge is a step function in certain direction
- The first derivative has a peak at the edge
- The second derivative has a zero crossing at the edge
Derivative as Filters
- How can we compute the derivative of a discrete function

- This is called finite differences
- Can we make a linear filter that computes this derivative?

Image Gradient
- Image is a 2D discrete function
- Image partial derivatives in the horizontal and vertical directions
$$
\frac{\partial I}{\partial u}(u,v)\quad \text{and} \quad\frac{\partial I}{\partial v}(u,v)
$$
- Image gradient and any given location $(u,v)$
$$
\nabla I(u,v) =\begin{bmatrix}\dfrac{\partial I}{\partial u}(u,v) \\[6pt]\dfrac{\partial I}{\partial v}(u,v)\end{bmatrix}
$$
$$
|\nabla I|(u,v) =\sqrt{\left(\dfrac{\partial I}{\partial u}(u,v)\right)^2 +\left(\dfrac{\partial I}{\partial v}(u,v)\right)^2}
$$