カメラで撮影する処理を繰り返したい
Ältere Kommentare anzeigen
PCのMATLABでMATLAB mobileをインストールしたスマホのカメラを操作し,写真を撮影するプログラムを作っているのですが,撮影するとカメラが閉じてしまい困っています.
以下のコードで撮影した写真をフォルダに保存しているのですが,この処理を繰り返すにはどのようにプログラムを組めばよいでしょうか
clc
clear
m = mobiledev;
cam = camera(m,'back');
cam.Autofocus = 'on';
img = cam.snapshot('manual');
fname = [char(datetime('now','Format','yyyy-MM-dd HHmmSS')),'.jpg'];
imwrite(img,['指定したフォルダ',fname])
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB Support Package for IP Cameras finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!