Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

source code for interpolation (linear, cubic) in 3D

364 views
Skip to first unread message

upquark

unread,
Jun 18, 2009, 5:47:35 PM6/18/09
to
Hello everyone,

Does anyone know of some open source library or online tutorial which
explains interpolation (with 3D images) and also has some java or C++
implementation. It would be great to see some code and see the whole
thing in action. I am not looking for efficient code but something
that is easy to read and can help me visualize the principles behind.

Any suggestions?

Many thanks,

Luca

Dave

unread,
Jun 18, 2009, 6:46:08 PM6/18/09
to


What kind of interpolation? Linear? Cubic? Bi-cubic? Bezier? Or more
importantly, what are you interpolating? Points? Images? Rotations/
orientations? Do you just have values, or do you have derivatives
(slopes) as well?

A decent start to at least see what's out there is just to look at
wikipedia's interpolation page. Depending on your math background, the
theory behind it might be heavy, but at least you will get an idea of
the terminology.

upquark

unread,
Jun 19, 2009, 1:43:53 AM6/19/09
to
On Jun 19, 12:46 am, Dave <thedaverud...@gmail.com> wrote:
> On Jun 18, 2:47 pm, upquark <pankaj.d...@gmail.com> wrote:
>
> > Hello everyone,
>
> > Does anyone know of some open source library or online tutorial which
> > explains interpolation (with 3D images) and also has some java or C++
> > implementation. It would be great to see some code and see the whole
> > thing in action. I am not looking for efficient code but something
> > that is easy to read and can help me visualize the principles behind.
>
> > Any suggestions?
>
> > Many thanks,
>
> > Luca
>
> What kind of interpolation? Linear? Cubic? Bi-cubic? Bezier? Or more
> importantly, what are you interpolating? Points? Images? Rotations/
> orientations? Do you just have values, or do you have derivatives
> (slopes) as well?

Yes, linear and cubic would suffice. I would be working mostly with
images.

>
> A decent start to at least see what's out there is just to look at
> wikipedia's interpolation page. Depending on your math background, the
> theory behind it might be heavy, but at least you will get an idea of
> the terminology.

Thanks for the tip.

Dave

unread,
Jun 19, 2009, 1:39:03 PM6/19/09
to

So, if you are interpolating between pixels of an image (or any kind
of scalar value over a regular grid), then bilinear or bicubic
interpolation is probably what you want. The differences are explained
qualitatively here:
http://www.ronbigelow.com/articles/interpolation/interpolation.htm

For bilinear, the algorithm is explained here:
http://www.cambridgeincolour.com/tutorials/image-interpolation.htm

For bicubic, I can't find a better (free) source than wikipedia:
http://en.wikipedia.org/wiki/Bicubic_interpolation

As for implementation, OpenCV does resampling and resizing:
http://opencv.willowgarage.com/documentation/image_processing.html

I think Java has some facilities in its standard jars that do
interpolation, or at least resizing, but I've never used them
personally:
http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Supplements/Chapter11/Java2DImaging.html

0 new messages