How can save sveral images using different names in a single pogram
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Emmanuel
am 20 Jun. 2014
Beantwortet: Image Analyst
am 20 Jun. 2014
I am taking a snapshot of two images from left camera and right camera and would like tosave it using
imwrite(leftpic, 'l1.tif');
imwrite(rightpic , 'r1.tif');
I want to do this for a series of image as store them as l1,l2,l3,l4...similarly r1,r2,r3,r4...How can I do that?
0 Kommentare
Akzeptierte Antwort
David Sanchez
am 20 Jun. 2014
Adapt the following to your needs:
N_pics = 10; % change this to your needs
for k=1:N_pics
pic_left = sprintf('l%g.tif',k);
pic_right = sprintf('r%g.tif',k);
imwrite(leftpic, pic_left);
imwrite(rightpic, pic_right);
end
The name will be updated with every iteration of the for-loop
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 20 Jun. 2014
See the FAQ for code examples: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!