Clear Filters
Clear Filters

MATLAB mobileのJav​aユーザーインターフ​ェースのサポートのエ​ラーについて

1 view (last 30 days)
竣 齊藤
竣 齊藤 on 6 Oct 2021
Edited: 竣 齊藤 on 8 Oct 2021
iPhoneカメラを用いて成分表示が英語で記載されているものを撮影を行います。撮影した成分表示の画像の中に、添付した画像のwordの列の英単語があったとき、日本語訳とその日本語訳のイラストの画像を表示するプログラムをMATLAB mobileで実行したところ、下記のエラーを出てしまいました。
clear cam;
m = mobiledev;
cam = camera(m,'back');
videoFrame = snapshot(cam,'manual');
frameSize = size(videoFrame);
videoPlayer = vision.VideoPlayer('Position', [100 100 [frameSize(2), frameSize(1)]+30]);
runLoop = true;
while runLoop
videoFrame = snapshot(cam);
results = ocr(videoFrame);
Ninshikimoji = lower(results.Words);
Ninshikiwaku = results.WordBoundingBoxes;
Jisho = readtable('allergy.xlsx','ReadRowNames',true);
word = categorical(Jisho.word);
Mininshiki = blanks(0);
for n = 1:size(Ninshikimoji,1)
if any(word == Ninshikimoji{n})
Shoukai = Jisho{Ninshikimoji{n},:};
videoFrame = insertObjectAnnotation(videoFrame,'rectangle',Ninshikiwaku(n,:),Shoukai{:},'font','Yu Gothic Bold');
x = Ninshikiwaku(n,1); y = Ninshikiwaku(n,2); w = Ninshikiwaku(n,3); h = Ninshikiwaku(n,4);
logo = imresize(imread([Shoukai{:} '.png']),0.3);
videoFrame(y:(y+size(logo,1)-1),(x+w):(x+w+size(logo,2)-1),:) = logo;
else
Mininshiki = [Mininshiki ' ' Ninshikimoji{n}];
end
end
step(videoPlayer, videoFrame);
runLoop = isOpen(videoPlayer);
end
release(videoPlayer);
今回ご教授して頂きたいことはMATLAB mobileで実行したときのエラーの解決方法です。
ご教授の程よろしくお願いいたします。

Answers (0)

Categories

Find more on Display Image in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!