resizing image by linear interpolation

1 visualización (últimos 30 días)
Fidan Rlee
Fidan Rlee el 1 de Oct. de 2020
Editada: Fidan Rlee el 1 de Oct. de 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));

Respuestas (0)

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by