Gradient vectors (or “image gradients”) are one of the most fundamental concepts in computer vision; many vision algorithms involve computing gradient vectors for each pixel in an image.
After a quick introduction to how gradient vectors are computed, I’ll discuss some of its properties which make it so useful.
Computing The Gradient Image
A gradient vector can be computed for every pixel an image. It’s simply a measure of the change in pixel values along the x-direction and the y-direction around each pixel.
Let’s look at a simple example; let’s say we want to compute the gradient vector at the pixel highlighted in red below.
This is a grayscale image, so the pixel values just range from 0 – 255 (0 is black, 255 is white). The pixel values to the left and right of our pixel are marked in the image: 56 and 94. We just take the right value…
View original post 516 more words