在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
TLD即Tracking Learning Detection,Zdenek Kalal大神在其主页上给出的代码http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html,根据网上看到的视频,ZK大神的idea和程序真是amazing,我也想拿来研究一下~ 好吧,废话不多说,来看看如何进行配置吧: 跑此程序,首先应该运行compile.m程序,然后再运行run_TLD.m,在任何机器上,首先得保证matlab的mex命令设置正确,其可通过 mex -setup 命令实现,然后打开compile.m文件: 源代码中: include = ' -Ic:\OpenCV2.2\include\opencv\ -Ic:\OpenCV2.2\include\'; libpath = 'c:\OpenCV2.2\lib\'; 需改为自己电脑中的路径,如我的就是: include = ' -ID:\OpenCV2.3\vs2010\install\include\opencv\ -ID:\OpenCV2.3\vs2010\install\include\ -ID:\OpenCV2.3\vs2010\install\include\opencv2\'; libpath = 'D:\OpenCV2.3\vs2010\install\lib\'; 当然这些只是针对windows pc改的,若换成其它系统环境,则在相应的地方更改 这样改好了,一般就是能够正常编译运行了,然而,若用VS2010则又有不同,根据作者的说法https://github.com/zk00006/OpenTLD/wiki/Installation: You will need some extension toolboxes for Matlab, see below. 1) Install OpenCV2.2: compile OpenCV, set system PATH variable to link to OpenCV DLLs 2) Setup mex compiler in Matlab: run: mex -setup, select Visual Studio 2010 compiler from the list 3) Compilation of mex files: check paths in 'compile.m' file, run 'compile.m' 3.1) If you are using Matlab 2011a, in TLD source, comment out the following lines in lk.cpp, fern.cpp, and bb_overlap.cpp (Otherwise, you will get an error about int being undefined which is a no-no in 2010): #ifdef _CHAR16_T #define CHAR16_T #endif 即如红色部分所示,你需要把 lk.cpp, fern.cpp, and bb_overlap.cpp 这几个文件中的这几行代码 #ifdef _CHAR16_T #define CHAR16_T #endif 注释掉 好吧,按照以上方法做了,我的能成功编译了~ 但在run_TLD.m的时候还是出现了一些莫名奇妙的错误,我正在努力debug中,实在不行,就将就着VS2005了 调别人代码最郁闷的事,就是按照别人说的做了,却得不到预期的结果…… 唔, 后来成功了, see: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论