resizing image by linear interpolation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello guys. I'am doing rgb image interpolation. I need firstly resize the image 3 times and then fill the pixels in between. So this is what I have done for now. I read the documentation of interpolation. But not sure about the parameters inside interp1(x,v,xq). I filled out the correspound pixels. Now I want to fill rows which is partly filled and then starf from columns.
clear all ; close all
x = imread('horses.jpg');
imshow(x)
[r,c,s] = size(x) ;
y = zeros(r*3,c*3,s) ; % I have created 3 times larger image
y(1:3:r*3,1:3:c*3,:) = x(1:r,1:c,:); % copying pixels
for i=1:3:r*3
for j=1:3:c*3
y(i,j+1)=interp1(???) % I need to fill inside
y(i,j+2)=interp1(???) % I need to fill inside
end
end
figure
imshow(uint8(y));
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!