Professional Documents
Culture Documents
Digital Image Processing and Applications
Digital Image Processing and Applications
APPLICATIONS
2
WHAT IS A GRAY SCALE?
4
5
6
REPRESENTING DIGITAL IMAGE
7
REPRESENTATION OF DIGITAL IMAGE
8
STORAGE BITS FOR VARIOUS VALUES OF N AND K
9
SPATIAL AND INTENSITY RESOLUTION
10
ZOOMING AN IMAGE
Requires two steps:
1) The creation of new pixel location and
2) The assignment of gray levels to those new locations.
Two methods for gray-level assignment to a pixel:
1) The nearest neighbor interpolation and
2) The bilinear interpolation
3) The bicubic interpolation
11
ZOOMING OF AN IMAGE
12
HOW TO ZOOM THE INPUT IMAGE USING
MATLAB?
>>i=imread('circuit.tif');
>> [r,c]=size(i);
>> j=imresize(i,[10*r , 10*c],’nearest’);
>>k=imresize(i, [10*r , 10*c], ‘bilinear’);
>>figure(1),imshow(i);
>> figure(2),imshow(j);
>>Figure(3),imshow(k);
Figure(1) is shown here , which is an input image.
Figure(2) is the zoom of an input image using nearest neighbor
interpolation.
Figure(3) is the zoom of an input image using bilinear interpolation
13
HOW TO ZOOM THE INPUT IMAGE USING
MATLAB? CONT..
14
PIXEL REPLICATION: SPECIAL CASE OF
NEAREST NEIGHBOR INTERPOLATION
BILINEAR AND BICUBIC INTERPOLATION
Let (x,y) denote the coordinates of the location to
which we want to assign an intensity value and let
v(x,y) denote that intensity value. For bilinear
interpolation, the assigned value is obtained using
the equation ,
V(x,y)= ax + by + cxy + d
Bicubic interpolation involves the sixteen nearest
neighbors of a point. The intensity value assigned to
point (x,y) is obtained using equation,
3 3
V(x,y) = Ʃ Ʃ aij x i y j
i=0 j=0 16
COMPARISON BETWEEN NEAREST
NEIGHBOR AND BILINEAR INTERPOLATION
17
BILINEAR INTERPOLATION
Consider enlarging a M x M image to size N x N where M = 500
and N = 750. Imagine scaling the 750 x 750 grid to fit over our
500 x 500 image. Assume our original image is represented by
matrix A and the enlarged image by matrix B. We need to step
over every grid point in the 750 x 750 image (every element in B).
Consider a single element in matrix B, say element B(332, 615).
T he corresponding scaled coordinates of the grid point are:
Note that these coordinate values will always lie between 0 and 499.
The four nearest neighbors of this grid point are: A(221, 409),
A(221, 410), A(222, 409), and A(222, 410). (These coordinate
values can be found by using the floor and ceil functions.)
The bilinear interpolation equation is:
v ( x , y)=a x+b y +c x y+d
BILINEAR INTERPOLATION
26
SHRINKING OF AN INPUT IMAGE
27
SAME SIZE, DIFFERENT PIXEL SIZES
VARYING GRAY LEVEL RESOLUTION
SIZE, QUANTIZATION LEVELS AND DETAILS
Isopreference curves
BASIC RELATIONSHIP BETWEEN PIXELS
Neighborhood
Adjacency
Connectivity
Paths
4-neighbors of a pixel p
are its vertical and
horizontal neighbors
denoted by N4(p).
8-neighbors of a pixel p
are its vertical,
horizontal and 4
diagonal neighbors
denoted by ND(p).
NEIGHBORS OF A PIXEL( CONT..)
N4 :- 4-neighbors.
ND :- diagonal neighbors.
N8- 8- neighbors (N4UND)
ADJACENCY
Pixel p is adjacent to
pixel q ,if they are
connected.
Two image subsets S1
and S2 are adjacent if
some pixel in S1 is
adjacent to some pixel
in S2.
PATHS AND PATH LENGTHS
Euclidean Distance:
De(p,q) = [(x-s) 2 + (y-t)2]
City-block Distance:
D4(p,q) = |x-s| + |y-t|
Chess-board Distance:
D8(p,q)= max(|x-s| , |y-t|)
DISTANCE MEASUREMENT EXAMPLE
MATHEMATICAL
TOOLS USED IN
DIGITAL IMAGE
PROCESSING