# HG changeset patch # User Ivan # Date 1311689609 -3600 # Node ID 8d866d96f006fbd485d48294a7ce8e0e36f7939a # Parent 5a5e54f733c909a0448272d6a974e4a878a07812 changes to the merge diff -r 5a5e54f733c9 -r 8d866d96f006 SMALLboxSetup.m --- 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) diff -r 5a5e54f733c9 -r 8d866d96f006 util/Pierre_reconstruct.m --- 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