Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Creating a new file to save data to

1 visualización (últimos 30 días)
Cordelia David
Cordelia David el 8 de Mayo de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I'm trying to save a bunch of JPG images of data to a seperate file than where the mat program is located. Currently I have the below to name each image of data saved, but I'm not sure how to save these images to a new file.
obj = VideoReader(Image);
vid = read(obj);
frames = obj.NumberOfFrames;
timeStamp = getTimeStamp;
for x=1:frames
imwrite(vid(:,:,:,x),strcat('frame-',num2str(x),'_',timeStamp,'.JPG'));
end
Any suggestions for how to save each image to a new file?
  2 comentarios
Walter Roberson
Walter Roberson el 8 de Mayo de 2019
Is getTimeStamp from https://www.mathworks.com/matlabcentral/fileexchange/47075-cmacminn-gettimestamp ? But even that expects to be passed a file name.
Cordelia David
Cordelia David el 10 de Mayo de 2019
It's a different function I created. It does not require another function to be passed into it. I made it work though, and can now successfully save to a different folder and file. Thank you

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by