MATLAB: Am I getting an error saying “CONCRT140.dll’ is missing when using Image Processing Toolbox

concrt140imageMATLABprocessing

When I try to run to use a function from the Image Processing Toolbox, I am getting the following error message in MATLAB:
Error using images.internal.morphmex
Invalid MEX-file '<file:///C:/Program C:\Program> Files\MATLAB\R2018b\toolbox\images\images\+images\+internal\morphmex.mexw64':
Missing dependent shared libraries:
'CONCRT140.dll' required by '<file:///C:/Program C:\Program> Files\MATLAB\R2018b/bin/win64\opencv_core340.dll-><file:///C:/Program C:\Program>
Files\MATLAB\R2018b/bin/win64\libmwmorphop_ocv.dll-><file:///C:/Program C:\Program>
Files\MATLAB\R2018b\toolbox\images\images\+images\+internal\morphmex.mexw64'.
Error in images.internal.morphop (line 101)
B = images.internal.morphmex(ocvMethod, B, logical(nhood), zeros(size(nhood)), unpacked_M);
Error in imerode (line 87)
B = images.internal.morphop(A,se,'erode',mfilename,varargin{:});

Best Answer

The error message indicates that CONCRT140.dll is missing from your system.
Installing the run-time components from the following link should resolve this issue:
<https://www.microsoft.com/en-us/download/details.aspx?id=48145 https://www.microsoft.com/en-us/download/details.aspx?id=48145 >
Related Question