Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Creating a new file to save data to

조회 수: 1 (최근 30일)
Cordelia David
Cordelia David 2019년 5월 8일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Walter Roberson
Walter Roberson 2019년 5월 8일
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 2019년 5월 10일
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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by