how to transform 1 image to another .

조회 수: 1(최근 30일)
iffi kakar
iffi kakar 2016년 9월 8일
편집: DGM 2022년 11월 13일
i want to to show fade effect from moving one image to another
img1 = imread('a.jpg');
img2 = imread('b.jpg');
img1 = double(img1);
img2 = double(img2);
d =(img2-img1)./20;
f = img2;
subplot(2,2,1), imshow(uint8(img1));
subplot(2,2,2), imshow(uint8(img2));
for i=1:20
f = f + d;
imshow(uint8(f));
pause(0.1);
end
  댓글 수: 1
John D'Errico
John D'Errico 2016년 9월 8일
So what is the question? Did you have a problem? If you had no problem, then why did you post a question?

댓글을 달려면 로그인하십시오.

답변(1개)

DGM
DGM 2022년 11월 13일
A very simple correction:
d = (img1-img2)./20;

Community Treasure Hunt

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

Start Hunting!

Translated by