回帰モデルをnetという変数でnet.matファイルに保存し、webcamで1秒ごとに撮影した画像を回帰に掛けるダミーコードは以下のとおりです。while 文にしているので、Ctrl+C で中止されるまで実行される例です。
load('net.mat')
cam = webcam('xxx');
while true
img = snapshot(cam);
pred = predict(net, img);
% 1秒後に次のループを実行
pause(1)
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!