Note that the color areas are more uniform, specially in the leaves behind the corns. Finding Edges There are many times when, as part of an algorithm or as an objective in itself, we need to find the edges of an image in a certain direction. An example of this need is the emboss filter, found in many image processing packages like Photoshop or Paint Shop Pro. Emboss creates a light and shadow version of the image, where the edges appear as if they were basreliefs, and they were illuminated from a side. This is the crop field of the previous examples, once processed with the emboss filter.
Illumination comes from the upper right corner.
We can say that an edge is a change in the pixel values beyond a threshold in a certain direction. But calculating the gradient or general derivative of an image is too costly, so we look for approximations. These masks are called Prewitt operators, and there are other masks designed to detect other type of edges, or to work with masks of even size. Nevertheless all of them work with the idea of approximating the derivative. An example of the effect of the Prewitt operators.