カメラで撮影する処理を繰り返したい
Show older comments
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])
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!