matlab getprmdflt,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;

这一步我没有做

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值