MATLAB 绘制插值图像如何将双3次插值的图像输出来?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/31 02:56:45
MATLAB 绘制插值图像如何将双3次插值的图像输出来?
MATLAB 绘制插值图像
如何将双3次插值的图像输出来?
MATLAB 绘制插值图像如何将双3次插值的图像输出来?
既然是图像就用下个
其中,'cubic' - bicubic interpolation
这个选项就是你所要的
如果是图形就用
interp1
INTERP2 2-D interpolation (table lookup).
ZI = INTERP2(X,Y,Z,XI,YI) interpolates to find ZI,the values of the
underlying 2-D function Z at the points in matrices XI and YI.
Matrices X and Y specify the points at which the data Z is given.
Out of range values are returned as NaN.
XI can be a row vector,in which case it specifies a matrix with
constant columns.Similarly,YI can be a column vector and it
specifies a matrix with constant rows.
ZI = INTERP2(Z,XI,YI) assumes X=1:N and Y=1:M where [M,N]=SIZE(Z).
ZI = INTERP2(Z,NTIMES) expands Z by interleaving interpolates between
every element,working recursively for NTIMES.INTERP2(Z) is the
same as INTERP2(Z,1).
ZI = INTERP2(...,'method') specifies alternate methods.The default
is linear interpolation.Available methods are:
'nearest' - nearest neighbor interpolation
'linear' - bilinear interpolation
'cubic' - bicubic interpolation
'spline' - spline interpolation
All the interpolation methods require that X and Y be monotonic and
plaid (as if they were created using MESHGRID).If you provide two
monotonic vectors,interp2 changes them to a plaid internally.
X and Y can be non-uniformly spaced.
For example,to generate a coarse approximation of PEAKS and
interpolate over a finer mesh:
[x,y,z] = peaks(10); [xi,yi] = meshgrid(-3:.1:3,-3:.1:3);
zi = interp2(x,y,z,xi,yi); mesh(xi,yi,zi)
See also INTERP1,INTERP3,INTERPN,MESHGRID,GRIDDATA.