Hi 751301185@qq.com,
In the config structure you have to pass the files needed by the function to run on board. Also, for the advanced examples, the config requires a field called Input, which will be the input of the face_detection function. In your case you can have the following config:
config.MakeJobs = 8;
config.Optimize = true;
config.TargetIpAddress = '10.171.74.173';
config.Deploy = true;
% first entry from the tuple is the name of the file you want to copy to board and is relative to the current path of MATLAB
% second entry from the tuple is name of the file on board and is relative to the elf location
config.ExtraFiles = { ...
{'../../data/face_detection.png', 'data/face_detection.png'}, ...
{'../../data/lbpcascade_frontalface.xml', 'data/lbpcascade_frontalface.xml'}};
params.input = 'Image';
params.file = 'data/face_detection.png';
params.demo = false;
params.KalmanFilter = false;
config.Input = params;
nxpvt_codegen('face_detection.m', config);
Instead of calling the nxpvt_codegen function you can also run the script run_application from the face detection example folder. The script fills in the config structure by asking a list of questions.
Kind regards,
Iulian Bulancea