How to show a interpolated Image with its actual color ?

3 views (last 30 days)
Hi,
I am working with image interpolation. My Input image is a RGB image. The resultant image after interpolation seems to be gray-scale. How to show the resultant interpolated image in color ?
Please help me. Thanks in advance.
Code
X = imread('home.jpg');
V = single(X(1:124,75:225));
figure
imshow(uint8(V));
title('Original Image');
imwrite(uint8(V),'1_InputImage.jpg');
Vq = interp2(V,1);
figure
imshow(uint8(Vq));
title('Linear Interpolation');
imwrite(uint8(Vq),'2_LinearInterpolated.jpg');
Input Image

Accepted Answer

Image Analyst
Image Analyst on 15 Jul 2014
interp2() works with 2D matrices, not 3D color images. Use imresize() instead.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!