resizing image by linear interpolation

1 view (last 30 days)
Fidan Rlee
Fidan Rlee on 1 Oct 2020
Edited: Fidan Rlee on 1 Oct 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));

Answers (0)

Categories

Find more on Read, Write, and Modify Image 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!