how can i automatically save the image after every shot ?
조회 수: 5 (최근 30일)
이전 댓글 표시
This is my code for the Snapshot button in GUI matlab, it will autosave the image after every shot, but after the shot, it will save only 1 image in my file, with as name 'Image_1'. Now, I want after every shot it saves 1 image with 1 name different, and the name use DateTime(now).
Thank.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/789145/image.png)
댓글 수: 0
채택된 답변
Sulaymon Eshkabilov
2021년 11월 4일
Here is the completed part of the code:
...
global Snapshot;
% Edited/corrected part for image collection
for ii = 1:10
Snapshot = getsnapshot(a);
axes(handles.axes1);
imgName = [MyFolder, '\ImageReal_', num2str(ii), '.jpg'];
imwrite(Snapshot, imgName);
pause(1);
end
댓글 수: 2
추가 답변 (1개)
Sulaymon Eshkabilov
2021년 11월 4일
...
% Edit this part
for ii = 1:10
imgName = [MyFolder, '\ImageReal_', num2str(ii), '.jpg']
end
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!