Saving the figure handle into a structure
Mostrar comentarios más antiguos
I want to save 300 figures produced by matlab into a structure. I have given an example of the existing code which is taking time to save the frame to the disc and then store into a structure. Please suggest any efficient way.
for i=1:300
f1=figure;
imshow(images(i));
line([10 20],[15 40], 'LineWidth',1,'Color', [1 0 0]);
saveas(f1, 'test.tif');
Images(i).Frames = imread('test.tif');
end
Thanks in advance
Respuestas (1)
Walter Roberson
el 18 de Abr. de 2012
1 voto
Fastest is if you draw the line into the matrix of the image, without using imshow() or saveas() or imread().
Second fastest (I guess) would be to use getframe() instead of saveas() and imread()
1 comentario
Dilunath Hareendranath
el 19 de Abr. de 2012
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!