%% Refine Grayscale Image
% Load some image data into the workspace.

load flujet.mat
colormap gray

%
% Isolate a small region of the image and cast it to single-precision.

V = single(X(200:300,1:25));

%
% Display the image region.

imagesc(V);
axis off
title('Original Image')

%
% Insert interpolated values by repeatedly dividing the intervals between points of the refined grid five times in each dimension.

Vq = interp2(V,5);

%
% Display the result.

imagesc(Vq);
axis off
title('Linear Interpolation')

% Copyright 2015 The MathWorks, Inc.