这篇文章的内容是从我之前跟导师汇报的ppt里复制过来的,新手不擅长排版,请见谅。

 

零、工具箱的部分目录:

SPAMS(稀疏和字典学习)工具箱的介绍、配置和使用_html

涉及到字典学习、矩阵分解、稀疏等。。。。很强大吧~还有源码可以研究。

一. 工具箱在官网的叙述:

     SPAMS(SPArseModeling Software) is an optimization toolbox for solving various sparseestimation problems.It is coded in C++ with aMatlab ,Rand Python interface.

PS:官网提供了一个作者自己的参考书:J. Mairal, F.Bach and J. Ponce. 《SparseModeling for Image and Vision Processing》,这本书里介绍了工具箱会用到的大部分理论知识。SPAMS(稀疏和字典学习)工具箱的介绍、配置和使用_官网_02

二、官网有关下载的说明:

 

1).  The toolbox was successfully tested withgcc-4.6, theintelcompiler version 12 and visual studio compiler 10, and the BLAS/LAPACK libraryatlas, Intel MKL and AMD ACML. 

2).   The best performance was obtainedusing the Intel compiler + Intel MKL under Linux. Since the toolbox was mostlytested with toolbox was mostlytested with Matlabunder Linux, please use thematlabLinux 64bits version if you want to report speed results. 
3) . To use SPAMS withmatlabR2011a and later, do not forget to run the commandsetenv(‘MKL_NUM_THREADS','1')before using SPAMS.

注1:目前调试的文件,均没有按照第3条所说先运行setenv…的指令,但也全部调试成功

注2:SPAMS工具箱的使用说明在download可以下载到

注3:测试的电脑是win7,64bit,安装的是Matlab版本的SPAMS。安装的编译器是vs2013旗舰版;Matlab使用的版本是2014a。(实验证明VC++6.0以及CodeBlock都无法和SPAMSv2.5配合使用)

注4:当缺少安装环境时进入下面网站下载:http://cn.mathworks.com/support/compilers/R2014a/index.html?sec=win64#n4

 

SPAMS(稀疏和字典学习)工具箱的介绍、配置和使用_linux_03

注5:NET Framework 4.0必须在MicrosoftWindows SDK7.1安装之前先安装,否则运行m文件当运用到混合编程时,会出现mex可能会提示不可被调用。

 

三、SPAMS工具箱里各文件夹的官方说明 The folder doc contains the documentation in pdf and html. build/ contains the binaryfiles, including the help for each command. test_releasecontains various matlabscripts which call the different functions of this toolbox. 注:test_release文件夹中的m文件可直接运行调试 四、SPAMS工具箱的安装和使用

1).进入matlab,首先在 matlab命令窗口输入mex-setup,关联编译器,如果是Visual  Studio的话,最好是2010版本以上(官网说明推荐)。

2).compile.m、 get_architecture.m、 start_spams.m,包含不同的预处理信息,当运行的m文件中包含某些函数时,就必须预先运行这三个预处理文件,所以建议是使用SPAMS工具箱前,将这三个文件都先运行一下,然后就可以运行任意m文件了。
注:compile文件中,要按照文件中的注释改一些参数。
附:运行test_all.m文件的运算部分结果

SPAMS(稀疏和字典学习)工具箱的介绍、配置和使用_html_04