How to show a interpolated Image with its actual color ?
3 views (last 30 days)
Show older comments
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
0 Comments
Accepted Answer
Image Analyst
on 15 Jul 2014
interp2() works with 2D matrices, not 3D color images. Use imresize() instead.
More Answers (0)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!