How to save multiple snapshots in a file?

조회 수: 1 (최근 30일)
MrMedTech
MrMedTech 2016년 4월 20일
댓글: MrMedTech 2016년 4월 20일
Hey everyone,
I have a loop within I'm doing round about 100 snapshots and mark them with a rectangle and stuff like that.
Is it possible to save the marked snapshots listed in one file or to create for every start of the program a new folder in which the images are saved?
In advance Phil

답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 20일
basefolder = pwd();
folder_to_save_in = tempname(basefolder);
mkdir(folder_to_save_in);
It is also possible to save all in one file, with some of the image formats. In particular see http://www.mathworks.com/help/matlab/ref/imwrite.html#btwmoig-1
  댓글 수: 2
MrMedTech
MrMedTech 2016년 4월 20일
Thank you for this quick reply.
Can you tell me how to implement this in my code. I mean, where / how do I have to bring in my snapshot. You just described how to create the saving path?
Thx Phil
MrMedTech
MrMedTech 2016년 4월 20일
So now I got this:) I just took imwrite and gave it the path to my folder. The only mistake I've had is that you have to use '\\' instead of a single slash in your folderpath( I'm using win 7 with matlab 2015b).
So now I can store my stuff but the least problem is, that just my image is stored without the markers.
In my code, I take an image with the webcam, than I calculate some Points und with a plot I mark them with a rectangle and stuff like that. So these markers are just laying 'upon' the image but I want to save the marked image if possible.
Anyone a guess?
Thx

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by