400 likes | 1.09k Views
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain. Shahram Ebadollahi. DIP ELEN E4830. Today’s Lecture - Outline. Review of Lecture 2 Processing Images in Spatial Domain: Intro Image Histogram Point Operations Using Histogram for Image Enhancement Kernel Operations.
E N D
Lecture 3(2.5.07)Image Enhancement in Spatial Domain Shahram Ebadollahi DIP ELEN E4830
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Processing Images in Spatial Domain: Introduction : Spatial operator defined on a neighborhood N of a given pixel point processing mask processing
Mask (filter, kernel, window, template) processing y y (0,0) (0,0) x x
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
H H Image Histogram normalized histogram 0.5 bi-level image 0 255 256x256 Pixel values linearly increasing from 0 to 255 with increasing column index histogram 1/256 0 255 256x256
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Point Processing:Thresholding Input gray-level value Output gray-level value
L-1 0 L-1 Point Processing:Contrast Stretching
0 L-1 0 L-1 Point Processing: Clipping & Thresholding clipping thresholding
Point Processing:Gray-level Slicing 0 L-1 0 L-1
Point Processing:Bit-plane Slicing lsb msb where, e.g.
Point Processing:Bit-plane Slicing (example) Point operation for obtaining n-th bit-plane: Bi-level image n=7 n=6 n=4 n=5
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Apply a transform to an image such that the resulting image has desired histogram. Histogram Equalization (linearization) Histogram Specification (matching) Non-adaptive vs. Adaptive Histogram Modification Global histogram Local histogram Histogram Modification
Histogram Equalization Equalized Image Source image Corresponding Histograms
Often images poorly use the full range of the gray scale Solution: Transform image such that its histogram is spread out more evenly in gray scale Rather than guessing the parameters and the form of the transformation use original gray-scale distribution as the cue Histogram Equalization
Histogram Equalization Histogram Equalization # pixels with the j-th gray-level Point operation for equalizing histogram for the example image image size
Transform image such that resulting image has specified histogram Histogram Matching Histogram Matching
Adaptive Histogram Equalization y (0,0) Histogram Equalization Note: local structure revealed x
Today’s Lecture - Outline • Review of Lecture 2 • Processing Images in Spatial Domain: Intro • Image Histogram • Point Operations • Using Histogram for Image Enhancement • Kernel Operations
Kernel Operator: Intro Note: need to handle borders of the image
Kernel Operator: Intro Spatial Filtering kernel
Low-pass filter FT FT Smoothing: Image Averaging * Image edges are softened
Smoothing: Averaging (example) original 3x3 5x5 9x9 Noise effect is gone, but image edges are heavily blurred also 15x15 35x35
Order Statistics Filter original
Image Sharpening: 1-st derivative Image gradient: Robert’s operator Sobel filter in frequency domain Sobel’s operator
Image Sharpening: 2-nd derivative Image Laplacian:
Image Sharpening: 2-nd derivative + * Laplacian filter in frequency domain
High-boost Filtering Avg. - + + Unsharp mask: high-boost with A=1
Recap • Point operations vs. Kernel Operations • Image Histogram • Image Enhancement using Point Operators • Contrast Stretching • Gamma Correction • Using Image Histogram for Enhancement • Histogram Equalization • Histogram Matching • Image Enhancement using Kernel Operators • Low-pass filtering (averaging) • High-pass filtering (sharpening)