This code doesn't work on executable
Show older comments
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 Comments
Walter Roberson
on 11 Mar 2021
You have not indicated what error you get. If you put in disp() statements, how far do you get?
Dgehj Dvvebe
on 11 Mar 2021
Walter Roberson
on 11 Mar 2021
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?
Answers (0)
Categories
Find more on Introduction to Installation and Licensing 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!