Image Enhancement
Image Enhancement
Image enhancement improves the visual appearance of an image or makes it more suitable for analysis and interpretation.
Spatial Domain Image Enhancement
Spatial domain methods operate directly on image pixels.
Where:
- f(x,y) → input image
- g(x,y) → enhanced image
- T → transformation function
Gray Level Transformations
Gray level transformations modify pixel intensity values.
Image Negative
Used to enhance white or gray details in dark regions.
| Input (r) | Output (s) |
|---|---|
| Dark | Bright |
| Bright | Dark |
Application: Medical imaging, X-ray images
Logarithmic Transformation
Expands dark pixel values and compresses bright values.
Use: Fourier spectrum display
Power-Law (Gamma) Transformation
| γ Value | Effect |
|---|---|
| γ < 1 | Brightens image |
| γ > 1 | Darkens image |
Application: Gamma correction in monitors
Piecewise Linear Transformation
Used for contrast stretching.
| Technique | Purpose |
|---|---|
| Contrast stretching | Improves contrast |
| Gray level slicing | Highlights ranges |
| Bit-plane slicing | Binary image analysis |
Histogram Processing
A histogram represents the distribution of gray levels.
Image Histogram
| Feature | Description |
|---|---|
| x-axis | Gray levels |
| y-axis | Frequency |
Histogram Equalization
Redistributes gray levels to improve contrast.
Advantages:
- Automatic contrast enhancement
- No parameter tuning
Limitation:
-
May over-enhance noise
Histogram Specification (Matching)
Maps histogram to a desired shape.
Application: Medical & satellite images
Histogram Equalization vs Specification
| Feature | Equalization | Specification |
|---|---|---|
| Output | Uniform | User-defined |
| Control | Low | High |
| Complexity | Simple | Moderate |
Basics of Spatial Filtering
Spatial filtering modifies pixel values using a filter mask (kernel).
Spatial Filtering Equation
Where:
- w(i,j) → filter mask
- f(x,y) → input image
Types of Spatial Filters
| Filter Type | Purpose |
|---|---|
| Smoothing | Noise removal |
| Sharpening | Edge enhancement |
Smoothing Spatial Filtering
Used to reduce noise and detail.
Mean (Averaging) Filter
Effect: Blurs image
Weighted Mean Filter
Gives higher weight to center pixel.
Median Filter
Replaces pixel with median value.
Best for: Salt-and-pepper noise
Comparison of Smoothing Filters
| Filter | Noise Removal | Edge Preservation |
|---|---|---|
| Mean | Good | Poor |
| Weighted | Better | Moderate |
| Median | Excellent | Good |
Sharpening Spatial Filtering
Used to highlight edges and fine details.
First-Order Derivative (Gradient)
| Operator | Mask |
|---|---|
| Roberts | 2×2 |
| Prewitt | 3×3 |
| Sobel | 3×3 |
Sobel Mask (Horizontal)
Second-Order Derivative (Laplacian)
Property: Highlights regions of rapid intensity change
Unsharp Masking & High-Boost Filtering
| k | Effect |
|---|---|
| 1 | Unsharp masking |
| >1 | High-boost |
Smoothing vs Sharpening
| Feature | Smoothing | Sharpening |
|---|---|---|
| Purpose | Noise reduction | Edge enhancement |
| Effect | Blur | Highlight details |
| Filters | Mean, Median | Sobel, Laplacian |
Applications
| Technique | Application |
|---|---|
| Histogram equalization | Medical images |
| Median filter | Noise removal |
| Sobel operator | Edge detection |
| Laplacian | Image sharpening |
Introduction to Frequency Domain Processing
In frequency domain processing, an image is transformed from the spatial domain to the frequency domain, processed, and then converted back.
Basic Idea
Where:
- f(x,y) → input image
- F(u,v) → frequency representation
- g(x,y) → enhanced image
Why Frequency Domain?
| Reason | Explanation |
|---|---|
| Low frequencies | Represent smooth areas |
| High frequencies | Represent edges & noise |
| Filtering | Easy separation of components |
Fourier Transform (FT)
2D Discrete Fourier Transform
Inverse DFT
Properties of Fourier Transform
| Property | Meaning |
|---|---|
| Linearity | Sum of transforms |
| Periodicity | Repeating spectrum |
| Symmetry | Complex conjugate |
| Convolution | Multiplication in frequency domain |
Frequency Domain Filtering
Filtering Equation
Where:
-
H(u,v) → frequency filter
Smoothing (Low-Pass) Frequency Domain Filters
Low-pass filters suppress high-frequency noise.
Ideal Low-Pass Filter (ILPF)
| Feature | Description |
|---|---|
| Cutoff | Sharp |
| Ringing | High |
| Practical use | Limited |
Butterworth Low-Pass Filter (BLPF)
| Parameter | Meaning |
|---|---|
| D₀ | Cutoff frequency |
| n | Filter order |
Gaussian Low-Pass Filter (GLPF)
| Advantage | Explanation |
|---|---|
| No ringing | Smooth transition |
| Best visual result | Preferred |
Sharpening (High-Pass) Frequency Domain Filters
High-pass filters enhance edges and fine details.
Types of High-Pass Filters
| Filter | Description |
|---|---|
| Ideal HPF | Sharp cutoff |
| Butterworth HPF | Smooth cutoff |
| Gaussian HPF | No ringing |
High-Pass Filter Relation
Comparison of Frequency Domain Filters
| Feature | Ideal | Butterworth | Gaussian |
|---|---|---|---|
| Transition | Abrupt | Gradual | Very smooth |
| Ringing | Severe | Moderate | None |
| Practical use | Low | Medium | High |
Homomorphic Filtering
Purpose: Separates illumination and reflectance components of an image.
Image Model
Taking log:
Steps in Homomorphic Filtering
- Log transformation
- Fourier transform
- High-pass filtering
- Inverse FT
- Exponential operation
Advantages
| Benefit | Use |
|---|---|
| Illumination correction | Uneven lighting |
| Contrast enhancement | Medical images |
Color Image Enhancement
Color image enhancement improves visual quality of color images.
RGB-Based Enhancement
- Enhance each channel separately
- Risk of color distortion
HSI-Based Enhancement (Preferred)
| Step | Description |
|---|---|
| Convert RGB → HSI | Separate intensity |
| Enhance Intensity | Histogram or filtering |
| Convert back | HSI → RGB |
Advantage: Preserves original color information
Frequency Domain Color Enhancement
- Apply frequency filtering on Intensity component
- Used in satellite & medical images
Applications
| Technique | Application |
|---|---|
| Gaussian LPF | Noise reduction |
| Butterworth HPF | Edge sharpening |
| Homomorphic filtering | Illumination normalization |
| Color enhancement | Remote sensing |
Exam-Oriented Key Points
- Draw frequency filter shapes
- Write ILPF, BLPF, GLPF formulas
- Explain homomorphic filtering steps
- Compare Ideal vs Butterworth vs Gaussian