Convolving one pixel with a 5 x 5 kernel requires 25 multiplications and 25 additions per pixel; whereas convolving the same pixel with a 1 x 5 kernel and then a 5 x 1 kernel requires only 10 multiplications and 10 additions per pixel, a 2.5-time improvement in speed. As kernels become larger, the gain in computational efficiency due to the separability property becomes even greater.
Kernels act as selective spatial "filters" for images. Images can be decomposed into collections of sine waves of varying amplitude; the high-frequency components have peaks that are close together and create the fine detail in the image. The low frequencies have long wavelengths, so that just a few waves fit across the width of an image; they comprise it gross structure. The action of a spatial filter is to block some frequencies while passing others. Filters that block high spatial frequencies are called low-pass filters. Those that block low spatial frequencies and pass high ones are called high-pass filters.
At an intuitive level, it seems obvious that kernels that average together adjacent pixels would attenuate high frequencies without affecting long-wavelength image-spanning frequencies. Kernels that smooth images are called low-pass filters. Likewise, kernels that enhance differences between adjacent pixels while ignoring large-scale features would clearly promote high spatial frequencies. Kernels that detect interpixel differences are high-pass filters.
A brief aside on nomenclature: image processing has drawn concepts and terminology from a variety of disparate fields. Electrical engineering, mathematics, signal processing, and information theory have all played important roles in its development; therefore the nomenclature is a mixture of terminology from many disciplines. In one textbook, neighborhood processes are done with kernels, but in another you will find they are called filters, and in another, they are called operators. In this book, the terms are used interchangeably, as they are in the world of image processing.
In the following sections, we discuss operators (kernels) for smoothing and sharpening images. While recognizing their effects in the frequency domain, the discussion is focused on the spatial behavior of kernels. For the interested reader, frequency filtering is covered in detail in Chapter 17, on the Fourier transform.
18.104.22.168 Smoothing Kernels (Low-Pass Filters)
Smoothing kernels average the central pixel with those in its immediate neighborhood. Smoothing is sometimes used to reduce noise; but unfortunately, it also averages out detail in the image. The relative "pass-through" rating of each of the kernels below is the normalized value of the center element. The lower the pass-through, the more effectively the filter blocks high frequencies. This rating is a measure of how much weight the central pixel receives relative to the pixels in the neighborhood.
The "boxcar" blur kernel: ^ x gives all pixels equal weighting. It is the most "egalitarian" of the smoothing kernels, and can lead to severe loss of small-scale detail in an image that appears sharp. Its pass-through rating is 0.111.
This 50%-blur kernel: x gives each of the surrounding pixels equal weight, but gives the more important central pixel twice the weight. It preserves more detail while still softening the image. The pass-through is 0.2.
Was this article helpful?
Adobe Photoshop can be a complex tool only because you can do so much with it, however for in this video series, we're going to keep it as simple as possible. In fact, in this video you'll see an overview of the few tools and Adobe Photoshop features we will use. When you see this video, you'll see how you can do so much with so few features, but you'll learn how to use them in depth in the future videos.