Matlab r2017a错误与python"未定义的函数或变量' imfilter_mex'"

时间:2018-03-14 12:24:46

标签: python-2.7 matlab

我在matlab r2017a运行时出现了以下错误;

Undefined function or variable 'imfilter_mex'.
Error in imfilter>filterPartOrWhole (line 362)
Error in imfilter (line 178)
Error in imagePrepy (line 31)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/MATLAB/MATLAB_Runtime/v92/toolbox/compiler_sdk/pysdk_py/matlab_pysdk/runtime/deployablefunc.py", line 81, in __call__
    nlhsWasSpecified, stdoutObj, stderrObj).result()
  File "/usr/local/MATLAB/MATLAB_Runtime/v92/toolbox/compiler_sdk/pysdk_py/matlab_pysdk/runtime/futureresult.py", line 135, in result
    raise e
matlab_pysdk.runtime.MatlabRuntimeError: An error occurred when evaluating the result from a function. Details: 
  File /home/ubuntu/.mcrCache9.2/imageP1/toolbox/images/images/imfilter.m, line 362, in filterPartOrWhole

  File /home/ubuntu/.mcrCache9.2/imageP1/toolbox/images/images/imfilter.m, line 178, in imfilter

  File /home/ubuntu/.mcrCache9.2/imageP1/imageP/imagePrepy.m, line 31, in imagePrepy
Undefined function 'imfilter_mex' for input arguments of type 'uint8'.

1 个答案:

答案 0 :(得分:0)

我认为您尝试在另一个系统上运行编译的代码。例如,您使用Windows x64系统编译代码,然后尝试在Linux系统上运行它-这将不起作用。

您正在使用imfilter,而此MATLAB内部函数使用MEX函数,因此从哪个操作系统编译代码就很重要。

我遇到了一些错误,也许可以帮助其他人!