idamnjanovic@1
|
1 function SMALLboxSetup(varargin)
|
idamnjanovic@23
|
2 %%% SMALLboxSetup
|
idamnjanovic@23
|
3 %
|
idamnjanovic@23
|
4 % Centre for Digital Music, Queen Mary, University of London.
|
idamnjanovic@23
|
5 % This file copyright 2009 Ivan Damnjanovic, Matthew Davies.
|
idamnjanovic@23
|
6 %
|
idamnjanovic@23
|
7 % This program is free software; you can redistribute it and/or
|
idamnjanovic@23
|
8 % modify it under the terms of the GNU General Public License as
|
idamnjanovic@23
|
9 % published by the Free Software Foundation; either version 2 of the
|
idamnjanovic@23
|
10 % License, or (at your option) any later version. See the file
|
idamnjanovic@23
|
11 % COPYING included with this distribution for more information.
|
idamnjanovic@23
|
12 %
|
idamnjanovic@12
|
13 %
|
idamnjanovic@23
|
14 % Will automatically download and install existing toolboxes
|
idamnjanovic@23
|
15 % on sparse representations and dictionary learning
|
idamnjanovic@12
|
16 %
|
idamnjanovic@23
|
17 % For this function an internet connection is required.
|
idamnjanovic@1
|
18 %
|
idamnjanovic@23
|
19 % SMALLbox initialisation
|
idamnjanovic@12
|
20 %%
|
idamnjanovic@1
|
21 clc;
|
idamnjanovic@1
|
22
|
idamnjanovic@1
|
23 FS=filesep;
|
idamnjanovic@1
|
24
|
idamnjanovic@1
|
25 fprintf('\n ********************************************************************');
|
idamnjanovic@1
|
26 fprintf('\n\n This script will install the SMALLbox Evaluation Framework v.0.4');
|
idamnjanovic@1
|
27 fprintf('\n\n It contains the following toolboxes:');
|
idamnjanovic@1
|
28 fprintf('\n Sparco version 1.2, incorporating Rice Wavelet Toolbox version 2.4');
|
idamnjanovic@1
|
29 fprintf('\n SPGL1 Toolbox version 1.7 ');
|
idamnjanovic@1
|
30 fprintf('\n SparseLab Toolbox version 2.1');
|
idamnjanovic@1
|
31 fprintf('\n Sparsify Toolbox version 0.4');
|
idamnjanovic@1
|
32 fprintf('\n GPSR Toolbox version 5.0');
|
idamnjanovic@12
|
33 fprintf('\n OMPbox version 10');
|
idamnjanovic@12
|
34 fprintf('\n OMPSbox version 1');
|
idamnjanovic@12
|
35 fprintf('\n KSVDbox version 13');
|
idamnjanovic@12
|
36 fprintf('\n KSVDSbox version 11');
|
idamnjanovic@1
|
37 fprintf('\n\n ********************************************************************');
|
idamnjanovic@1
|
38
|
idamnjanovic@1
|
39 fprintf('\n\n The toolbox will be installed in: ');
|
idamnjanovic@1
|
40 fprintf('\n %s%s\n',pwd,FS);
|
idamnjanovic@1
|
41 fprintf('\n ********************************************************************');
|
idamnjanovic@1
|
42 fprintf('\n\n IMPORTANT: To successfully install all toolboxes');
|
idamnjanovic@1
|
43 fprintf('\n you will need to have MEX setup to compile C files.');
|
idamnjanovic@1
|
44 fprintf('\n\n If this is not already setup, please type "n" to exit and then ');
|
idamnjanovic@1
|
45 fprintf('\n run "mex -setup" or type "help mex" in the MATLAB command prompt.');
|
idamnjanovic@1
|
46 fprintf('\n\n ********************************************************************');
|
idamnjanovic@1
|
47
|
idamnjanovic@1
|
48
|
idamnjanovic@1
|
49 fprintf('\n ********************************************************************');
|
idamnjanovic@1
|
50 fprintf('\n\n IMPORTANT: YOU MUST HAVE AN INTERNET CONNECTION');
|
idamnjanovic@1
|
51 fprintf('\n YOU CANNOT INSTALL SMALLBOX WITHOUT ONE!');
|
idamnjanovic@1
|
52 fprintf('\n\n ********************************************************************');
|
idamnjanovic@1
|
53 install_ack = input('\n\n Do you wish to continue: ([y]/n)? ','s');
|
idamnjanovic@1
|
54
|
idamnjanovic@1
|
55 if strcmp(install_ack,'"n"'),
|
idamnjanovic@1
|
56 install_ack = 'n';
|
idamnjanovic@1
|
57 end
|
idamnjanovic@1
|
58
|
idamnjanovic@1
|
59 if install_ack == 'n',
|
idamnjanovic@1
|
60 return;
|
idamnjanovic@1
|
61 else
|
idamnjanovic@1
|
62 fprintf('\n\n Installation now beginning...');
|
idamnjanovic@12
|
63
|
idamnjanovic@1
|
64 end
|
idamnjanovic@1
|
65
|
idamnjanovic@1
|
66
|
idamnjanovic@1
|
67
|
idamnjanovic@1
|
68
|
idamnjanovic@1
|
69 SMALL_path=pwd;
|
idamnjanovic@1
|
70 SMALL_p=genpath(SMALL_path);
|
idamnjanovic@1
|
71 addpath(SMALL_p);
|
idamnjanovic@1
|
72
|
idamnjanovic@1
|
73
|
idamnjanovic@12
|
74 %%
|
idamnjanovic@1
|
75
|
idamnjanovic@1
|
76
|
idamnjanovic@12
|
77 if ~exist('sparcoSetup.m','file')
|
idamnjanovic@12
|
78 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
79 fprintf('\n\n Initialising SPARCO and Rice Wavelet Toolbox Setup');
|
idamnjanovic@12
|
80
|
idamnjanovic@1
|
81 Sparco_path = [SMALL_path,FS,'toolboxes',FS,'SPARCO'];
|
idamnjanovic@1
|
82 if exist([Sparco_path, FS, 'sparco-1.2.zip'],'file'),
|
idamnjanovic@1
|
83 Sparco_zip=[Sparco_path, FS, 'sparco-1.2.zip'];
|
idamnjanovic@1
|
84 else
|
idamnjanovic@1
|
85 Sparco_zip='http://www.cs.ubc.ca/labs/scl/sparco/downloads.php?filename=sparco-1.2.zip';
|
idamnjanovic@1
|
86 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@1
|
87 end
|
idamnjanovic@1
|
88 unzip(Sparco_zip,Sparco_path);
|
idamnjanovic@1
|
89 Sparco_p=genpath(Sparco_path);
|
idamnjanovic@1
|
90 addpath(Sparco_p);
|
idamnjanovic@1
|
91 cd(SMALL_path)
|
idamnjanovic@12
|
92
|
idamnjanovic@12
|
93
|
idamnjanovic@12
|
94
|
idamnjanovic@12
|
95 if exist('curvelab.pdf','file')
|
idamnjanovic@12
|
96 crvroot = fileparts(which('curvelab.pdf'));
|
idamnjanovic@12
|
97 addtopath(crvroot,'fdct_usfft_matlab');
|
idamnjanovic@12
|
98 addtopath(crvroot,'fdct_wrapping_matlab');
|
idamnjanovic@12
|
99 addtopath(crvroot,'fdct_wrapping_cpp/mex');
|
idamnjanovic@12
|
100 addtopath(crvroot,'fdct3d/mex');
|
idamnjanovic@12
|
101 else
|
idamnjanovic@12
|
102 fprintf(['\nWarning: CurveLab is not in the path. Sparco Problems 50-51 ' ...
|
idamnjanovic@1
|
103 'will not work.\n\n']);
|
idamnjanovic@12
|
104 end
|
idamnjanovic@12
|
105
|
idamnjanovic@1
|
106 cd([Sparco_path, FS, 'sparco-1.2', FS, 'tools' ,FS, 'rwt'])
|
idamnjanovic@1
|
107 fprintf('Compiling the Rice Wavelet Toolbox MEX interfaces...');
|
idamnjanovic@1
|
108 try
|
idamnjanovic@1
|
109 if exist('mdwt' ,'file')~=3, mex mdwt.c mdwt_r.c; end
|
idamnjanovic@1
|
110 if exist('midwt' ,'file')~=3, mex midwt.c midwt_r.c; end
|
idamnjanovic@1
|
111 if exist('mrdwt' ,'file')~=3, mex mrdwt.c mrdwt_r.c; end
|
idamnjanovic@1
|
112 if exist('mirdwt','file')~=3, mex mirdwt.c mirdwt_r.c; end
|
idamnjanovic@1
|
113 fprintf('SPARCO Installation Successful!\n');
|
idamnjanovic@1
|
114 catch
|
idamnjanovic@1
|
115 warning('Could not compile Rice Wavelet Toolbox MEX interfaces.');
|
idamnjanovic@1
|
116 end
|
idamnjanovic@12
|
117 cd(SMALL_path);
|
idamnjanovic@12
|
118 else
|
idamnjanovic@12
|
119 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
120 fprintf('\n\n SPARCO and Rice Wavelet Toolbox are already installed');
|
idamnjanovic@12
|
121 end
|
idamnjanovic@12
|
122 %%
|
idamnjanovic@1
|
123
|
idamnjanovic@1
|
124
|
idamnjanovic@12
|
125 if ~exist('spgsetup.m','file')
|
idamnjanovic@12
|
126 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
127 fprintf('\n\n Initialising SPGL1 Setup');
|
idamnjanovic@12
|
128
|
idamnjanovic@12
|
129 try
|
idamnjanovic@12
|
130 SPGL1_path = [SMALL_path,FS,'toolboxes',FS,'SPGL1'];
|
idamnjanovic@12
|
131 if exist([SPGL1_path, FS, 'spgl1-1.7.zip'],'file'),
|
idamnjanovic@12
|
132 SPGL1_zip=[SPGL1_path, FS, 'spgl1-1.7.zip'];
|
idamnjanovic@12
|
133 else
|
idamnjanovic@12
|
134 SPGL1_zip='http://www.cs.ubc.ca/labs/scl/spgl1/downloads.php?filename=spgl1-1.7.zip';
|
idamnjanovic@12
|
135 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
136 end
|
idamnjanovic@12
|
137 unzip(SPGL1_zip,SPGL1_path);
|
idamnjanovic@12
|
138 SPGL1_p=genpath(SPGL1_path);
|
idamnjanovic@12
|
139 addpath(SPGL1_p);
|
idamnjanovic@12
|
140
|
idamnjanovic@12
|
141
|
idamnjanovic@12
|
142 cd([SPGL1_path,FS,'spgl1-1.7']);
|
idamnjanovic@12
|
143 fprintf('Compiling SPGL1 MEX interfaces ...');
|
idamnjanovic@12
|
144 try
|
idamnjanovic@12
|
145 spgsetup;
|
idamnjanovic@12
|
146 fprintf('\n SPGL1 Installation Successful!\n');
|
idamnjanovic@12
|
147 catch
|
idamnjanovic@12
|
148 warning('Could not compile SPGL1 MEX interfaces.');
|
idamnjanovic@12
|
149 end
|
idamnjanovic@12
|
150 catch
|
idamnjanovic@12
|
151 fprintf('\n SPGL1 Installation Failed\n');
|
idamnjanovic@12
|
152 end
|
idamnjanovic@12
|
153 cd(SMALL_path);
|
idamnjanovic@12
|
154 else
|
idamnjanovic@12
|
155 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
156 fprintf('\n\n SPGL1 is already installed');
|
idamnjanovic@12
|
157 end
|
idamnjanovic@12
|
158 %%
|
idamnjanovic@1
|
159
|
idamnjanovic@12
|
160 if ~exist('SparsePath.m','file')
|
idamnjanovic@12
|
161 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
162 fprintf('\n\n Initialising SparseLab Setup');
|
idamnjanovic@12
|
163
|
idamnjanovic@12
|
164 try
|
idamnjanovic@12
|
165 SL_path = [pwd,FS,'toolboxes',FS,'SparseLab'];
|
idamnjanovic@12
|
166 if exist([SL_path, FS, 'SparseLab21-Core.zip'],'file'),
|
idamnjanovic@12
|
167 SL_zip=[SL_path, FS, 'SparseLab21-Core.zip'];
|
idamnjanovic@12
|
168 else
|
idamnjanovic@12
|
169 SL_zip='http://sparselab.stanford.edu/SparseLab_files/Download_files/SparseLab21-Core.zip';
|
idamnjanovic@12
|
170 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
171 end
|
idamnjanovic@12
|
172 unzip(SL_zip,SL_path);
|
idamnjanovic@12
|
173 SL_p=genpath(SL_path);
|
idamnjanovic@12
|
174 addpath(SL_p);
|
idamnjanovic@12
|
175 fprintf('\n SparseLab Installation Successful!\n');
|
idamnjanovic@12
|
176 catch
|
idamnjanovic@12
|
177 fprintf('\n SparseLab Installation Failed\n');
|
idamnjanovic@12
|
178 cd(SMALL_path);
|
idamnjanovic@12
|
179 end
|
idamnjanovic@12
|
180 else
|
idamnjanovic@12
|
181 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
182 fprintf('\n\n SparseLab is already installed');
|
idamnjanovic@12
|
183 end
|
idamnjanovic@12
|
184 %%
|
idamnjanovic@1
|
185
|
idamnjanovic@12
|
186 if ~exist('greed_pcgp.m','file')
|
idamnjanovic@12
|
187 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
188 fprintf('\n\n Initialising Sparsify Setup');
|
idamnjanovic@12
|
189
|
idamnjanovic@12
|
190 try
|
idamnjanovic@12
|
191 Sparsify_path = [pwd,FS,'toolboxes',FS,'Sparsify'];
|
idamnjanovic@12
|
192 if exist([Sparsify_path, FS, 'sparsify_0_4.zip'],'file'),
|
idamnjanovic@12
|
193 Sparsify_zip=[Sparsify_path, FS, 'sparsify_0_4.zip'];
|
idamnjanovic@12
|
194 else
|
idamnjanovic@12
|
195 Sparsify_zip='http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify_0_4.zip';
|
idamnjanovic@12
|
196 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
197 end
|
idamnjanovic@12
|
198 unzip(Sparsify_zip,Sparsify_path);
|
idamnjanovic@12
|
199 Sparsify_p=genpath(Sparsify_path);
|
idamnjanovic@12
|
200 addpath(Sparsify_p);
|
idamnjanovic@12
|
201 fprintf('\n Sparsify Installation Successful\n');
|
idamnjanovic@12
|
202 catch
|
idamnjanovic@12
|
203 fprintf('\n Sparsify Installation Failed\n');
|
idamnjanovic@12
|
204 cd(SMALL_path);
|
idamnjanovic@12
|
205 end
|
idamnjanovic@12
|
206 else
|
idamnjanovic@12
|
207 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
208 fprintf('\n\n Sparsify is already installed');
|
idamnjanovic@12
|
209 end
|
idamnjanovic@12
|
210 %%
|
idamnjanovic@12
|
211 if ~exist('GPSR_Basic.m','file')
|
idamnjanovic@12
|
212 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
213 fprintf('\n\n Initialising GPSR Setup');
|
idamnjanovic@12
|
214
|
idamnjanovic@12
|
215 try
|
idamnjanovic@12
|
216 GPSR_path = [pwd,FS,'toolboxes',FS,'GPSR'];
|
idamnjanovic@12
|
217 if exist([GPSR_path, FS, 'GPSR_6.0.zip'],'file'),
|
idamnjanovic@12
|
218 GPSR_zip=[GPSR_path, FS,'GPSR_6.0.zip'];
|
idamnjanovic@12
|
219 else
|
idamnjanovic@12
|
220 GPSR_zip='http://www.lx.it.pt/~mtf/GPSR/GPSR_6.0.zip';
|
idamnjanovic@12
|
221 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
222 end
|
idamnjanovic@12
|
223 unzip(GPSR_zip,GPSR_path);
|
idamnjanovic@12
|
224 GPSR_p=genpath(GPSR_path);
|
idamnjanovic@12
|
225 addpath(GPSR_p);
|
idamnjanovic@12
|
226 fprintf('\n GPSR Installation Successful\n');
|
idamnjanovic@12
|
227 catch
|
idamnjanovic@12
|
228 fprintf('\n GPSR Installation Failed');
|
idamnjanovic@12
|
229 cd(SMALL_path);
|
idamnjanovic@12
|
230 end
|
idamnjanovic@12
|
231 else
|
idamnjanovic@12
|
232 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
233 fprintf('\n\n GPSR is already installed');
|
idamnjanovic@12
|
234 end
|
idamnjanovic@12
|
235
|
idamnjanovic@12
|
236 %%
|
idamnjanovic@12
|
237
|
idamnjanovic@12
|
238 if ~exist('ksvdver.m','file')
|
idamnjanovic@12
|
239 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
240 fprintf('\n\n Initialising OMPbox and KSVDBox Setup');
|
idamnjanovic@12
|
241
|
idamnjanovic@12
|
242 try
|
idamnjanovic@12
|
243 KSVD_path = [pwd,FS,'toolboxes',FS,'KSVD'];
|
idamnjanovic@12
|
244 if exist([KSVD_path, FS, 'ompbox10.zip'],'file'),
|
idamnjanovic@12
|
245 omp_zip=[KSVD_path, FS, 'ompbox10.zip'];
|
idamnjanovic@12
|
246 else
|
idamnjanovic@12
|
247 omp_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ompbox10.zip';
|
idamnjanovic@12
|
248 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
249 end
|
idamnjanovic@12
|
250 unzip(omp_zip,[KSVD_path, FS, 'ompbox']);
|
idamnjanovic@12
|
251
|
idamnjanovic@12
|
252 cd([KSVD_path, FS, 'ompbox', FS, 'private']);
|
idamnjanovic@12
|
253 make;
|
idamnjanovic@12
|
254 cd(SMALL_path);
|
idamnjanovic@12
|
255
|
idamnjanovic@12
|
256 if exist([KSVD_path, FS, 'ksvdbox13.zip'],'file'),
|
idamnjanovic@12
|
257 KSVD_zip=[KSVD_path, FS, 'ksvdbox13.zip'];
|
idamnjanovic@12
|
258 else
|
idamnjanovic@12
|
259 KSVD_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdbox13.zip';
|
idamnjanovic@12
|
260 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
261 end
|
idamnjanovic@12
|
262 unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']);
|
idamnjanovic@12
|
263 cd([KSVD_path, FS, 'ksvdbox', FS, 'private']);
|
idamnjanovic@12
|
264 make;
|
idamnjanovic@12
|
265 cd(SMALL_path);
|
idamnjanovic@12
|
266 KSVD_p=genpath(KSVD_path);
|
idamnjanovic@12
|
267 addpath(KSVD_p);
|
idamnjanovic@12
|
268 fprintf('\n KSVDBox and OMPBox Installation Successful\n');
|
idamnjanovic@12
|
269 catch
|
idamnjanovic@12
|
270 fprintf('\n KSVDBox and OMPBox Installation Failed');
|
idamnjanovic@12
|
271 cd(SMALL_path);
|
idamnjanovic@12
|
272 end
|
idamnjanovic@12
|
273 else
|
idamnjanovic@12
|
274 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
275 fprintf('\n\n KSVD is already installed');
|
idamnjanovic@12
|
276 end
|
idamnjanovic@12
|
277 %%
|
idamnjanovic@12
|
278 if ~exist('ksvdsver.m','file')
|
idamnjanovic@12
|
279 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
280 fprintf('\n\n Initialising OMPSbox and KSVDSBox Setup');
|
idamnjanovic@12
|
281
|
idamnjanovic@12
|
282 try
|
idamnjanovic@12
|
283 KSVDS_path = [pwd,FS,'toolboxes',FS,'KSVDS'];
|
idamnjanovic@12
|
284 if exist([KSVDS_path, FS, 'ompsbox1.zip'],'file'),
|
idamnjanovic@12
|
285 omps_zip=[KSVDS_path, FS, 'ompsbox1.zip'];
|
idamnjanovic@12
|
286 else
|
idamnjanovic@12
|
287 omps_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ompsbox1.zip';
|
idamnjanovic@12
|
288 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
289 end
|
idamnjanovic@12
|
290 unzip(omps_zip,[KSVDS_path, FS, 'ompsbox']);
|
idamnjanovic@12
|
291
|
idamnjanovic@12
|
292 cd([KSVDS_path, FS, 'ompsbox', FS, 'private']);
|
idamnjanovic@12
|
293 make;
|
idamnjanovic@12
|
294 cd(SMALL_path);
|
idamnjanovic@12
|
295
|
idamnjanovic@12
|
296 if exist([KSVDS_path, FS, 'ksvdsbox11.zip'],'file'),
|
idamnjanovic@12
|
297 KSVDS_zip=[KSVDS_path, FS, 'ksvdsbox11.zip'];
|
idamnjanovic@12
|
298 else
|
idamnjanovic@12
|
299 KSVDS_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdsbox11.zip';
|
idamnjanovic@12
|
300 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@12
|
301 end
|
idamnjanovic@12
|
302 unzip(KSVDS_zip,[KSVDS_path, FS, 'ksvdsbox']);
|
idamnjanovic@12
|
303 cd([KSVDS_path, FS, 'ksvdsbox', FS, 'private']);
|
idamnjanovic@12
|
304 make;
|
idamnjanovic@12
|
305 cd(SMALL_path);
|
idamnjanovic@12
|
306 KSVDS_p=genpath(KSVDS_path);
|
idamnjanovic@12
|
307 addpath(KSVDS_p);
|
idamnjanovic@12
|
308 fprintf('\n KSVDSbox and OMPSbox Installation Successful\n');
|
idamnjanovic@12
|
309 catch
|
idamnjanovic@12
|
310 fprintf('\n KSVDSbox and OMPSbox Installation Failed');
|
idamnjanovic@12
|
311 cd(SMALL_path);
|
idamnjanovic@12
|
312 end
|
idamnjanovic@12
|
313 else
|
idamnjanovic@12
|
314 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
315 fprintf('\n\n KSVDS is already installed');
|
idamnjanovic@12
|
316 end
|
idamnjanovic@12
|
317 %%
|
idamnjanovic@12
|
318
|
idamnjanovic@12
|
319 if ~exist('mexTrainDL.m','file')
|
idamnjanovic@12
|
320 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
321 fprintf('\n\n If you want to use SMALLbox with SPAMS On-line Dictionary Learning please go to:');
|
idamnjanovic@12
|
322 fprintf('\n http://www.di.ens.fr/willow/SPAMS/index.html');
|
idamnjanovic@12
|
323 fprintf('\n and follow the instructions. The License prohibits redistribution of the SPAMS.');
|
idamnjanovic@12
|
324
|
idamnjanovic@12
|
325 else
|
idamnjanovic@12
|
326 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
327 fprintf('\n\n SPAMS On-line Dictionary Learning is already installed');
|
idamnjanovic@12
|
328 end;
|
idamnjanovic@12
|
329 %%
|
idamnjanovic@12
|
330
|
idamnjanovic@12
|
331
|
idamnjanovic@12
|
332 if ~exist('midiInfo.m','file')
|
idamnjanovic@12
|
333 try
|
idamnjanovic@12
|
334 matlab_midi_path = [pwd,FS,'util',FS,'matlab_midi'];
|
idamnjanovic@12
|
335 if exist([matlab_midi_path, FS, 'matlab_midi.zip'],'file'),
|
idamnjanovic@12
|
336 matlab_midi_zip=[SL_path, FS, 'matlab_midi.zip'];
|
idamnjanovic@1
|
337 else
|
idamnjanovic@12
|
338 matlab_midi_zip='http://www.kenschutte.com/static/code/matlab_midi.zip';
|
idamnjanovic@1
|
339 fprintf('\n\n Downloading toolbox, please be patient\n\n');
|
idamnjanovic@1
|
340 end
|
idamnjanovic@12
|
341 unzip(matlab_midi_zip,matlab_midi_path);
|
idamnjanovic@12
|
342 matlab_midi_p=genpath(matlab_midi_path);
|
idamnjanovic@12
|
343 addpath(matlab_midi_p);
|
idamnjanovic@12
|
344 fprintf('\n matlab_midi (http://www.kenschutte.com/midi/) Installation Successful!\n');
|
idamnjanovic@12
|
345 catch
|
idamnjanovic@12
|
346 fprintf('\n matlab_midi (http://www.kenschutte.com/midi/) Installation Failed\n');
|
idamnjanovic@1
|
347 cd(SMALL_path);
|
idamnjanovic@12
|
348 end
|
idamnjanovic@12
|
349 else
|
idamnjanovic@12
|
350 fprintf('\n ******************************************************************');
|
idamnjanovic@12
|
351 fprintf('\n\n matlab_midi (http://www.kenschutte.com/midi/) is already installed');
|
idamnjanovic@12
|
352 end
|
idamnjanovic@12
|
353 %%
|
idamnjanovic@1
|
354
|
idamnjanovic@1
|
355
|
idamnjanovic@1
|
356 fprintf('\n ******************************************************************');
|
idamnjanovic@1
|
357 fprintf('\n\n Initialising SMALLbox Examples Setup');
|
idamnjanovic@1
|
358
|
idamnjanovic@1
|
359 % Need to do a bit of temporary housekeeping first.
|
idamnjanovic@1
|
360 cd(SMALL_path);
|
idamnjanovic@1
|
361 try
|
idamnjanovic@12
|
362 cd(['Problems',FS,'private']);
|
idamnjanovic@1
|
363 if exist('addtocols' ,'file')~=3,
|
idamnjanovic@1
|
364 fprintf('\n Compiling MEX interfaces for SMALL examples \n');
|
idamnjanovic@1
|
365 make;
|
idamnjanovic@1
|
366 end
|
idamnjanovic@14
|
367 fprintf('\n SMALLbox Problems Installation Successful! \n');
|
idamnjanovic@1
|
368 catch
|
idamnjanovic@14
|
369 fprintf('\n SMALLbox Problems Installation Failed \n');
|
idamnjanovic@1
|
370 end
|
idamnjanovic@1
|
371 cd(SMALL_path);
|
idamnjanovic@1
|
372
|
idamnjanovic@1
|
373
|
idamnjanovic@1
|
374
|
idamnjanovic@1
|
375 fprintf('\n ******************************************************************');
|
idamnjanovic@1
|
376 fprintf('\n\n SMALLbox Installation Complete!');
|
idamnjanovic@1
|
377
|
idamnjanovic@1
|
378
|
idamnjanovic@1
|
379 fprintf('\n\n For more information on the installed toolboxes see');
|
idamnjanovic@1
|
380 fprintf('\n\n Sparco: http://www.cs.ubc.ca/labs/scl/sparco/');
|
idamnjanovic@1
|
381 fprintf('\n\n SPGL1: http://www.cs.ubc.ca/labs/spgl1/?n=HomePage');
|
idamnjanovic@1
|
382 fprintf('\n\n SparseLab: http://sparselab.stanford.edu/ (PLEASE REGISTER SPARSELAB!)');
|
idamnjanovic@1
|
383 fprintf('\n\n Sparsify: http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify.html');
|
idamnjanovic@1
|
384 fprintf('\n\n GPSR: http://www.lx.it.pt/~mtf/GPSR/');
|
idamnjanovic@1
|
385 fprintf('\n\n OMPbox and KSVDBox: http://www.cs.technion.ac.il/~ronrubin/\n');
|
idamnjanovic@1
|
386
|
idamnjanovic@1
|
387
|
idamnjanovic@1
|
388 % LIST DEMOS FROM EXAMPLE DIRECTORY...
|
idamnjanovic@1
|
389
|
idamnjanovic@1
|
390 demo_ack = input('\n\n Would you like to run a demo: ([y]/n)? ','s');
|
idamnjanovic@1
|
391
|
idamnjanovic@1
|
392 if demo_ack == 'n',
|
idamnjanovic@1
|
393 fprintf('\n Thank you for installing SMALLbox.');
|
idamnjanovic@1
|
394 fprintf('\n For information on the SMALLbox example scripts');
|
idamnjanovic@1
|
395 fprintf('\n Please see the examples directory. \n');
|
idamnjanovic@1
|
396 return;
|
idamnjanovic@1
|
397 else
|
idamnjanovic@1
|
398
|
idamnjanovic@12
|
399 demo_choice = input('\n 1 to run SMALL_solver_test \n 2 to run Dictionary Learning for Image Denoising demo \n q to quit: ','s');
|
idamnjanovic@1
|
400 switch(demo_choice)
|
idamnjanovic@1
|
401 case{'1'}
|
idamnjanovic@1
|
402 fprintf('\n Running SMALL_solver_test problem');
|
idamnjanovic@1
|
403 SMALL_solver_test;
|
idamnjanovic@1
|
404 case{'2'}
|
idamnjanovic@12
|
405 fprintf('\n Running SMALL Image Denoise problem');
|
idamnjanovic@12
|
406 SMALL_ImgDenoise_DL_test_KSVDvsSPAMS;
|
idamnjanovic@1
|
407 otherwise
|
idamnjanovic@1
|
408 return;
|
idamnjanovic@1
|
409 end
|
idamnjanovic@1
|
410
|
idamnjanovic@1
|
411 end
|
idamnjanovic@12
|
412
|
idamnjanovic@12
|
413
|
idamnjanovic@1
|
414
|