Tuesday, August 09, 2005

Interpolation

It is real fun to see the concept of math taking shape into reality...I am going to yap about one such thing in this post. I had this course in undergrad on Numerical Analysis, learnt a lot about interpolation and extrapolation and stuff like that..I learnt that "Interpolation is constructing new data points based on a set of known data points"... and I could fit a new data points based on bunch a different approaches but I never asked the question why am I doing that or what is the application of these new data points until sometime back.


Background: Pixel refers to a picture element these are tinest dots that occur in digital image, basically encode the intensity (color) values


I learnt a few months back about scaling images (zoom)...Let us say you have to increase the size of images by a factor of two, there are several ways to do it.

Original Image



1) Easiest way to do is to copy the nearest neighbour pixels. Basically you say that for every pixel in original image you have two copies of that pixel in the target image (to increase by factor 2). The result of which is given below.

Nearest Neighbour



2) Another way to do it is through bilinear interpolation which is averaging in 2 X 2 neighbourhood, which means that for each pixel in target image you are going to look into 4 pixels and take an average of the four pixel values. The result is given below.

Bilinear interpolation


3) Another way to do it is through bicubic interpolation which is using a 4 X 4 neighbourhood for deciding a pixel value.So the more values sampled the better the result..The result of which is given below.

Bicubic interpolation


As you can see the quality of scaled (zoomed) image improves as the order of interpolation increases.

I really enjoyed learning about one such practical applications of interpolation !

4 Comments:

At 10:11 PM, Blogger Phoenix said...

Oh cool... I did not know DSL funda...it is cool....i will look up details when I find time...

Apparently CDMA is made by simple principle of orthogonality...It is interesting to "see" math in the form of images, signals, waterflows, firespread etc...

Check this link if you interested it is about Math way of looking at some movies...I really liked the way the author has looked at sliding doors(12B in Tam) as Funda of Chaos ie,how a small change in initial conditions could affect the long term behavior of a system ..i thought it is totally cool...
http://www.nytimes.com/library/national/science/090198sci-essay.html

 
At 7:48 AM, Blogger Pal said...

Mathematics, Interpolation, ....ellam maayaai.

About 12B the funda (how a small change in initial conditions could affect the long term behaviour of the system)is inspired from one of Richard Bach book.

 
At 7:50 AM, Blogger Phoenix said...

Pal
Which book?

 
At 1:25 PM, Blogger pk said...

Great info P. Looks like the same theory is use in calculating color in digicams, chk this link is interested http://www.photo.net/learn/raw/.

 

Post a Comment

<< Home