resizing image by linear interpolation

1 回表示 (過去 30 日間)
Fidan Rlee
Fidan Rlee 2020 年 10 月 1 日
編集済み: Fidan Rlee 2020 年 10 月 1 日
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 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by