App Designeで画像を表示しようとしたときにエラーがでてしまう
Afficher commentaires plus anciens
現在,App DesigneでMATLA mobileをインストールしたスマホのカメラで撮影した画像をフォルダに保存し,撮影ごとに,画像を表示していくアプリを作っています.
しかし,撮影した画像がフォルダに保存はされるのですが,下画像のようにエラーがでて表示がされません.
コード,エラー,アプリ画像は以下の通りです.

clc
clear
m = mobiledev;
cam = camera(m,'back');
cam.Autofocus = 'on';
for i = 1:100
img = cam.snapshot('manual');
HSV = rgb2hsv(img);
RED = (0.257<= HSV(:,:,1) <= 0.47)
BW2 = imfill(RED,'holes');
fname = [char(datetime('now','Format','yyyy-MM-dd HHmmSS')),'.jpg'];
imwrite(img,['指定したファイル1',fname]);
imwrite(BW2,['指定したファイル2',fname])
imagesc(app.UIAxes,imrotate(BW2,-90));
imagesc(app.UIAxes_2, imrotate(img,-90));
colormap(app.UIAxes,gray);
end
clear
よろしくお願いします.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur App Designer を使用したアプリ開発 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!