Q4Digital Image Processing
Question
Q.2. (a) Discuss image sharpening by using second order derivative example. [8]
(b) Discuss image sharpening (in frequency domain) by Gaussian 2D low pass filter. [8]
Answer
Second-order derivative (Laplacian) sharpening amplifies edges by adding back the Laplacian response to the original image, and frequency-domain sharpening via a Gaussian low-pass filter is achieved by using its complement (1 minus the Gaussian low-pass transfer function) as a high-frequency emphasis/high-pass filter, boosting edge and detail content while suppressing smooth low-frequency regions.
(a) Image Sharpening Using Second-Order Derivative
Image sharpening enhances edges and fine detail using the Laplacian operator, a second-order derivative that is isotropic (direction-independent). The continuous form is the sum of second partial derivatives:
In discrete form, this is implemented via small convolution masks such as [[0,1,0],[1,-4,1],[0,1,0]] (4-connected) or [[1,1,1],[1,-8,1],[1,1,1]] (8-connected), both having coefficients summing to zero so that the response is zero in flat regions and large in magnitude at edges. Sharpening is performed by combining this Laplacian response back with the original image: g(x,y) = f(x,y) - Laplacian(f(x,y)) when the mask's center coefficient is negative, which amplifies the intensity difference exactly at edge locations, making transitions appear steeper and more pronounced (an overshoot on both sides of each edge), while leaving flat, edge-free regions completely unaffected since the Laplacian response there is exactly zero.
For example, at an edge where intensity transitions from a dark value of 50 to a bright value of 200, the Laplacian produces a strongly negative response just on the dark side (where the center pixel is dimmer than its neighbors, weighted by the negative center coefficient) and a strongly positive response just on the bright side. Subtracting this signed response from the original image pushes the dark side darker still and the bright side brighter still, visibly steepening the transition and increasing local contrast at the edge while flat regions elsewhere in the image remain completely unchanged.
(b) Frequency-Domain Sharpening Using Gaussian Low-Pass Filter
The Gaussian Low-Pass Filter (GLPF) transfer function in the frequency domain is defined as:
where D(u,v) is the distance of frequency-plane point (u,v) from the origin, and sigma controls the cutoff/spread of the filter. Since this filter passes low frequencies (values of H close to 1 near the origin) and attenuates high frequencies (values of H close to 0 far from the origin), it produces smoothing/blurring when directly applied to an image's Fourier transform. To achieve sharpening rather than smoothing, the complement of this Gaussian low-pass filter is used, since sharpening requires emphasizing high frequencies (edges, fine detail) rather than suppressing them:
This Gaussian high-pass filter passes high frequencies (H approaches 1 far from the origin, where edges and fine detail reside in the frequency spectrum) while suppressing low frequencies (H approaches 0 near the origin, where smooth background content resides). In practice, pure high-pass filtering removes the average/DC intensity information entirely, producing a mostly dark image with only edge information visible; therefore, a technique called high-frequency emphasis filtering is commonly used instead of a pure high-pass filter for sharpening: the high-pass filtered result is scaled by a constant gain factor greater than 1 and then added back to the original image (or equivalently, a constant offset plus a scaled high-pass component is applied directly in the frequency domain, H_emphasis(u,v) = a + b x H_HP(u,v), with a >= 0 and b > 1). This boosts high-frequency edge content while still retaining the overall low-frequency brightness/contrast structure of the original image, achieving a well-balanced sharpening effect analogous to unsharp masking performed directly in the frequency domain using the Gaussian filter's complement.
The choice of sigma (equivalently expressed via a cutoff distance D0) in the Gaussian filter determines how much of the frequency spectrum is treated as 'high frequency' for the purposes of sharpening: a small sigma value produces a low-pass filter that passes only a very narrow band of frequencies near the origin, so its complementary high-pass version suppresses only a narrow low-frequency band and boosts a very wide range of mid and high frequencies, giving strong overall sharpening including fine texture; a larger sigma value produces a low-pass filter with a wider passband, so its complement suppresses a correspondingly wider low-to-mid frequency range and boosts only the very highest frequencies, giving more selective sharpening focused primarily on the sharpest edges and finest detail while leaving broader mid-frequency textures relatively unaffected. This makes sigma (or D0) a tunable parameter that lets a practitioner control how aggressively and how selectively the frequency-domain sharpening operation acts on a given image.
This frequency-domain Gaussian-based sharpening approach and the spatial-domain Laplacian-based sharpening approach described in part (a) achieve conceptually related outcomes (both emphasize high-frequency edge content over smooth low-frequency content) but operate through entirely different computational mechanisms: the Laplacian approach directly convolves a small spatial mask with the image, which is computationally efficient for small mask sizes, whereas the Gaussian frequency-domain approach requires computing the full 2D Fourier transform of the image, multiplying by the filter transfer function, and computing the inverse transform, which is more computationally expensive per operation but allows very precise, global control over exactly which frequency components are boosted or suppressed across the entire image simultaneously.
The Gaussian low-pass filter's smooth, monotonically-decreasing transfer function (unlike the sharp cutoff of an ideal low-pass filter) is precisely why it produces no ringing artifacts when used either directly for smoothing or, via its complement, for sharpening applications - the Gaussian function has no discontinuities or sharp transitions in either the spatial or frequency domain (being its own Fourier transform pair, a mathematical property unique among common filter functions), meaning any frequency-domain multiplication by a Gaussian-shaped transfer function corresponds to a smooth, well-behaved spatial-domain convolution operation, free of the oscillatory Gibbs-phenomenon artifacts that arise from the sharp frequency-domain discontinuities of an ideal (brick-wall) filter response.
In practical frequency-domain sharpening applications using Gaussian-based high-frequency emphasis, the degree of sharpening achieved is controlled by two parameters: the Gaussian filter's own standard deviation (or equivalently its cutoff frequency parameter, controlling which frequency range is considered high-frequency detail to be emphasized), and an additional gain/boost factor applied to the extracted high-frequency component before adding it back to the original image (or a scaled version of the original), analogous to the spatial-domain unsharp masking technique - selecting an overly aggressive combination of these parameters can lead to visible overshoot/undershoot artifacts near strong edges and amplified visibility of noise (since high-frequency noise is boosted along with genuine high-frequency image detail), representing a practical trade-off that must be tuned according to the specific image content and desired sharpening strength for a given application.