Q19Digital Image Processing
Question
Write detailed notes on: (a) Histogram Processing (b) Homomorphic filtering.
Answer
An exhaustive theoretical breakdown of Histogram Processing (Equalization and Matching) for mathematical contrast optimization, followed by a rigorous analysis of Homomorphic Filtering for eradicating catastrophic illumination gradients.
The Histogram of a digital image is a strict probability density function mapping the frequency of every intensity level. If an image is massively underexposed (dark), all pixels are violently clustered at the low end of the histogram. Histogram processing algorithms mathematically force the pixels to spread across the entire dynamic range, instantly maximizing the visual contrast.
1. Histogram Equalization
This is a fully automatic, globally optimal mathematical algorithm. Its absolute goal is to violently transform the input image so that the resulting output image possesses a perfectly flat (uniform) histogram, meaning every single intensity level from 0 to 255 is used exactly the same number of times.
- The Mathematics: The algorithm calculates the Cumulative Distribution Function (CDF) of the input histogram. The CDF is a strictly monotonically increasing curve.
- The Transformation: Every single pixel in the input is mapped to a new output pixel using the strict formula: .
- Result: The dark, clustered pixels are aggressively stretched apart mathematically. The contrast of the image violently explodes, revealing hidden structural details in the shadows without any human intervention.
2. Histogram Matching (Specification)
Equalization is blind; you cannot control the exact output. Histogram Matching is a highly controlled architecture. The engineer mathematically provides a specific, target histogram curve. The algorithm calculates the CDF of both the input image and the target curve, and violently forces the image to adopt the exact mathematical shape of the target histogram.
Standard spatial and frequency filters mathematically fail when an image suffers from non-uniform illumination (e.g., taking a photo of a face with the sun directly behind it). The image model dictates that the intensity is the mathematical product of the Illumination (slow-changing, low frequency) and the Reflectance (fast-changing, high frequency): .
The Mathematical Execution
You cannot use a standard filter because the components are multiplied, not added. Homomorphic Filtering executes a brilliant mathematical workaround:
- 1. Logarithmic Transformation: The algorithm applies a massive Natural Logarithm to the image: . The multiplication is violently shattered into an addition problem.
- 2. FFT: The log image is transformed into the Frequency Domain via FFT.
- 3. High-Frequency Emphasis Filter: The engineer applies a highly specialized filter that aggressively suppresses the low frequencies (annihilating the terrible illumination shadow) and violently amplifies the high frequencies (boosting the structural reflectance detail).
- 4. IFFT & Exponential: The image is transformed back to the spatial domain, and the inverse Exponential function () is applied to undo the initial logarithm.
- Result: The catastrophic shadow is completely eradicated, and the structural details of the face are mathematically restored.