Q:

Is it possible to use interpolation in MATLAB without resizing an image?

I have an image in which some pixels were changed to zero intentionally. Now I want to make a bilinear interpolation to find out new pixel values using the neighborhood as the bilinear interpolation does. However, I don't want to resize the image (MATLAB can do bilinear interpolation only with resize function).
Is it possible to make a bilinear interpolation in MATLAB without resizing? I read that a convolution with the bilinear kernel would solve this. Do you know which kernel is this? is it possible to do what I want? 

A:

You can try to use one of the options supported by griddata:

griddata(..., METHOD) where METHOD is one of
    'nearest'   - Nearest neighbor interpolation
    'linear'    - Linear interpolation (default)
    'natural'   - Natural neighbor interpolation
    'cubic'     - Cubic interpolation (2D only)
    'v4'        - MATLAB 4 griddata method (2D only)
defines the interpolation method. The 'nearest' and 'linear' methods 
have discontinuities in the zero-th and first derivatives respectively, 
while the 'cubic' and 'v4' methods produce smooth surfaces.  All the 
methods except 'v4' are based on a Delaunay triangulation of the data.

Example
% create sample data
[X, Y] = meshgrid(1:10, 1:10);
Z_original = X.*Y;

% remove a data point
Z_distorted = Z_original;
Z_distorted(5, 5) = nan;

% reconstruct
valid = ~isnan(Z_distorted);
Z_reconstructed = Z_distorted;
Z_reconstructed(~valid) = griddata(X(valid),Y(valid),Z_distorted(valid),X(~valid),Y(~valid));

% plot the result
figure
surface(Z_original);

figure
surface(Z_distorted);

figure
surface(Z_reconstructed);

