This code doesn't work on executable
显示 更早的评论
I try this code when i execute in appdesigner it work but when i convert to standalone application he doesn't work
[baseFileName, folder] = uigetfile({'.tif';'.jpg';'.png';'.gif*'}, 'Select a file');
fullFileName = fullfile(folder, baseFileName);
img1 = imread(fullFileName);
i = rgb2gray(img1);
ff=vision.CascadeObjectDetector();
bbox=step(ff,i);
dd=insertObjectAnnotation(img1,'Rectangle',bbox,'Face');
pts=detectMinEigenFeatures(i,'ROI',bbox);
imshow(dd,'Parent',app.UIAxes);
Help me please i should return this homework tomorrow
3 个评论
Walter Roberson
2021-3-11
You have not indicated what error you get. If you put in disp() statements, how far do you get?
Dgehj Dvvebe
2021-3-11
Walter Roberson
2021-3-11
How do you know that it doesn't work?
If you convert the code to
disp('Starting!')
disp('line 1'); [baseFileName, folder] = uigetfile({'.tif';'.jpg';'.png';'.gif*'}, 'Select a file');
disp('line 2'); fullFileName = fullfile(folder, baseFileName);
disp('line 3'); img1 = imread(fullFileName);
disp('line 4'); i = rgb2gray(img1);
disp('line 5'); ff=vision.CascadeObjectDetector();
disp('line 6'); bbox=step(ff,i);
disp('line 7'); dd=insertObjectAnnotation(img1,'Rectangle',bbox,'Face');
disp('line 8'); pts=detectMinEigenFeatures(i,'ROI',bbox);
disp('line 9'); imshow(dd,'Parent',app.UIAxes);
disp('got to end');
then what shows up?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!