changeset 143:8d866d96f006

changes to the merge
author Ivan <ivan.damnjanovic@eecs.qmul.ac.uk>
date Tue, 26 Jul 2011 15:13:29 +0100
parents 5a5e54f733c9
children 19e0af570914
files SMALLboxSetup.m util/Pierre_reconstruct.m
diffstat 2 files changed, 18 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/SMALLboxSetup.m	Mon Jul 11 13:43:12 2011 +0100
+++ b/SMALLboxSetup.m	Tue Jul 26 15:13:29 2011 +0100
@@ -274,7 +274,22 @@
 end
 
 %%
+%% KSVD utils setup
 
+if ~(exist('addtocols')==3)
+    cd([SMALL_path,FS,'util',FS,'ksvd utils']);
+    make
+    cd(SMALL_path);
+end
+
+%% fast omp for Gabor dictionary 
+
+if ~(exist('omp2Gabor')==3)
+    cd([SMALL_path,FS,'solvers', FS,'SMALL_ompGabor']);
+    make
+cd(SMALL_path);
+end
+%%
 if ~exist('ksvdver.m','file')
     fprintf('\n ******************************************************************');
     fprintf('\n\n Initialising OMPbox and KSVDBox Setup');
@@ -300,9 +315,9 @@
             fprintf('\n\n Downloading toolbox, please be patient\n\n');
         end
         unzip(KSVD_zip,[KSVD_path, FS, 'ksvdbox']);
-%         cd([KSVD_path, FS, 'ksvdbox', FS, 'private']);
-%         make;
-%         cd(SMALL_path);
+        cd([KSVD_path, FS, 'ksvdbox', FS, 'private']);
+        make;
+        cd(SMALL_path);
         KSVD_p=genpath(KSVD_path);
         addpath(KSVD_p);
         fprintf('\n KSVDBox and OMPBox Installation Successful\n');
@@ -392,13 +407,7 @@
     fprintf('\n\n matlab_midi (http://www.kenschutte.com/midi/) is already installed');
 end
 
-%% KSVD utils setup
 
-if ~(exist('addtocols')==3)
-    cd([SMALL_path,FS,'util',FS,'ksvd utils']);
-    make
-    cd(SMALL_path);
-end
 
 %% RWT setup
 if ~(exist('mdwt')==3)
--- a/util/Pierre_reconstruct.m	Mon Jul 11 13:43:12 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-function reconstructed=Pierre_reconstruct(y, Problem)
-%%  Pierre Villars Example - reconstruction function
-%
-%   using sparse representation y in dictionary Problem.A reconstruct the
-%   patches from the target image
-%   This example is based on the experiment suggested by Professor Pierre
-%   Vandergheynst on the SMALL meeting in Villars.
-
-%
-%   Centre for Digital Music, Queen Mary, University of London.
-%   This file copyright 2009 Ivan Damnjanovic.
-%
-%   This program is free software; you can redistribute it and/or
-%   modify it under the terms of the GNU General Public License as
-%   published by the Free Software Foundation; either version 2 of the
-%   License, or (at your option) any later version.  See the file
-%   COPYING included with this distribution for more information.
-%   
-%%
-imout=Problem.A*y;
-
-%   combine the patches into reconstructed image
-
-im=col2imstep(imout,size(Problem.imageTrg),Problem.blocksize,Problem.blocksize);
-
-%   bound the pixel values to [0,255] range 
-im(im<0)=0;
-im(im>255)=255;
-
-%% output structure image+psnr %%
-reconstructed.image=im;
-reconstructed.psnr = 20*log10(Problem.maxval * sqrt(numel(Problem.imageTrg(:))) / norm(Problem.imageTrg(:)-im(:)));
-end
\ No newline at end of file