Lecture 3 2 5 07 Image Enhancement in





































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