Download Intensity Transformations and Spatial Filtering-Digital Image Processing-Lecture 05 Slides Slides-Electrical and Computer Engineering and more Slides Digital Image Processing in PDF only on Docsity!
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Computer Vision &
Digital Image Processing
Intensity Transformations and Spatial Filtering
Intensity Transformations and Spatial Filtering Basics
- Operations take place in the spatial domain
- Operate directly on pixel values
- Often more computationally efficient and requires less resources
- General form for operations is:
- Where f(x,y) is the input image, g(x,y) is an output image, T is an operator on f defined over a neighborhood of point (x,y)
g ( x , y )= T [ f ( x , y )]
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Intensity Transformations and Spatial Filtering Basics (continued)
- The operator can apply to a single image or to a set of images
- The point (x,y) shown is an arbitrary point in the image
- The region containing the point is a neighborhood of (x,y)
- Typically the neighborhood is rectangular, centered on (x,y) and is much smaller than the image
Intensity Transformations and Spatial Filtering Basics (continued)
- Spatial filtering
- Generally involves operations over the entire image
- Operations take place involving pixels within a neighborhood of a point of interest (x,y)
- Also involves a predefined operation called a spatial filter
- The spatial filter is also commonly referred to as:
- Spatial mask
- Kernel
- Template
- Window
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Some Basic Intensity Transformation Functions
- Here, T is a transformation that maps a pixel value r into a pixel value s
- Since we are concerned with digital data, the transformation can generally be implemented with a simple lookup table
- Three basic types of transformations
- Linear (negative and identity transformations)
- Logarithmic (log and inverse-log transformations)
- Power-law (nth^ power and n th^ root transformations)
General Form for Basic Intensity Transformations
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Image Negatives
- The negative of an image with intensity levels in the range [0,L-1] can be described by:
s = L − 1 − r
Log Transformations
- General form:
- c is a constant and r≥ 0
- Maps a narrow range of low intensity values in input to a wider output range
- The opposite is true for high intensity input values
- Compresses the dynamic range of images with large variations in pixel values
s = c log( 1 + r )
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Power-Law Transformation Curves
Gamma Correction
- Many devices used for image capture, display and printing respond according to a power law
- The exponent in the power-law equation is referred to as gamma
- The process of correcting for the power-law response is referred to as gamma correction
- Example:
- CRT devices have an intensity-to-voltage response that is a power function (exponents typically range from 1.8-2.5)
- Gamma correction in this case could be achieved by applying the transformation s=r 1/2.5^ =r 0.
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Gamma Correction Example
Gamma Correction (MRI Example)
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Contrast Stretching
- Contrast stretching expands the range of intensity levels in an image so it spans a given (full) intensity range
- Control points (r 1 ,s 1 ) and (r 2 ,s 2 ) control the shape of the transform T(r)
- r 1 =r 2 , s 1 =0 and s 2 =L- yields a thresholding function
Intensity-level Slicing
- Used to highlight a specific range of intensities in an image that might be of interest
- Two common approaches
- Set all pixel values within a range of interest to one value (white) and all others to another value (black) - Produces a binary image
- Brighten (or darken) pixel values in a range of interest and leave all others unchanged
Electrical & Computer Engineering Dr. D. J. Jackson Lecture 5-
Intensity-level Slicing (Angiogram Example)
Bit-plane Slicing
- Pixels are digital values composed of bits
- For example, a pixel in a 256-level gray-scale image is comprised of 8 bits
- We can highlight the contribution made to total image appearance by specific bits
- For example, we can display an image that only shows the contribution of a specific bit plane