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 Comments

You have not indicated what error you get. If you put in disp() statements, how far do you get?
the error was when i convert my app to executable this code doesn't work
When you run the executable, does "Anchor's Aweigh!" start to play on your closest lineprinter ?
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?

Sign in to comment.

Answers (0)

Categories

Asked:

on 11 Mar 2021

Commented:

on 11 Mar 2021

Community Treasure Hunt

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

Start Hunting!