resizing image by linear interpolation

1 Ansicht (letzte 30 Tage)
Fidan Rlee
Fidan Rlee am 1 Okt. 2020
Bearbeitet: Fidan Rlee am 1 Okt. 2020
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));

Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by