Compiled application unable to find defaultBRISQUEModel.mat

12 views (last 30 days)
I appear to be missing some function in the Image Processing Toolbox. When I run the compiled application, I get the following error:
Unable to find file or directory 'C:\Program Files\MATLAB\R2021b\mcr\toolbox\images\imdata\defaultBRISQUEModel.mat'
However, I opened up the directory indicated by the error message and the file is there. How can I resolve this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Jan 2022
The "brisque" function requires this built-in MAT file, and this error message indicates that the compiled application cannot find this file.
One possible way to work around this issue is to manually add the Image Processing Toolbox into the dependencies of your project:
  1. Open Application Compiler. To find this: On the MATLAB Apps tab, on the far right of the Apps section, click the arrow. In Application Deployment, click Application Compiler.
  2. In Files required for your application to run, manually add the folder <MATLAB ROOT>\toolbox\images\imdata into the list. You will also need to add any other files required for you application to run.
  3. Re-compile the application, and test if it executes without issue.
If this does not work, you could just ship the .mat file separately and install it in
C:\Program Files\MATLAB\R2021b\mcr\toolbox\images\imdata\defaultBRISQUEModel.mat
Another similar workaround would be to copy defaultBRISQUEModel.mat from 
C:\Program Files\MATLAB\R2021b\toolbox\images\imdata\defaultBRISQUEModel.mat to 
C:\Program Files\MATLAB\R2021b\mcr\toolbox\images\imdata\defaultBRISQUEModel.mat. This process would have to be repeated on every client of the standalone application to the MATLAB runtime (mcr) they are using.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!