From: Samay Kumar on
Hell friends,

I have a look-up table generated from one of the camera like...

Derr Aij Dij
____________________
0.8 7878 1.23
-0.7 12409 0.42
. . .
. . .

I want to approximate given look-up table with spline for given bi-variate function F(Aij, Dij) = Derr. So far I could be able to approximate given look-up table with piecewise polynomial spline but I don't know how to interpret the result.

where, De is resized to matrix.
...................................... output .................................
>> D = linspace(min(Dij), max(Dij), 50);
>> A = linspace(min(Aij), max(Aij), 50);
>> De = csapi({Aij, Dij}, Derr)
De =
form: 'pp'
breaks: {[1x50 double] [1x50 double]}
coefs: [1x196x196 double]
pieces: [49 49]
order: [4 4]
dim: 1
..................................................................................

Surface result of above 'pp' spline seems satisfactory.

Now my requirement is to predict value of De from given (Aij, Dij) which is not from the given lookup table. So in brief I want to approximate given lookup table and predict output of query with spline function. Spline is the only option I see because I tried with some polynomial function with result was not good as with spline.

Can any one help how I can use the above output to predict given value of Aij and Dij?? And also suggest how I can do bivariate b-spline fitting to given data in matlab?

Any suggestion would be helpful. Thanks in advance.

Greetings,
Samay