What are some techniques for 2-D interpolation and how do they work?

In summary: Hi All,In summary, Chiro is working on interpolating data in a 2-D square matrix. He has read about higher order methods, using more surrounding points, but can't get that to work. He has had no trouble extracting the 16 corners of the 3x3 grid his desired point is in form his data set, but how do he get down from 16 points to one? He is looking for help with interpolating to a number - of course images are just numbers - but can't find the basic equations. He is also looking for help with interpolating to a volume, rather than a surface or a line.
  • #1
RH10
6
0
Hi All,

I'm working on coding some 2-D interpolation techniques. With wikikepdia's help, I've managed blinear interpolation.

What other techniques are out there? Please tell me a little about how your favourite technique works.

I've read about higher order methods, using more surrounding points, but can't get that to work. I've had no trouble extracting the 16 corners of the 3x3 grid my desired point is in form my data set, but how do I get down from 16 points to one? Using google everyone is talking about image processing, rather than the more basic task of interpolating to a number - of course images are just numbers - but I can't find the basic equations.

Thanks in advance for any help,
 
Physics news on Phys.org
  • #2
RH10 said:
Hi All,

I'm working on coding some 2-D interpolation techniques. With wikikepdia's help, I've managed blinear interpolation.

What other techniques are out there? Please tell me a little about how your favourite technique works.

I've read about higher order methods, using more surrounding points, but can't get that to work. I've had no trouble extracting the 16 corners of the 3x3 grid my desired point is in form my data set, but how do I get down from 16 points to one? Using google everyone is talking about image processing, rather than the more basic task of interpolating to a number - of course images are just numbers - but I can't find the basic equations.

Thanks in advance for any help,

Hey RH10 and welcome to the forums.

For more general methods look at B-SPLINES and NURBS. They are a lot more complicated but they offer huge advantages for interpolation.

The BSPLINES work by using control points to interpolate between and they also differentiability conditions. NURBS use what is called a knot vector that gives finer control.

I haven't used these for a very long time and when I messed with them, the most I really did was use them for rendering using only one or two test examples: very nice objects though.

Also if you pick up any book on mathematical and computer animation, you'll see things like Catmull-Rom, Hermite, and standard Lagrange interpolation. Lagrange is the easiest to understand, but NURBS are where its at if you have the processing power and the ability to define what you had in mind. With NURBS, you can model very very accurately the arc of a circle which is pretty impressive (it's general enough that this is only a fraction of it's descriptive ability).

Here is the wiki for NURBS:

http://en.wikipedia.org/wiki/Non-uniform_rational_B-spline

If you want an implementation and thorough discussion, a guy working at Intel actually coded up a NURBS renderer in C++ and it's where I actually learned this kind of thing initially. (Not a renderer per se, but a surface generation and normal vector computation procedure with triangulation code [very trivial since the whole is parameterized]).

http://software.intel.com/en-us/articles/using-nurbs-surfaces-in-real-time-applications/
 
  • #3
Hi Chiro,

Thanks for your links, reading about B-Spines is very interesting. Much of the intel website went over my head unfortunatly, so can you point me to the basic equations for this? How do I go about actually interpolating in a square matrix?

Thanks,
 
  • #4
RH10 said:
Hi Chiro,

Thanks for your links, reading about B-Spines is very interesting. Much of the intel website went over my head unfortunatly, so can you point me to the basic equations for this? How do I go about actually interpolating in a square matrix?

Thanks,

It sounds like you want to interpolate over a volume, rather than a surface or a line. Is this correct?
 
  • #5
chiro said:
It sounds like you want to interpolate over a volume, rather than a surface or a line. Is this correct?

No, the problem is a 2-D one. That is I have a square matrix (n x n x 1) which represents my data set and the challenge is to interpolate in it. Nearest neighbour is obviously no sweat.

Extracting part of the data set and using bilinear interpolation wasn't too hard, but I'm reading about more accurate methods (probably involving extracting a larger chunk of the data set) but don't understand them fully enough to code them. Thanks for writing back.
 

1. What is 2-D interpolation?

2-D interpolation is a mathematical technique used to estimate values for points within a two-dimensional grid of data points. It involves using known data points to calculate the value at unknown points within the grid. This is helpful when there are gaps or missing data points in a dataset.

2. What are the different types of 2-D interpolation techniques?

There are several types of 2-D interpolation techniques, including linear, polynomial, spline, and kriging. Each method uses a different approach to estimate values for unknown points within a grid. The choice of technique depends on the specific characteristics of the dataset and the desired level of accuracy.

3. How is 2-D interpolation different from 1-D interpolation?

In 1-D interpolation, values are estimated along a single axis or line. In contrast, 2-D interpolation involves estimating values within a two-dimensional grid, taking into account both the x and y coordinates of the data points. This allows for a more accurate estimation of values within the grid.

4. What are the limitations of 2-D interpolation techniques?

One limitation of 2-D interpolation is that it assumes a smooth and continuous relationship between data points within the grid. If the data is highly irregular or scattered, interpolation may not accurately capture the underlying pattern. Additionally, the accuracy of the estimated values may decrease as the distance from known data points increases.

5. How is 2-D interpolation used in scientific research?

2-D interpolation techniques are commonly used in various scientific fields, including geology, climatology, and cartography. They are used to fill in missing data points and create smooth maps of a particular variable, such as temperature or elevation. This allows researchers to better visualize and analyze patterns in the data and make informed conclusions about the underlying phenomena.

Similar threads

Replies
39
Views
503
  • Biology and Medical
Replies
9
Views
2K
  • Computing and Technology
Replies
7
Views
827
Replies
2
Views
880
  • Programming and Computer Science
Replies
2
Views
1K
  • STEM Career Guidance
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
4K
  • Astronomy and Astrophysics
2
Replies
43
Views
10K
Replies
1
Views
450
Back
Top