Title: Chapter 3 Introduction to Digital Image Analysis
1Chapter 3Introduction to Digital Image Analysis
2Introduction
- Image Analysis
- Manipulation of image data to determine exactly
what information is required to develop a
computer imaging system - Data reduction process
- Part of a larger process
- Iterative in nature
- Answers application specific questions
-
3- System Model
- Image analysis can be broken into three primary
stages as - Preprocessing
- Data Reduction
- Feature Analysis
-
-
4- Data reduction involves reducing the data in the
spatial domain or frequency domain
5- Application feedback loop is a key aspect which
provides application-specific review of the
analysis results
6Preprocessing
- To make data reduction and analysis task easier
- Consist of following operations
- Noise and artifact removal
- Extracting Region of Interest (ROI)
- Performing mathematical operations
- Enhancement of specific image features
- Data reduction in resolution and brightness
7Image with border
Image with border removed
Shape information required
Image with object shape
8- Region of Interest Image Geometry
- To investigate more closely a specific area of an
image - Consists of following operations
- Crop
- Zoom
- Enlarge
- Shrink
- Translate
- Rotate
9- Crop Selecting a portion of an image, a
sub-image, and cutting it away from the rest of
the image , for example border removal - Zoom
- Enlarging a section of an image, to improve
visual analysis of detailed objects - Can be done by zero hold order (repeating
previous pixel values) or first order hold
(linear interpolation of adjacent pixels) -
-
10- Zero order hold Can also be performed by
convolution in the following way - a. Extend the image by adding rows and columns
of zeroes between existing rows and columns - b. Perform convolution by using the following
convolution mask -
-
11- First order hold
- Can be performed in two ways
- 1. Averaging
- 2. Convolution
- 1. Averaging Allows to enlarge an NN sized
image to a size of (2N-1) (2N-1), and can be
repeated
12Original image array
Image with rows expanded
Image with rows and columns expanded
13- 2. Convolution Consists of 2 steps
- a. Extend the image by adding rows and columns
of zeroes between existing rows and columns
Image extended with zeroes
Original image array
14- b. Convolution Consist of following process
- Overlay the mask on the image
- Multiply the coincident terms
- Sum all the results
- Move to the next pixel, across the entire image
-
-
Convolution mask for first order hold
15(No Transcript)
16(No Transcript)
17- The convolution equation is given by
- where
- M (x,y) is the convolution mask, and
- I (r,c) is the image
18- Shrink Helps to reduce the amount of data that
needs to be processed - Translation and Rotation
- Performed for application specific reasons like
template matching in pattern recognition process - Makes certain image details easier to see
-
19- Translation process can be done with following
equations -
- Rotation process can be done with following
equations
20- Translation and rotation can be combined in one
set of equations as - where
-
21(No Transcript)
22- Arithmetic and Logic Operations
- Performed on pixel by pixel basis
- Arithmetic operations include addition,
subtraction, multiplication and division - Logic operations include AND, OR, and NOT, and
are performed in a bit-wise manner
23- Arithmetic operations are performed on a pixel by
pixel basis
24- Addition
- Combines information in two images
- Applications include
- 1. Creating models for restoration algorithm
development - 2. Image sharpening algorithms
- 3. Special effects such as image morphing time
based operation in which a proportionally
increasing amount of second image is added to the
first image
25Second Original
Addition of images
First Original
Original image
Gaussian noise, variance 400, mean 0
Addition of images
26- Subtraction
- Used for motion detection and background
- subtraction
- Applications include
- 1. Object tracking
- 2. Medical imaging
- 3. Law enforcement
- 4. Military applications
-
27b. Same scene later
a. Original scene
Subtraction of scene a from scene b
Subtracted image with threshold of 100
28- Multiplication and Division
- To adjust the brightness of an image
- Applications include
- 1. To combine two images for special
- effects
- 2. For image filtering in spectral domain
- 3. To model multiplicative noise process
29Image Multiplication
Multiplication of two images
Cameraman image
X-ray image of hand
30Image Division
Original image
Image divided by valuelt1
Image divided by valuegt1
31- Logic operations are performed on a pixel by
pixel basis, and in a bit-wise manner
32- Logic operations
- AND, OR and NOT form a complete set of logic
operators - AND and OR are used
- 1. To combine information in two images
- 2. For image masking operation
- 3. For extracting Region of Interest
- NOT operation creates a negative of the original
image
33Image Masking
a. Original image
b. Image mask (AND)
c. ANDing a and b
d. Image mask (OR)
e. ORing a and d
34NOT operation
Original image
Image after NOT operation
35- Spatial Filters
- Operate on raw image data in the (r,c)
- space, by considering small neighborhoods, 3x3,
5x5, 7x7, and moving sequentially across and down
the image - Returns a result based on a linear or nonlinear
operation - Consists of three types of filters
- Mean filters
- Median filters
- Enhancement filters
36- Many spatial filters are linear filters
implemented with a convolution mask - the result is a weighted sum of a pixel and its
neighbors - Mask coefficients tend to effect the image in
the following general ways - Coefficients are positive blurs the image
- Coefficients are alternating positive and
negative sharpens the image - Coefficients sum to 1 brightness retained
- Coefficients sum to 0 dark image
37- Mean filters
- Averaging filters
- Tend to blur the image
- Adds a softer look to the image
- Example 3x3 convolution mask
-
38Mean filter
Mean filtered image
Original image
39- Median filters
- Nonlinear filter
- Sorts the pixel values in a small neighborhood
and replaces the center pixel with the middle
value in the sorted list - Output image needs to be written to a separate
image (a buffer), so that results are not
corrupted - Neighborhood can be of any size but 3x3, 5x5 and
7x7 are typical -
40Median filter
Original image with salt and pepper noise
Median filtered image (3x3)
41- Enhancement filters
- Implemented with convolution masks having
alternating positive and negative coefficients - Enhance the image by sharpening
- Two types considered here
- Laplacian-type filters
- Difference filters
-
42- 1. Laplacian-type filters
- Are rotationally invariant, that is they enhance
the details in all directions equally - Example convolution masks of Laplacian-type
filters are -
Filter 2
Filter 3
Filter 1
43Laplacian filter
Contrast enhanced version of Laplacian filtered
image
Laplacian filtered image
Original image
44- 2. Difference filters
- Also called as emboss filters
- Enhances the details in the direction specific to
the mask selected - Four primary difference filter convolution masks,
corresponding to the edges in the vertical,
horizontal, and two diagonal directions are
Diagonal 2
Horizontal
Diagonal 1
Vertical
45Difference filter
Original image
Difference filtered image
Difference filtered image added to the original
image, with contrast enhanced
46- Image Quantization
- Process of reducing the image data by removing
some of the detail information by mapping groups
of data points to a single point - Performed on spatial coordinates, (r,c), for
spatial reduction or pixel values, I(r,c,) - for gray level reduction
-
47- Gray level reduction
- Reducing the number of gray levels, typically
from 256 levels for 8-bit per pixel data to fewer
than 8 bits - Can be performed by
- Thresholding
- AND or OR masks
-
48- Thresholding
- 1. Performed by setting a threshold value
- and setting all pixels above it to 1 and
those below it to 0 - 2. Output is a binary image
- 3. Useful in extracting object features
- such as shape, area, or perimeter
49- False Contouring
- Artificial edges or lines that appear in images
with reduced number of gray levels - Can be improved by using an Improved Gray Scale
(IGS) quantization method - IGS quantization method improves the results of
gray level reduction by adding a random number to
each pixel value before the quantization
50False Contouring
Original 8-bit image, 256 gray levels
Quantized to 6 bits , 64 gray levels
Quantized to 3 bits , 8 gray levels
Quantized to 1 bits , 2 gray levels
51IGS quantization
Original image
IGS quantization to 8 levels (3 bits)
Uniform quantization to 8 levels (3 bits)
52- Halftoning/Dithering
- Reduces the number of gray levels by creating dot
patterns or dither patterns to represent various
gray levels - Based on the idea of diffusing the quantization
error across edges, where changes occur in the
image - Reduces effective spatial resolution
- Typically used for printing purposes
53Original image
Floyd-Steinberg error diffusion, 1 bpp
Bayers ordered dither, 1 bpp
45-degree clustered-dot dither, 1 bpp
54- Uniform bin width quantization The size of the
bins for the quantization is equal - Variable bin width quantization Unequal bin
size, based on an application specific basis -
55Variable bin-width quantization
After variable bin-width quantization
Original image
56- Spatial Quantization
- Reducing the image size by taking groups of
spatially adjacent pixels and mapping them to one
pixel - May produce simple forms of geometric distortion
- Can be performed in following ways
- Averaging
- Median
- Decimation
-
57Spatial Quantization Methods
- Averaging Groups of pixels are averaged and the
group is replaced by the average - Median Pixel gray values are sorted in small
neighborhood and the neighborhood is replaced by
the middle value - Decimation Known as sub-sampling, reduces the
image size by eliminating rows and columns
58Spatial Reduction
Averaging (64128)
Median (64128)
Original 512512 image
Decimation (64128)
59- Anti-aliasing filtering Process of improving the
image quality when applying the decimation
technique, by preprocessing the image with
averaging (mean) spatial filter
Result of spatial reduction of 512x512 to
128x128 via decimation
Result of spatial reduction of 512x512 to
128x128 via decimation, preprocessed by a 5x5
averaging filter