views:

29

answers:

0

Hello. I have a 1D function which I want to interpolate into 2D function. I know the function should have "Polar Symmetry". Hence I use the following code (Matlab Syntax): Assuming the 1D function is LSF of the length 15.

[x, y] = meshgrid([-7:7]);
r = sqrt(x.^2 + y.^2);
PSF = interp1([-7:7], LSF, r(:)); % Sometimes using 'spline' option, same results.

PSF = reshape(PSF, [7, 7]);

I have few problems: 1. Got some overshoot at the edges (As there some Extrapolation). 2. Can't enforce some assumptions (Monotonic, Non Negative).

Is there a better Interpolation method for those circumstances? I couldn't find "Lanczos" based interpolation I can use the same way as interp1 (For a certain vector of points, in "imresize" you can only set the length). Is there such function anywhere? Has anyone encountered a function which allows enforcing some assumptions (Monotonically Decreasing, Non Negative, etc..). Thanks.