image gradient
An arrow at each pixel pointing toward the direction brightness increases fastest, sized by how fast it increases.
For an image treated as a function f(x,y) of brightness, the gradient \nabla f = (\partial f/\partial x,\ \partial f/\partial y) is a vector at each pixel: its direction points toward the steepest increase in brightness, and its magnitude \|\nabla f\| = \sqrt{(\partial f/\partial x)^2+(\partial f/\partial y)^2} measures how steep that increase is. A large gradient magnitude marks an edge; the gradient's direction is what corner and keypoint detectors (Chapter 4) and gradient histograms (Section 4.3) build on.
Examples
Inside a flat, solid-colored region the gradient is nearly the zero vector everywhere; crossing a sharp light-to-dark boundary produces a large-magnitude gradient pointing across the boundary.
See also