Animation of image
64 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
John
am 13 Jun. 2011
Kommentiert: Image Analyst
am 2 Nov. 2017
Hello, I need some help. I have a project to create animation of an image mooving by some points of two arrays X and Y. This two arrays define some curve. I can put the background image and another one on top of it. But I can't think of a way to animate it. I tried every think I could think of but nothing is satisfactory ednouth. Can some one help me. If you require some code I could provide you. Thank you in advance!
0 Kommentare
Akzeptierte Antwort
David Young
am 14 Jun. 2011
Here's something simple that works - though it's not elegant or efficient:
% image data
bigIm = imread('street1.jpg');
smallysize = 50;
smallxsize = 70;
smallIm = bigIm(188:188+smallysize-1, 177:177+smallxsize-1, :);
% trajectory data
trajy = 400:-5:100;
trajx = trajy;
% animated display
for step = 1:length(trajx)
displayIm = bigIm;
displayIm(trajy(step):trajy(step)+smallysize-1, ...
trajx(step):trajx(step)+smallxsize-1, :) = smallIm;
imshow(displayIm);
pause(0.2);
end
2 Kommentare
Weitere Antworten (3)
Image Analyst
am 13 Jun. 2011
This FAQ entry may be useful for you: http://matlab.wikia.com/wiki/FAQ#How_can_I_create_a_movie_from_my_MATLAB_figures.3F
0 Kommentare
Siehe auch
Kategorien
Mehr zu Animation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!