Digital Image Fundamentals
Digital Image Fundamentals
Digital Image Fundamentals
Fundamentals
Key Stages in Digital Image
Processing
Image Morphologica
Restoration l Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Aquisition
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Enhancement
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Restoration
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Morphological Processing
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Segmentation
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Object Recognition
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Representation & Description
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Compression
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Colour Image Processing
Image Morphologica
Restoration l Processing
Image Segmentatio
Enhancement n
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
Elements of Visual Perception
f ( x, y ) i ( x, y ) r ( x, y )
Image Sampling and Quantization
Sampling and quantization
Representing digital images
Saturation and noise
Spatial and gray-level resolution
Subsampled and resampled
Reducing spatial resolution
Varying the number of gray levels
N and k in different-details images
Zooming and shrinking
Some Basic Relationships Between
Pixels
Neighbors of a pixel
◦ Horizontal and vertical neighbors.
(x+1, y), (x-1, y), (x, y+1), (x, y-1)
◦ Four diagonal neighbors: ND(p)
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
◦ 4-neighbors of p: N4(p).
◦ 8-neighbors of p: N8(p).
N8(p) = N4(p) ∪ ND(p)
Adjacency
Connectivity
Regions
Boundary
Adjacency
p
p
8-adjacency: N4(p)
4- ∪ND(p)
Nadjacency:
4(p)
N4(p)
4-adjacency: if q is in the set N4(p).
8-adjacency: if q is in the set N8(p).
m-adjacency: if
– if q is in the set N4(p), or
– if q is in the set ND(p) and the set N4(p)∩N4(q) has
no pixels whose values are from V.
m-Adjacency
A mixed adjacency combines 4- and 8-
adjacency to avoid the ambigities.
Multiple 8- m-adjacency
adjacency
Two pixels p and q are m-adjacent if
(i) q is in N4(p) or,
(ii)q is in ND(p) and N4(p)∩ N4(q) has no pixel.
Path:
◦ (x0, y0), (x1, y1), …, (xn, yn) where (xi, yi) and (xi+1,
yi+1) are adjacent.
◦ Closed path: (xn, yn) = (x0, y0)
Connectivity:
◦ Two pixels are said connected if they have the same value
and there is a path between them.
◦ If a S is a set of pixels,
For any pixel p in S, the set of pixels that are connected to it is
called a connected component of S.
If S has only one connected component, S is called a connected
set.
Regions
R is a region if R is a connected set.
The pixel in the boundary (contour) has at
41
Rotation
y
y’
x’
θ
x
42
MATLAB Example
z=imread('cameraman.tif');
% original coordinates
[x,y]=meshgrid(1:256,1:256);
% new coordinates
a=2;
for i=1:256;for j=1:256;
x1(i,j)=a*x(i,j);
y1(i,j=y(i,j)/a;
end;end
% Do the interpolation
z1=interp2(x,y,z,x1,y1,'cubic');
EE465: Introduction to Digital
Image Processing 43
Rotation Example
θ=3o
44
Scale
a=1/2
x' a 0 x
y ' 0 1 / a y
45
Affine Transform
square parallelogram
x' a11 a12 x d x
y ' a
21 a22 y d y
47
Shear
square parallelogram
x' 1 0 x d x
y ' s 1 y d
y
x ' 1 0 x 0
y ' .5 1 y 1
image blending.
Each of these methods is a point processing operation
50
Arithmetic Image Operations
(blending)
51
Example of Image Addition
52
Image Subtraction
Image subtraction is useful for visualizing the difference between two
images.
◦ One way of telling whether two images are identical is to subtract one
from the other and if the maximum sample value of the result is zero
then the images are identical.
Example: A source image is equalized in intensity. The equalized image is
subtracted from the source to highlight areas of change.
Image Subtraction:
We may have to adjust the gray-scale of the subtracted
image to be [0, 255] (if 8-bit is used).
54
Image multiplication
Consider multiplying a full color source with an image having only white and
black.
◦ The binary image is known as a mask where the white pixels pass the source
image to the output while the black pixels erase the corresponding source
images pixels.
◦ Multiplication is a good technique for either adding color to a line drawing or
for emphasizing edges in a full color image.
◦ In part (a) of this figure, a source image is multiplied by the mask of (b) to
obtain the output of (c). Many image processing applications use image
multiplication to create artistic filters for digital artists.