Chapter 3 Image Enhancement in the Spatial Domain

  • Slides: 38
Download presentation
Chapter 3 Image Enhancement in the Spatial Domain

Chapter 3 Image Enhancement in the Spatial Domain

Outline n n n n n Background Basic Gray-level transformation Histogram Processing Arithmetic-Logic Operation

Outline n n n n n Background Basic Gray-level transformation Histogram Processing Arithmetic-Logic Operation Basics of Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Methods Fuzzy techniques*

Background Image enhancement approaches fall into two broad categories: spatial domain methods and frequency

Background Image enhancement approaches fall into two broad categories: spatial domain methods and frequency domain methods. n The term spatial domain refers to the image plane itself. n g(x, y)= T[f(x, y)] , T is an operator on f, defined over some neighborhood of f(x, y) n

Size of Neighborhood Point processing n Larger neighborhood: mask (kernel, template, window) processing n

Size of Neighborhood Point processing n Larger neighborhood: mask (kernel, template, window) processing n

Gray-level Transformation Contrast stretching thresholding

Gray-level Transformation Contrast stretching thresholding

Basic Gray Level Transformation n Image negatives: s =L-1 -r Log transformation: s =clog(1+r)

Basic Gray Level Transformation n Image negatives: s =L-1 -r Log transformation: s =clog(1+r) Power-law transformation: s=crg

Image Negatives

Image Negatives

Log Transformation

Log Transformation

Gamma Correction (I) n Cathode ray tube (CRT) devices have an intensity-to-voltage response that

Gamma Correction (I) n Cathode ray tube (CRT) devices have an intensity-to-voltage response that is a power function, with exponents varying from 1. 8 to 2. 5.

Gamma Correction (II)

Gamma Correction (II)

Power-Law Transformation (I)

Power-Law Transformation (I)

Power-Law Transformation (II)

Power-Law Transformation (II)

Piece-wise Linear Transformation n Contrast stretching Gray-level slicing (Figure 3. 11, 12) Bit-plane slicing

Piece-wise Linear Transformation n Contrast stretching Gray-level slicing (Figure 3. 11, 12) Bit-plane slicing (Figures 3. 13 -15)

Gray-level Slicing

Gray-level Slicing

Bit-plane Slicing

Bit-plane Slicing

Bit-plane Slicing (Example 1)

Bit-plane Slicing (Example 1)

Bit-plane Slicing (Example 2)

Bit-plane Slicing (Example 2)

Histogram Processing n n n The histogram of a digital image with gray-levels in

Histogram Processing n n n The histogram of a digital image with gray-levels in the range [0, L-1] is a discrete function h(rk)=nk where rk is the kth gray level and nk is the number of pixels in the image having gray level rk Normalized histogram: p(rk)=nk/MN. Easy to compute, good for real-time image processing.

Four Basic Image Types

Four Basic Image Types

Histogram Transformation n T(r) is a monotonically increasing function

Histogram Transformation n T(r) is a monotonically increasing function

Histogram Equalization n What if we take the transformation T to be: It can

Histogram Equalization n What if we take the transformation T to be: It can be shown that ps(s)=1/(L-1) n Example 3. 4 (p. 125) n

Histogram Equalization: Discrete Case n Example 3. 5 (p. 126)

Histogram Equalization: Discrete Case n Example 3. 5 (p. 126)

Histogram Equalization: Examples

Histogram Equalization: Examples

Histogram Matching

Histogram Matching

Local Histogram Processing

Local Histogram Processing

Histogram Statistics n N-th moment of r about its mean:

Histogram Statistics n N-th moment of r about its mean:

Logic Operations

Logic Operations

Arithmetic Operations Image Subtraction n Image Averaging n

Arithmetic Operations Image Subtraction n Image Averaging n

Basics of Spatial Filtering • Mask, convolution kernels • Odd sizes

Basics of Spatial Filtering • Mask, convolution kernels • Odd sizes

Spatial Correlation and Convolution Correlation Convolution

Spatial Correlation and Convolution Correlation Convolution

Smoothing Spatial Filters n Smoothing linear filters: averaging filters, low-pass filters n n n

Smoothing Spatial Filters n Smoothing linear filters: averaging filters, low-pass filters n n n Box filter Weighted average Order-statistics filters: n n n Median-filter: removing salt-and-pepper noise Max filter Min filter

Smoothing Filters (I)

Smoothing Filters (I)

Smoothing Filters (II)

Smoothing Filters (II)

Sharpening Spatial Filters n Foundation:

Sharpening Spatial Filters n Foundation:

The Laplacian n Development of the method:

The Laplacian n Development of the method:

Image Enhancement

Image Enhancement

The Gradient Simplification

The Gradient Simplification

Combining Spatial Enhancement Methods (a) original (b) Laplacian, (c) a+b, (d) Sobel of (a)

Combining Spatial Enhancement Methods (a) original (b) Laplacian, (c) a+b, (d) Sobel of (a) (b) (c) (d)