The kernels discussed above tend to have small dimensions, but they can easily be made as large as needed. Large kernels are used to enhance the medium-scale spatial features that 3x3, 5x5, and 7x7 ones scarcely touch. Because of their separability, large kernels can be synthesized by performing successive passes with appropriate one-dimensional kernels. Furthermore, the one-dimensional kernels can be generated algorithmically, to match the size and shape of the particular feature or features slated for enhancement.

The generated kernels described below—boxcar, triangular, Gaussian, and power-law—have properties that depend on the shape of the mask. Of the four, the Gaussian mask is the most useful because it tapers evenly at the edges, smoothly enhancing the high spatial frequencies. Each mask is assigned an effective radius that is designed so that half the sum of the elements in the kernel lies inside the mask and half outside it; however, because the distribution of element values is so different, the size of the generated kernels varies greatly.

The egalitarian "boxcar" kernel assigns equal weight to all pixels when the radius is an integer, and gives a fractional weight to the outermost elements when the radius is non-integer. For half the sum of the elements to mark the effective radius, its value must be 71% of the kernel size. To produce an effective radius of 4.5 pixels, elements 0 through 7 of the boxcar kernel are:

Figure 14.13 Unsharp mask kernels come in a variety of shapes. For good results, a mask must match the point-spread function in the original image. As a general rule, the Gaussian mask best matches the blur in planetary and lunar images, while triangular and power-law masks work for some deep-sky images.

Figure 14.13 Unsharp mask kernels come in a variety of shapes. For good results, a mask must match the point-spread function in the original image. As a general rule, the Gaussian mask best matches the blur in planetary and lunar images, while triangular and power-law masks work for some deep-sky images.

1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 0.435.

Thus, a boxcar mask with an effective radius of 4.5 has a 15 x 15 kernel.

For astronomical images, the boxcar is a crude tool. It produces square shadow artifacts around bright star images and "rings" badly; i.e., it produces periodic banding parallel to horizontal and vertical edges in the image. In the frequency domain, it blocks some high frequencies but passes others. The high frequencies that are retained cause the ringing.

In the one-dimensional triangular kernel, element values decline linearly from the center to the edge. However, because two one-dimensional kernels cannot be convolved to produce a true two-dimensional triangular kernel, the separable triangular unsharp mask is necessarily an approximation. The effective radius is about half the kernel size. Here are elements 0 through 10 of a triangular kernel with an effective radius of 4.5 pixels:

1.000,0.908,0.817, 0.725, 0.633, 0.541, 0.450, 0.378,0.266, 0.174, 0.083. This triangular mask, with an effective radius of 4.5, employs a 21 x 21 kernel. The triangular unsharp mask is useful with astronomical images. When its

effective radius is chosen to match the size of the desired features, it produces a "good looking" gain at high frequencies. In the frequency domain, the triangular mask blocks some high frequencies and passes others; so there is some mild ringing; but the effect is not unpleasant in, for example, lunar images.

Wherever random processes play, the universe generates Gaussian blurs. The Gaussian unsharp mask is superbly well suited for enhancing the high-frequency information that lies hidden beneath the Gaussian blur in soft star images, fuzzy planet pictures, and mushy Moon shots.

However, because the Gaussian function tapers off slowly, Gaussian kernels can be very large. Fortunately, a two-dimensional Gaussian kernel can be separated into two one-dimensional kernels; that is, convolution with two one-dimensional Gaussian kernels produces exactly the same result as convolution with one two-dimensional Gaussian kernel. Consider a Gaussian blur having an effective radius of 4.5 pixels:

1.000, 0.976, 0.901, 0.801, 0.674, 0.539, 0.411, 0.298, 0.206, 0.135,0.085,

Convolution with this function as a two-dimensional 31x31 kernel requires 961 multiplications and additions; but as two one-dimensional kernels, only 61 multiplications and additions are needed.

Figure 14.15 Applying an unsharp mask that is larger than the star images generates conspicuous shadows around bright objects, enhances noise in the sky background, and can cause the image to look artificial. However, choosing the "correct" unsharp mask is largely a matter of personal preference.

Figure 14.15 Applying an unsharp mask that is larger than the star images generates conspicuous shadows around bright objects, enhances noise in the sky background, and can cause the image to look artificial. However, choosing the "correct" unsharp mask is largely a matter of personal preference.

The Gaussian unsharp mask is an all-purpose tool for astronomy. It can be applied to sharpen any image blurred by random processes such as atmospheric turbulence. In the frequency domain, the Gaussian mask provides a smoothly increasing enhancement toward high frequencies.

Selecting the effective radius is extremely important in obtaining full benefit with the Gaussian technique. If the effective radius of the mask lies between 1.4 and 1.7 times that of the atmospheric blur, the image is sharpened without obvious artifacts or ringing. If the effective radius of the mask is equal to or smaller than that of the blurring, enhancement is greatly reduced; and if the effective radius is larger than twice the radius of the blur, artifacts such as dark rings around bright stars may appear.

It is also important to select the contrast factor with care. Unsharp masking enhances image noise along with real image detail. Convolutions, no matter how they are done, have no way to distinguish between pixel value differences generated by random noise and those due to light falling on the detector. For most images, contrast enhancement by a factor between 1.5 and 5 reveals all the image detail possible with unsharp masking.

In the one-dimensional power-law (or "exponential") kernel, element values decline exponentially from the center. In the two-dimensional kernel, element values

Original Unsharp Masked

Figure 14.16 These enlargements show how proper unsharp masking changes the appearance of star images: the outer edges are slightly suppressed while the image core is made a little brighter. Overprocessing deep-sky images usually results in blocky-looking stars surrounded by dark rings.

decline exponentially only along the axes; between the axes, the drop is more rapid than exponential.

Because element values fall so rapidly from the center, the effective radius is roughly one-sixth the kernel size. For an effective radius of 4.5 pixels, the kernel must have a radius of 29:

1.000, 0.777, 0.604, 0.469, 0.364, 0.283, 0.220, 0.171, 0.133, 0.103, 0.080, 0.062, 0.048, 0.036, 0.029, 0.023, 0.018, 0.014, 0.011, 0.008, 0.006, 0.005, 0.004, 0.003, 0.002,

Power-law unsharp masks have interesting properties when applied to astronomical images. The sharp core region enhances small detail while the long exponential tail enhances low-frequency structure, so an exponential mask with an effective radius of 20 pixels gives deep-sky images a pleasant "boost" at both low and high spatial frequencies.

The best unsharp masking kernel to use depends on the characteristics of the point-spread function in your images. Fortunately, there is no limit to the number of unsharp mask profiles possible. A basic set should have enough variety to match different sorts of images. The indispensable one is the Gaussian profile; it mimics the random distribution of atmospheric motions, and is thus similar to well-sampled star image profiles.

The triangular and power-law profiles fall off more rapidly than the Gauss ian one. They match the slightly aberrated images typical of refracting optical systems—telephoto lenses and some refractors—which often have a sharp core surrounded by a soft blur.

The boxcar profile is flat-topped, a characteristic of images that are slightly out of focus. Completing the suite of profiles are the parabolic and cosine profiles that fall off less rapidly than the Gaussian but more rapidly than the boxcar. These profiles match star images that are slightly enlarged from less-than-perfect focus and atmospheric turbulence.

Was this article helpful?

Through this ebook, you are going to learn what you will need to know all about the telescopes that can provide a fun and rewarding hobby for you and your family!

## Post a comment