Thanks Bruno.. Now I got the point. here x and y are vector of row/column of Image. If I need to apply spline smoothing on a 3X3 local window of image then in that case if I take only non noisy pixels of image(for example pixels apart from 0 and 255 in that window) then x and y would be coordinates of those pixels? and after interpolation using those pixels only I can get the interpolated value at noisy coordinates? Is that so? Can you point me to any link that is related to splines in this context? I have tried searching for this but failed to find something related to this in MATLAB. Again thanks for your reply.
"Bruno Luong" <email@example.com> wrote in message <firstname.lastname@example.org>... > "sudesh" wrote in message <email@example.com>... > > Can anyone guide me how we use splines for interpolation in images? > > I mean how we relate value of x,y of spline function in an image that has its spatial coordinates and intensity values. > > Straightforward use of INTERP2. > > A=peaks(10); > > [m n] = size(A); > x = 1:n; > y = 1:m; > xi = linspace(1,n,100); > yi = linspace(1,m,100); > Ai = interp2(x, y', A, xi, yi', 'spline'); > > subplot(1,2,1); surf(A); > subplot(1,2,2); surf(Ai); > > % Bruno