フィルターのクリア

how can i automatically save the image after every shot ?

5 ビュー (過去 30 日間)
xuan hoa
xuan hoa 2021 年 11 月 4 日
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.

採用された回答

Sulaymon Eshkabilov
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 件のコメント
xuan hoa
xuan hoa 2021 年 11 月 4 日
Thank you so much for your answer, it's very helpful
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 11 月 4 日
Most Welcome! It is a pleasure to be of some help.

サインインしてコメントする。

その他の回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 11 月 4 日
...
% Edit this part
for ii = 1:10
imgName = [MyFolder, '\ImageReal_', num2str(ii), '.jpg']
end
  1 件のコメント
xuan hoa
xuan hoa 2021 年 11 月 4 日
Oh it only shows in command windows like this but not in my file, but I want it to be saved to my file after every shot will save a picture with a different name.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by