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 comentarios

Walter Roberson
Walter Roberson el 11 de Mzo. de 2021
You have not indicated what error you get. If you put in disp() statements, how far do you get?
Dgehj Dvvebe
Dgehj Dvvebe el 11 de Mzo. de 2021
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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Mzo. de 2021

Comentada:

el 11 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by