Mercurial > hg > smallbox
comparison SMALLboxSetup.m @ 12:b6d8f2c4f5fa
(none)
author | idamnjanovic |
---|---|
date | Thu, 25 Mar 2010 13:03:50 +0000 |
parents | 7750624e0c73 |
children | a0571bf2ff54 |
comparison
equal
deleted
inserted
replaced
11:7d36ff44e217 | 12:b6d8f2c4f5fa |
---|---|
9 % | 9 % |
10 % SMALLbox initialisation | 10 % SMALLbox initialisation |
11 % Ivan Damnjanovic, Matthew Davies 2009 | 11 % Ivan Damnjanovic, Matthew Davies 2009 |
12 | 12 |
13 | 13 |
14 %% | |
14 clc; | 15 clc; |
15 | 16 |
16 FS=filesep; | 17 FS=filesep; |
17 | 18 |
18 fprintf('\n ********************************************************************'); | 19 fprintf('\n ********************************************************************'); |
21 fprintf('\n Sparco version 1.2, incorporating Rice Wavelet Toolbox version 2.4'); | 22 fprintf('\n Sparco version 1.2, incorporating Rice Wavelet Toolbox version 2.4'); |
22 fprintf('\n SPGL1 Toolbox version 1.7 '); | 23 fprintf('\n SPGL1 Toolbox version 1.7 '); |
23 fprintf('\n SparseLab Toolbox version 2.1'); | 24 fprintf('\n SparseLab Toolbox version 2.1'); |
24 fprintf('\n Sparsify Toolbox version 0.4'); | 25 fprintf('\n Sparsify Toolbox version 0.4'); |
25 fprintf('\n GPSR Toolbox version 5.0'); | 26 fprintf('\n GPSR Toolbox version 5.0'); |
26 fprintf('\n OMPbox version 9'); | 27 fprintf('\n OMPbox version 10'); |
27 fprintf('\n KSVDbox version 10'); | 28 fprintf('\n OMPSbox version 1'); |
29 fprintf('\n KSVDbox version 13'); | |
30 fprintf('\n KSVDSbox version 11'); | |
28 fprintf('\n\n ********************************************************************'); | 31 fprintf('\n\n ********************************************************************'); |
29 | 32 |
30 fprintf('\n\n The toolbox will be installed in: '); | 33 fprintf('\n\n The toolbox will be installed in: '); |
31 fprintf('\n %s%s\n',pwd,FS); | 34 fprintf('\n %s%s\n',pwd,FS); |
32 fprintf('\n ********************************************************************'); | 35 fprintf('\n ********************************************************************'); |
49 | 52 |
50 if install_ack == 'n', | 53 if install_ack == 'n', |
51 return; | 54 return; |
52 else | 55 else |
53 fprintf('\n\n Installation now beginning...'); | 56 fprintf('\n\n Installation now beginning...'); |
54 % fprintf('\n\nFor further information on the toolboxes see SMALLbox documentation\n\n'); | 57 |
55 end | 58 end |
56 | 59 |
57 | 60 |
58 | 61 |
59 | 62 |
60 SMALL_path=pwd; | 63 SMALL_path=pwd; |
61 SMALL_p=genpath(SMALL_path); | 64 SMALL_p=genpath(SMALL_path); |
62 addpath(SMALL_p); | 65 addpath(SMALL_p); |
63 | 66 |
64 | 67 |
65 fprintf('\n ******************************************************************'); | 68 %% |
66 fprintf('\n\n Initialising SPARCO and Rice Wavelet Toolbox Setup'); | 69 |
67 | 70 |
68 | 71 if ~exist('sparcoSetup.m','file') |
72 fprintf('\n ******************************************************************'); | |
73 fprintf('\n\n Initialising SPARCO and Rice Wavelet Toolbox Setup'); | |
74 | |
69 Sparco_path = [SMALL_path,FS,'toolboxes',FS,'SPARCO']; | 75 Sparco_path = [SMALL_path,FS,'toolboxes',FS,'SPARCO']; |
70 if exist([Sparco_path, FS, 'sparco-1.2.zip'],'file'), | 76 if exist([Sparco_path, FS, 'sparco-1.2.zip'],'file'), |
71 Sparco_zip=[Sparco_path, FS, 'sparco-1.2.zip']; | 77 Sparco_zip=[Sparco_path, FS, 'sparco-1.2.zip']; |
72 else | 78 else |
73 Sparco_zip='http://www.cs.ubc.ca/labs/scl/sparco/downloads.php?filename=sparco-1.2.zip'; | 79 Sparco_zip='http://www.cs.ubc.ca/labs/scl/sparco/downloads.php?filename=sparco-1.2.zip'; |
75 end | 81 end |
76 unzip(Sparco_zip,Sparco_path); | 82 unzip(Sparco_zip,Sparco_path); |
77 Sparco_p=genpath(Sparco_path); | 83 Sparco_p=genpath(Sparco_path); |
78 addpath(Sparco_p); | 84 addpath(Sparco_p); |
79 cd(SMALL_path) | 85 cd(SMALL_path) |
80 | 86 |
81 | 87 |
82 | 88 |
83 if exist('curvelab.pdf','file') | 89 if exist('curvelab.pdf','file') |
84 crvroot = fileparts(which('curvelab.pdf')); | 90 crvroot = fileparts(which('curvelab.pdf')); |
85 addtopath(crvroot,'fdct_usfft_matlab'); | 91 addtopath(crvroot,'fdct_usfft_matlab'); |
86 addtopath(crvroot,'fdct_wrapping_matlab'); | 92 addtopath(crvroot,'fdct_wrapping_matlab'); |
87 addtopath(crvroot,'fdct_wrapping_cpp/mex'); | 93 addtopath(crvroot,'fdct_wrapping_cpp/mex'); |
88 addtopath(crvroot,'fdct3d/mex'); | 94 addtopath(crvroot,'fdct3d/mex'); |
89 else | 95 else |
90 fprintf(['\nWarning: CurveLab is not in the path. Sparco Problems 50-51 ' ... | 96 fprintf(['\nWarning: CurveLab is not in the path. Sparco Problems 50-51 ' ... |
91 'will not work.\n\n']); | 97 'will not work.\n\n']); |
92 end | 98 end |
93 | 99 |
94 cd([Sparco_path, FS, 'sparco-1.2', FS, 'tools' ,FS, 'rwt']) | 100 cd([Sparco_path, FS, 'sparco-1.2', FS, 'tools' ,FS, 'rwt']) |
95 fprintf('Compiling the Rice Wavelet Toolbox MEX interfaces...'); | 101 fprintf('Compiling the Rice Wavelet Toolbox MEX interfaces...'); |
96 try | 102 try |
97 if exist('mdwt' ,'file')~=3, mex mdwt.c mdwt_r.c; end | 103 if exist('mdwt' ,'file')~=3, mex mdwt.c mdwt_r.c; end |
98 if exist('midwt' ,'file')~=3, mex midwt.c midwt_r.c; end | 104 if exist('midwt' ,'file')~=3, mex midwt.c midwt_r.c; end |
100 if exist('mirdwt','file')~=3, mex mirdwt.c mirdwt_r.c; end | 106 if exist('mirdwt','file')~=3, mex mirdwt.c mirdwt_r.c; end |
101 fprintf('SPARCO Installation Successful!\n'); | 107 fprintf('SPARCO Installation Successful!\n'); |
102 catch | 108 catch |
103 warning('Could not compile Rice Wavelet Toolbox MEX interfaces.'); | 109 warning('Could not compile Rice Wavelet Toolbox MEX interfaces.'); |
104 end | 110 end |
105 cd(SMALL_path) | 111 cd(SMALL_path); |
106 | 112 else |
107 | 113 fprintf('\n ******************************************************************'); |
108 | 114 fprintf('\n\n SPARCO and Rice Wavelet Toolbox are already installed'); |
109 fprintf('\n ******************************************************************'); | 115 end |
110 fprintf('\n\n Initialising SPGL1 Setup'); | 116 %% |
111 | 117 |
112 try | 118 |
113 SPGL1_path = [SMALL_path,FS,'toolboxes',FS,'SPGL1']; | 119 if ~exist('spgsetup.m','file') |
114 if exist([SPGL1_path, FS, 'spgl1-1.7.zip'],'file'), | 120 fprintf('\n ******************************************************************'); |
115 SPGL1_zip=[SPGL1_path, FS, 'spgl1-1.7.zip']; | 121 fprintf('\n\n Initialising SPGL1 Setup'); |
122 | |
123 try | |
124 SPGL1_path = [SMALL_path,FS,'toolboxes',FS,'SPGL1']; | |
125 if exist([SPGL1_path, FS, 'spgl1-1.7.zip'],'file'), | |
126 SPGL1_zip=[SPGL1_path, FS, 'spgl1-1.7.zip']; | |
127 else | |
128 SPGL1_zip='http://www.cs.ubc.ca/labs/scl/spgl1/downloads.php?filename=spgl1-1.7.zip'; | |
129 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
130 end | |
131 unzip(SPGL1_zip,SPGL1_path); | |
132 SPGL1_p=genpath(SPGL1_path); | |
133 addpath(SPGL1_p); | |
134 | |
135 | |
136 cd([SPGL1_path,FS,'spgl1-1.7']); | |
137 fprintf('Compiling SPGL1 MEX interfaces ...'); | |
138 try | |
139 spgsetup; | |
140 fprintf('\n SPGL1 Installation Successful!\n'); | |
141 catch | |
142 warning('Could not compile SPGL1 MEX interfaces.'); | |
143 end | |
144 catch | |
145 fprintf('\n SPGL1 Installation Failed\n'); | |
146 end | |
147 cd(SMALL_path); | |
148 else | |
149 fprintf('\n ******************************************************************'); | |
150 fprintf('\n\n SPGL1 is already installed'); | |
151 end | |
152 %% | |
153 | |
154 if ~exist('SparsePath.m','file') | |
155 fprintf('\n ******************************************************************'); | |
156 fprintf('\n\n Initialising SparseLab Setup'); | |
157 | |
158 try | |
159 SL_path = [pwd,FS,'toolboxes',FS,'SparseLab']; | |
160 if exist([SL_path, FS, 'SparseLab21-Core.zip'],'file'), | |
161 SL_zip=[SL_path, FS, 'SparseLab21-Core.zip']; | |
162 else | |
163 SL_zip='http://sparselab.stanford.edu/SparseLab_files/Download_files/SparseLab21-Core.zip'; | |
164 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
165 end | |
166 unzip(SL_zip,SL_path); | |
167 SL_p=genpath(SL_path); | |
168 addpath(SL_p); | |
169 fprintf('\n SparseLab Installation Successful!\n'); | |
170 catch | |
171 fprintf('\n SparseLab Installation Failed\n'); | |
172 cd(SMALL_path); | |
173 end | |
174 else | |
175 fprintf('\n ******************************************************************'); | |
176 fprintf('\n\n SparseLab is already installed'); | |
177 end | |
178 %% | |
179 | |
180 if ~exist('greed_pcgp.m','file') | |
181 fprintf('\n ******************************************************************'); | |
182 fprintf('\n\n Initialising Sparsify Setup'); | |
183 | |
184 try | |
185 Sparsify_path = [pwd,FS,'toolboxes',FS,'Sparsify']; | |
186 if exist([Sparsify_path, FS, 'sparsify_0_4.zip'],'file'), | |
187 Sparsify_zip=[Sparsify_path, FS, 'sparsify_0_4.zip']; | |
188 else | |
189 Sparsify_zip='http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify_0_4.zip'; | |
190 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
191 end | |
192 unzip(Sparsify_zip,Sparsify_path); | |
193 Sparsify_p=genpath(Sparsify_path); | |
194 addpath(Sparsify_p); | |
195 fprintf('\n Sparsify Installation Successful\n'); | |
196 catch | |
197 fprintf('\n Sparsify Installation Failed\n'); | |
198 cd(SMALL_path); | |
199 end | |
200 else | |
201 fprintf('\n ******************************************************************'); | |
202 fprintf('\n\n Sparsify is already installed'); | |
203 end | |
204 %% | |
205 if ~exist('GPSR_Basic.m','file') | |
206 fprintf('\n ******************************************************************'); | |
207 fprintf('\n\n Initialising GPSR Setup'); | |
208 | |
209 try | |
210 GPSR_path = [pwd,FS,'toolboxes',FS,'GPSR']; | |
211 if exist([GPSR_path, FS, 'GPSR_6.0.zip'],'file'), | |
212 GPSR_zip=[GPSR_path, FS,'GPSR_6.0.zip']; | |
213 else | |
214 GPSR_zip='http://www.lx.it.pt/~mtf/GPSR/GPSR_6.0.zip'; | |
215 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
216 end | |
217 unzip(GPSR_zip,GPSR_path); | |
218 GPSR_p=genpath(GPSR_path); | |
219 addpath(GPSR_p); | |
220 fprintf('\n GPSR Installation Successful\n'); | |
221 catch | |
222 fprintf('\n GPSR Installation Failed'); | |
223 cd(SMALL_path); | |
224 end | |
225 else | |
226 fprintf('\n ******************************************************************'); | |
227 fprintf('\n\n GPSR is already installed'); | |
228 end | |
229 | |
230 %% | |
231 | |
232 if ~exist('ksvdver.m','file') | |
233 fprintf('\n ******************************************************************'); | |
234 fprintf('\n\n Initialising OMPbox and KSVDBox Setup'); | |
235 | |
236 try | |
237 KSVD_path = [pwd,FS,'toolboxes',FS,'KSVD']; | |
238 if exist([KSVD_path, FS, 'ompbox10.zip'],'file'), | |
239 omp_zip=[KSVD_path, FS, 'ompbox10.zip']; | |
240 else | |
241 omp_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ompbox10.zip'; | |
242 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
243 end | |
244 unzip(omp_zip,[KSVD_path, FS, 'ompbox']); | |
245 | |
246 cd([KSVD_path, FS, 'ompbox', FS, 'private']); | |
247 make; | |
248 cd(SMALL_path); | |
249 | |
250 if exist([KSVD_path, FS, 'ksvdbox13.zip'],'file'), | |
251 KSVD_zip=[KSVD_path, FS, 'ksvdbox13.zip']; | |
252 else | |
253 KSVD_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdbox13.zip'; | |
254 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
255 end | |
256 unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']); | |
257 cd([KSVD_path, FS, 'ksvdbox', FS, 'private']); | |
258 make; | |
259 cd(SMALL_path); | |
260 KSVD_p=genpath(KSVD_path); | |
261 addpath(KSVD_p); | |
262 fprintf('\n KSVDBox and OMPBox Installation Successful\n'); | |
263 catch | |
264 fprintf('\n KSVDBox and OMPBox Installation Failed'); | |
265 cd(SMALL_path); | |
266 end | |
267 else | |
268 fprintf('\n ******************************************************************'); | |
269 fprintf('\n\n KSVD is already installed'); | |
270 end | |
271 %% | |
272 if ~exist('ksvdsver.m','file') | |
273 fprintf('\n ******************************************************************'); | |
274 fprintf('\n\n Initialising OMPSbox and KSVDSBox Setup'); | |
275 | |
276 try | |
277 KSVDS_path = [pwd,FS,'toolboxes',FS,'KSVDS']; | |
278 if exist([KSVDS_path, FS, 'ompsbox1.zip'],'file'), | |
279 omps_zip=[KSVDS_path, FS, 'ompsbox1.zip']; | |
280 else | |
281 omps_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ompsbox1.zip'; | |
282 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
283 end | |
284 unzip(omps_zip,[KSVDS_path, FS, 'ompsbox']); | |
285 | |
286 cd([KSVDS_path, FS, 'ompsbox', FS, 'private']); | |
287 make; | |
288 cd(SMALL_path); | |
289 | |
290 if exist([KSVDS_path, FS, 'ksvdsbox11.zip'],'file'), | |
291 KSVDS_zip=[KSVDS_path, FS, 'ksvdsbox11.zip']; | |
292 else | |
293 KSVDS_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdsbox11.zip'; | |
294 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
295 end | |
296 unzip(KSVDS_zip,[KSVDS_path, FS, 'ksvdsbox']); | |
297 cd([KSVDS_path, FS, 'ksvdsbox', FS, 'private']); | |
298 make; | |
299 cd(SMALL_path); | |
300 KSVDS_p=genpath(KSVDS_path); | |
301 addpath(KSVDS_p); | |
302 fprintf('\n KSVDSbox and OMPSbox Installation Successful\n'); | |
303 catch | |
304 fprintf('\n KSVDSbox and OMPSbox Installation Failed'); | |
305 cd(SMALL_path); | |
306 end | |
307 else | |
308 fprintf('\n ******************************************************************'); | |
309 fprintf('\n\n KSVDS is already installed'); | |
310 end | |
311 %% | |
312 | |
313 if ~exist('mexTrainDL.m','file') | |
314 fprintf('\n ******************************************************************'); | |
315 fprintf('\n\n If you want to use SMALLbox with SPAMS On-line Dictionary Learning please go to:'); | |
316 fprintf('\n http://www.di.ens.fr/willow/SPAMS/index.html'); | |
317 fprintf('\n and follow the instructions. The License prohibits redistribution of the SPAMS.'); | |
318 | |
319 else | |
320 fprintf('\n ******************************************************************'); | |
321 fprintf('\n\n SPAMS On-line Dictionary Learning is already installed'); | |
322 end; | |
323 %% | |
324 | |
325 | |
326 if ~exist('midiInfo.m','file') | |
327 try | |
328 matlab_midi_path = [pwd,FS,'util',FS,'matlab_midi']; | |
329 if exist([matlab_midi_path, FS, 'matlab_midi.zip'],'file'), | |
330 matlab_midi_zip=[SL_path, FS, 'matlab_midi.zip']; | |
116 else | 331 else |
117 SPGL1_zip='http://www.cs.ubc.ca/labs/scl/spgl1/downloads.php?filename=spgl1-1.7.zip'; | 332 matlab_midi_zip='http://www.kenschutte.com/static/code/matlab_midi.zip'; |
118 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | 333 fprintf('\n\n Downloading toolbox, please be patient\n\n'); |
119 end | 334 end |
120 unzip(SPGL1_zip,SPGL1_path); | 335 unzip(matlab_midi_zip,matlab_midi_path); |
121 SPGL1_p=genpath(SPGL1_path); | 336 matlab_midi_p=genpath(matlab_midi_path); |
122 addpath(SPGL1_p); | 337 addpath(matlab_midi_p); |
123 | 338 fprintf('\n matlab_midi (http://www.kenschutte.com/midi/) Installation Successful!\n'); |
124 | 339 catch |
125 cd([SPGL1_path,FS,'spgl1-1.7']); | 340 fprintf('\n matlab_midi (http://www.kenschutte.com/midi/) Installation Failed\n'); |
126 fprintf('Compiling SPGL1 MEX interfaces ...'); | |
127 try | |
128 spgsetup; | |
129 fprintf('\n SPGL1 Installation Successful!\n'); | |
130 catch | |
131 warning('Could not compile SPGL1 MEX interfaces.'); | |
132 end | |
133 catch | |
134 fprintf('\n SPGL1 Installation Failed\n'); | |
135 end | |
136 cd(SMALL_path); | |
137 | |
138 fprintf('\n ******************************************************************'); | |
139 fprintf('\n\n Initialising SparseLab Setup'); | |
140 | |
141 try | |
142 SL_path = [pwd,FS,'toolboxes',FS,'SparseLab']; | |
143 if exist([SL_path, FS, 'SparseLab21-Core.zip'],'file'), | |
144 SL_zip=[SL_path, FS, 'SparseLab21-Core.zip']; | |
145 else | |
146 SL_zip='http://sparselab.stanford.edu/SparseLab_files/Download_files/SparseLab21-Core.zip'; | |
147 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
148 end | |
149 unzip(SL_zip,SL_path); | |
150 SL_p=genpath(SL_path); | |
151 addpath(SL_p); | |
152 fprintf('\n SparseLab Installation Successful!\n'); | |
153 catch | |
154 fprintf('\n SparseLab Installation Failed\n'); | |
155 cd(SMALL_path); | |
156 end | |
157 | |
158 | |
159 fprintf('\n ******************************************************************'); | |
160 fprintf('\n\n Initialising Sparsify Setup'); | |
161 | |
162 try | |
163 Sparsify_path = [pwd,FS,'toolboxes',FS,'Sparsify']; | |
164 if exist([Sparsify_path, FS, 'sparsify_0_4.zip'],'file'), | |
165 Sparsify_zip=[Sparsify_path, FS, 'sparsify_0_4.zip']; | |
166 else | |
167 Sparsify_zip='http://www.see.ed.ac.uk/~tblumens/sparsify/sparsify_0_4.zip'; | |
168 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
169 end | |
170 unzip(Sparsify_zip,Sparsify_path); | |
171 Sparsify_p=genpath(Sparsify_path); | |
172 addpath(Sparsify_p); | |
173 fprintf('\n Sparsify Installation Successful\n'); | |
174 catch | |
175 fprintf('\n Sparsify Installation Failed\n'); | |
176 cd(SMALL_path); | |
177 end | |
178 | |
179 fprintf('\n ******************************************************************'); | |
180 fprintf('\n\n Initialising GPSR Setup'); | |
181 | |
182 try | |
183 GPSR_path = [pwd,FS,'toolboxes',FS,'GPSR']; | |
184 if exist([GPSR_path, FS, 'GPSR_6.0.zip'],'file'), | |
185 GPSR_zip=[GPSR_path, FS,'GPSR_6.0.zip']; | |
186 else | |
187 GPSR_zip='http://www.lx.it.pt/~mtf/GPSR/GPSR_6.0.zip'; | |
188 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
189 end | |
190 unzip(GPSR_zip,GPSR_path); | |
191 GPSR_p=genpath(GPSR_path); | |
192 addpath(GPSR_p); | |
193 fprintf('\n GPSR Installation Successful\n'); | |
194 catch | |
195 fprintf('\n GPSR Installation Failed'); | |
196 cd(SMALL_path); | |
197 end | |
198 | |
199 | |
200 fprintf('\n ******************************************************************'); | |
201 fprintf('\n\n Initialising OMPbox and KSVDBox Setup'); | |
202 | |
203 try | |
204 KSVD_path = [pwd,FS,'toolboxes',FS,'KSVD']; | |
205 if exist([KSVD_path, FS, 'ompbox9.zip'],'file'), | |
206 omp_zip=[KSVD_path, FS, 'ompbox9.zip']; | |
207 else | |
208 omp_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ompbox9.zip'; | |
209 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | |
210 end | |
211 unzip(omp_zip,[KSVD_path, FS, 'ompbox']); | |
212 | |
213 cd([KSVD_path, FS, 'ompbox', FS, 'private']); | |
214 make; | |
215 cd(SMALL_path); | 341 cd(SMALL_path); |
216 | 342 end |
217 if exist([KSVD_path, FS, 'ksvdbox10.zip'],'file'), | 343 else |
218 KSVD_zip=[KSVD_path, FS, 'ksvdbox10.zip']; | 344 fprintf('\n ******************************************************************'); |
219 else | 345 fprintf('\n\n matlab_midi (http://www.kenschutte.com/midi/) is already installed'); |
220 KSVD_zip='http://www.cs.technion.ac.il/%7Eronrubin/Software/ksvdbox10.zip'; | 346 end |
221 fprintf('\n\n Downloading toolbox, please be patient\n\n'); | 347 %% |
222 end | |
223 unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']); | |
224 cd([KSVD_path, FS, 'ksvdbox', FS, 'private']); | |
225 make; | |
226 cd(SMALL_path); | |
227 KSVD_p=genpath(KSVD_path); | |
228 addpath(KSVD_p); | |
229 fprintf('\n KSVDBox and OMPBox Installation Successful\n'); | |
230 catch | |
231 fprintf('\n KSVDBox and OMPBox Installation Failed'); | |
232 cd(SMALL_path); | |
233 end | |
234 | |
235 | |
236 | 348 |
237 | 349 |
238 fprintf('\n ******************************************************************'); | 350 fprintf('\n ******************************************************************'); |
239 fprintf('\n\n Initialising SMALLbox Examples Setup'); | 351 fprintf('\n\n Initialising SMALLbox Examples Setup'); |
240 | 352 |
241 % Need to do a bit of temporary housekeeping first. | 353 % Need to do a bit of temporary housekeeping first. |
242 cd(SMALL_path); | 354 cd(SMALL_path); |
243 try | 355 try |
244 cd(['examples',FS,'private']); | 356 cd(['Problems',FS,'private']); |
245 if exist('addtocols' ,'file')~=3, | 357 if exist('addtocols' ,'file')~=3, |
246 fprintf('\n Compiling MEX interfaces for SMALL examples \n'); | 358 fprintf('\n Compiling MEX interfaces for SMALL examples \n'); |
247 make; | 359 make; |
248 end | 360 end |
249 fprintf('\n SMALLbox Examples Installation Successful! \n'); | 361 fprintf('\n SMALLbox Examples Installation Successful! \n'); |
276 fprintf('\n For information on the SMALLbox example scripts'); | 388 fprintf('\n For information on the SMALLbox example scripts'); |
277 fprintf('\n Please see the examples directory. \n'); | 389 fprintf('\n Please see the examples directory. \n'); |
278 return; | 390 return; |
279 else | 391 else |
280 | 392 |
281 demo_choice = input('\n Enter 1 to run SMALL_solver_test, 2 to run SMALL_solver_test_Audio or q to quit: ','s'); | 393 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'); |
282 switch(demo_choice) | 394 switch(demo_choice) |
283 case{'1'} | 395 case{'1'} |
284 fprintf('\n Running SMALL_solver_test problem'); | 396 fprintf('\n Running SMALL_solver_test problem'); |
285 SMALL_solver_test; | 397 SMALL_solver_test; |
286 case{'2'} | 398 case{'2'} |
287 fprintf('\n Running SMALL_solver_test_Audio problem'); | 399 fprintf('\n Running SMALL Image Denoise problem'); |
288 SMALL_solver_test_Audio; | 400 SMALL_ImgDenoise_DL_test_KSVDvsSPAMS; |
289 otherwise | 401 otherwise |
290 return; | 402 return; |
291 end | 403 end |
292 | 404 |
293 end | 405 end |