Interpolation:
Interpolation is a technique in which we find approximate value of a function at a point with given value of that function at two or more other points. Matlab Code is given at end
It has 2 types:
1) Linear Interpolation
2) Bilinear Interpolation
Linear Interpolation:
In linear interpolation we are given value of a function at two different points and we find value of that function at a point joining the two points on which we are given value. Following figure depicts this concept.
Now in this figure we have two red points (x1,y1) and (x2,y2) and for them we have values given. All we need to do is to find value of function at (x,y). It can be done using following equation
y=y1 + (y2-y1) * (x2-x1) / (x-x1)
In this equation we get unknown y.
Bilinear Interpolation:
Bilinear interpolation is done in 2 dimensions. Or we can say that we first do linear interpolation along x-axis then along y-axis but its quadratic not linear.
In image zooming we use bilinear interpolation, we get a value for a pixel in zoomed image by using values of its 4 neighbours which we know.
Bilinear interpolation of a binary image is done using following equation
V(x,y) = ax + by+ cxy + d
where x,y is the point at which we want to find value of grey level and a,b,c and d are 4 coefficients which are determined from 4 unknowns that can be written using four nearest neighbours of point (x,y).
Bilinear interpolation is depicted in figure below and its implementation for zooming an image is also given below. For any queries regarding this topic comment below it will be appreciated. Thanks
To download m-file of bilinear interpolation of an image in matlab click here