Project Report Subject: "Computer Graphics" Sir: "Dr. M Sajad Khan" Group Members: Babar Akram 16-Arid-864 Junaid Naeem 16-Arid-891

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Project Report

SUBJECT: “COMPUTER GRAPHICS”


SIR: “DR. M SAJAD KHAN”
GROUP MEMBERS:
 BABAR AKRAM 16-ARID-864
 JUNAID NAEEM 16-ARID-891

PROJECT TOPIC:
“2D IMAGE ZOOMING USING MATLAB”

HARDWARE INFORMATION:
 HP LAPTOP
 INTER CORE I5
 8 GB RAM
SOFTWARE AND TOOLS USED:
MATLAB VERSION 2014
ABSTRACT OF OUR PROJECT:
In this project we are reconstructing an image in matlab
using Bilinear interpolation algorithm. A process in which
we expand an image by a factor (greater than one) i.e.
magnification factor is called image zooming.In our
proposed method, the bilinear interpolation method is
working to expand the original image. We are using the
pixel grouping procedure to execute and to classify the
pixels in the enlarged image. According to experimental
resultant data, it is displayed that our proposed system
provides better image quality.

Introduction:
When we manipulate an image by means of a
processor then that is called Digital image
processing of that image. The greatest common
uses of Digital image processing techniques are
improving picture quality and remove noise. So
Image zooming is one of the very common
application of Image Processing. [1] - [6].Image
zooming is basically used to provide the variation in
size of image and also to improve its quality, so it is
applied to multimedia application like digital
database, electronic publishing and also in medical
fields also. In image zooming we use an original
image and after zooming resultant image is called
zoomed image. Often, original image is called image
of low resolution and zoomed image called image of
high resolution. From the literature survey we
found that there different techniques to enlarge an
image and to improve its qualities.
These zooming techniques can be classified into
two main categories 1) fixed image zooming and 2)
adaptive image zooming scheme. [4]-[5].There had
been purposed some basic zooming techniques like
pixel copy technique , nearest neighbor
interpolation, bilinear interpolation technique [2],
and the bi-cubic interpolation technique [3].The
most simple and easy technique is pixel copy
technique used for zooming of image. In this
method we simply recover unknown pixels in
zoomed enlarged image by its consistent sampled
pixels from original image. But one of major
negative point of this image zooming technique is
its blocking effect in case of high scaling factor. And
if we will use pixel copy technique for zooming
purpose then resultant zoomed image is of poor
quality as compared to other.
One of the other most used technique for image
zooming is the bilinear interpolation technique. This
technique of zooming provides smooth areas for
enlarged image, but blocking effects can be found
at the edge boundaries by using this method. It
works well for the smooth areas zooming, but the
blocking artifact can be found in the edge
boundaries of the enlarged image when the bilinear
interpolation technique is used. Currently, some
adaptive image zooming techniques, such as the
edge preserving zooming technique [4,5,], the local
adaptive zooming technique [6], the vector
quantization zooming technique had been
proposed. The goal of edge preserving zooming
techniques is to remove/reduce blocking artifacts
occurring in image interpolation. In other words,
they can preserve more clear edge boundaries in
the enlarged image than the fixed image zooming
techniques. However, the image quality of the
enlarged image by using the edge preserving
zooming technique is not always better than that of
the fixed image zooming technique.

SCOPE OF OUR PROJECT:

We have seen many software in which there’s an option


of zooming an image. For example, if you have used paint
or photoshop then you have seen that you can zoom
your image quite easily by clicking a button. Today’s we
are gonna do the same thing but in MATLAB and we will
have a look at the code behind this feature.

PURPOSED METHOD :
“Image Zooming with Bilinear Interpolation
in MATLAB”
Bilinear Interpolation is a simple interpolation technique
in which we fill the gaps between pixels using the
neighbor pixels.
For example, we have an unknown pixel in between four
pixels, and let’s say the unknown pixel is f(x,y) and it is
surrounded by four pixels which are:
1. Q11 = (x1, y1).
2. Q12 = (x1, y2).
3. Q21 = (x2, y1).
4. Q22 = (x2, y2).
when we are zooming some image then in fact we are
increasing the pixels of that image and in order to do that
we have to fill those extra pixels with the color of their
neighbor pixel. This thing is know as interpolation. There
are many different techniques for interpolation and the
one we are gonna use for this project is known as Bilinear
Interpolation. Bilinear interpolation is simple type of
linear interpolation in which we simply apply
interpolation formula on both the x and y axis. So, let’s
have a brief overview of Bilinear Interpolation first and
then we will move on to MATLAB implementation.
ALGORITHM USED:
Let’s assume the A, B, C and D respectively ( i, j ) , ( i,
j + 1) , ( i+ 1, j ) and ( i+ 1,j + 1) be the coordinate,
and the coordinate of P is (u,v).
The main three steps of bilinear interpolation
algorithm are:
Step 1: In first step we have to calculate the
influence of A and B and denote it as E.
f(i,j+v) = [f(i,j+1)-f(i,j)]v + f(i,j)
Step 2: In second step we have to calculate the
influence of C and D and denote it as F.
f(i+1,j+v) = [f(i+1,j+1) –f(i+1,j)]v+f(i+1,j)
Step 3: to calculate the influence of E and F and
denote it as P.
f(i+u,j+v)= =(1-u)(1-v)f(i,j)-(1-u)vf(i,j+1)+u(1-
v)f(i+1,j)+uvf(i+1,j+1)
Bilinear interpolation is one of the simple
techniques in image processing. It is also named as
bilinear filtering. To map a screen pixel location to a
corresponding point we used an algorithm. A
weighted average of the attributes of the four
surrounding pixels is computed and we calculate an
average of four pixels a, b, c and d and then applied
to the screen pixel. And a scale factor is used to
enlarge image. In our purposed method we used
different scale factor or magnification factor ranging
from above to 1.After that image is to be scaled up.
EXPERIMENTAL RESULTS:
We are going to show the experimental effects and
results of the images.
We had done image zooming using different sacale
factors in the above images These images are the
new image with new pixels and without distortion
and with different scale factor. Then finally the
original image title ‘babitasharma’ is made to be
Zoomed image by a scale factor 1.8, 1.2 and 2.

CONCLUSION :
From experiment results it is clear that we were
capable to fruitfully reproduce the results that are
found by running our code in mat lab. From that
results robustness of the algorithm is clear. We are
capable to expand and shrink the size of each file
and then kept it into the devices
RESULTS:
From experiment results it is clear that we were
capable to fruitfully reproduce the results that are
found by running our code in mat lab. From that
results robustness of the algorithm is clear. We are
capable to expand and shrink the size of each file
and then kept it into the devices. Bilinear
interpolation algorithm is continuous, and we found
that the visual effect is better than the nearest
point interpolation algorithm. We can also calculate
PSNR and MSE values for result and to compare
with different algorithm.
REFRENCES:

[1]Yu-Chen Hu, Bing-Hwang Su, Wu-Lin Chen and Wan-Yu


Lu “Image Zooming for Indexed Color Images Based on
Bilinear Interpolation”
[2]Som Raj Thakur 1, Akshita2 “Research on Shrinking
and Zooming of Digital
Image by Interpolation Method for Different Purposes”

You might also like