edgesBoxes-matlab代码安装调试

参考readme.txt进行配置,主要在第三部分:3. Installation.


a) This code is written for the Matlab interpreter (tested with versions R2013a-2013b) and requires the Matlab Image Processing Toolbox.

matlab 2016b 已经有,版本9.5


b) Additionally, Piotr's Matlab Toolbox (version 3.26 or later) is also required. It can be downloaded at:

 https://pdollar.github.io/toolbox/.

根据网址上的教程,下载代码包,解压,放到自己的想要的目录下,然后在matlab命令行中输入:

>>addpath(genpath('你自己的保存路径'));(我的:/home/minmin/文档/software-package/piotr_toolbox)

通过命令行输入>>path 就能看到这个文件夹及其子文件夹都有了,能够把子文件夹也包含进来是genpath的功劳。

教程中给的是

>> addpath(genpath('path/to/toolbox/')); savepath;

然而,savepath老报错,说无法保存到pathdef.m,我就没写,不影响使用。((结果每次打开工程都得重新添加路径!!!)

如果这个工具包没有配好,运行edgeBoxesDemo.m,总会报错说:未定义函数或变量 'getPrmDflt'。


c) Next, please compile mex code from within Matlab (note: win64/linux64 binaries included):

  mex private/edgesDetectMex.cpp -outdir private [OMPPARAMS]

  mex private/edgesNmsMex.cpp    -outdir private [OMPPARAMS]

  mex private/spDetectMex.cpp    -outdir private [OMPPARAMS]

  mex private/edgeBoxesMex.cpp   -outdir private

Here [OMPPARAMS] are parameters for OpenMP and are OS and compiler dependent.

  Windows:  [OMPPARAMS] = '-DUSEOMP' 'OPTIMFLAGS="$OPTIMFLAGS' '/openmp"'

  Linux V1: [OMPPARAMS] = '-DUSEOMP' CFLAGS="\$CFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp"

  Linux V2: [OMPPARAMS] = '-DUSEOMP' CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp"

To compile without OpenMP simply omit [OMPPARAMS]; note that code will be single threaded in this case.

已经编译好了,不需要自己编译


d) Add edge detection code to Matlab path (change to current directory first):

 >> addpath(pwd); savepath;

这一步我没有做

没有更多推荐了,返回首页