Project Report EC1758 Digital Image Processing July-Dec 2018
Project Report EC1758 Digital Image Processing July-Dec 2018
PROJECT BY:-
• SIDHARTH DHAMMI 159108130
• SNEHA SINGH 159108171
• HARSH SHAH 159108169
• MANASI SINGH 159108066
1. BILINEAR INTERPOLATION:
BI.m
im = imread('DIP.jpeg');
out = bilinearInterpolation(im, [270 396]);
figure;
imshow(im);
figure;
imshow(out);
bilinearInterpolation.m
function [out] = bilinearInterpolation(im, out_dims)
OUTPUT IMAGE:
1. USING imresize():
resize.m
I = imread('DIP.jpeg');
J = imresize(I,0.3);
figure
imshow(I)
title('Original Image');
figure
imshow(J)
title('Resized Image');
INPUT IMAGE:
OUTPUT IMAGE:
Bilinear interpolation is a relatively simple technique, not much more complicated than
"nearest neighbour" interpolation—where pixel gaps are filled in by simply copying adjacent
pixels. For every "missing" pixel (the pixels that have to be created to blow up the image)
the bilinear method takes the four points that are closest at the diagonal corners and
averages their values out to produce the middle pixel. Bicubic interpolation, in contrast,
takes not only the four closest diagonal pixels, but their closest points as well, for a total of
16 pixels.
PART II
1. ADDITION OF IMAGE:
imgadd.m
I = imread('DIPs1.jpg');
J = imread('DIPm.jpeg');
K = imadd(I,J,'uint8');
imshow(K,[])
INPUT IMAGES:
OUTPUT IMAGE:
2. IMAGE SUBTRACTION:
imgsub.m
I = imread('DIPh.jpeg');
background = imopen(I,strel('disk',15));
J = imsubtract(I,background);
figure
imshow(J)
INPUT IMAGE:
OUTPUT IMAGE: