对DPM算法源码voc-release3.1在windows环境中matlab运行的修改

DPM算法是用来做目标识别的。一份matlab的源码可以从这里下到:http://cs.brown.edu/~pff/latent-release3/

作者给出的源码是在mac环境下使用matlab编译和运行的。

而大多数人的工作环境还是在windows下运行matlab,关键是源码中的cc文件,即c++的源文件,是使用 visual studio c++编译的,由于不同的编译器对于C的标准支持不一样,比如math.h中,有的就不包含round和trunc函数,这就需要hack一下。

本人已对此源码进行修改,在matlab R2014a下已经可以使用。源码已经上传到http://download.csdn.net/download/qiuchangyong/9971551,欢迎有问题,相互探讨。

该代码需要首先编译,因为matlab调用c++代码需要一个mexw文件,可能会遇到下面的错误:

>> compile
Error: Could not detect a compiler on local system
which can compile the specified input file(s)
Error using mex (line 206)
Unable to complete successfully.

Error in compile (line 1)
mex -O resize.cc


以上是因为没有设置mex造成的,需要使用本机的msvc编译工具,以我的开发环境为例,具体如下:

>> mex -setup
 
Welcome to mex -setup.  This utility will help you set up 
a default compiler.  For a list of supported compilers, see 
http://www.mathworks.com/support/compilers/R2011b/win64.html
 
Please choose your compiler for building MEX-files:
 
Would you like mex to locate installed compilers [y]/n? y
 
Select a compiler:
[1] Microsoft Software Development Kit (SDK) 7.1 in c:\Program Files (x86)\Microsoft Visual Studio 10.0
[2] Microsoft Visual C++ 2010 in c:\Program Files (x86)\Microsoft Visual Studio 10.0
 
[0] None
 
Compiler: 2
 
Please verify your choices:
 
Compiler: Microsoft Visual C++ 2010 
Location: c:\Program Files (x86)\Microsoft Visual Studio 10.0
 
Are these correct [y]/n? y
 
***************************************************************************
  Warning: MEX-files generated using Microsoft Visual C++ 2010 require
           that Microsoft Visual Studio 2010 run-time libraries be 
           available on the computer they are run on.
           If you plan to redistribute your MEX-files to other MATLAB
           users, be sure that they have the run-time libraries.
***************************************************************************
 
 
Trying to update options file: C:\Users\Daniel\AppData\Roaming\MathWorks\MATLAB\R2011b\mexopts.bat
From template:              C:\PROGRA~1\MATLAB\R2011b\bin\win64\mexopts\msvc100opts.bat
 
Done . . .
 
**************************************************************************
  Warning: The MATLAB C and Fortran API has changed to support MATLAB
           variables with more than 2^32-1 elements.  In the near future
           you will be required to update your code to utilize the new
           API. You can find more information about this at:
           http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
           Building with the -largeArrayDims option enables the new API.
**************************************************************************


这样就可以compile了


  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DPM (Data Protection Manager) 算法是由微软公司开发的一种备份与恢复解决方案,专为 Windows 系统而设计。它提供了一种可靠且灵活的数据保护方式,能够在短时间内备份大量数据,并且能够快速恢复数据。 DPM算法的核心思想是增量备份和容错性。增量备份意味着只备份发生更改的文件,而不是整个文件系统。这样可以大大减少备份时间,并优化存储空间的使用。容错性是指当备份过程出现错误或故障时,DPM算法能够自动纠正或恢复数据,确保数据的完整性和可用性。 DPM算法包含了以下关键组件: 1. DPM 服务器:作为备份和恢复的控制心,管理备份策略、存储目标及备份计划。 2. 网络代理:负责与被保护服务器通信,传输备份数据。 3. 卷代理:在被保护服务器上安装的代理程序,负责卷级备份与恢复操作。 DPM算法的工作流程如下: 1. 配置备份并选择备份目标。 2. 创建备份计划,包括备份时间表、保留策略等。 3. 在被保护服务器上安装并配置卷代理。 4. 基于卷代理实现增量备份,通过网络代理将数据传输到 DPM 服务器存储。 5. 定期检查备份的完整性与可用性,并进行必要的纠正和修复。 6. 当需要恢复数据时,可以通过 DPM 服务器选择特定的备份点,并将数据恢复到原始位置。 总之,DPM算法是一种可靠且高效的数据备份与恢复解决方案,适用于 Windows 环境。它可以提供快速的备份和恢复性能,并能保证数据的完整性和可用性,为用户提供数据保护和业务连续性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值