changeset 83:4302a91e6033

couple of comment lines added
author Maria Jafari <maria.jafari@eecs.qmul.ac.uk>
date Fri, 01 Apr 2011 12:11:16 +0100
parents 138f7f0fdcdf
children 67aae1283973
files examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m examples/SMALL_solver_test.m
diffstat 2 files changed, 35 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m	Thu Mar 31 15:58:31 2011 +0100
+++ b/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m	Fri Apr 01 12:11:16 2011 +0100
@@ -4,19 +4,25 @@
 %   It calls generateImageDenoiseProblem that will let you to choose image,
 %   add noise and use noisy image to generate training set for dictionary
 %   learning.
-%   Three dictionary learning techniques were compared:
+%   Two dictionary learning techniques were compared:
 %   -   KSVD - M. Elad, R. Rubinstein, and M. Zibulevsky, "Efficient
 %              Implementation of the K-SVD Algorithm using Batch Orthogonal
 %              Matching Pursuit", Technical Report - CS, Technion, April 2008.
-%   -   KSVDS - R. Rubinstein, M. Zibulevsky, and M. Elad, "Learning Sparse
-%               Dictionaries for Sparse Signal Approximation", Technical
-%               Report - CS, Technion, June 2009.
-%   -   SPAMS - J. Mairal, F. Bach, J. Ponce and G. Sapiro. Online
-%               Dictionary Learning for Sparse Coding. International
-%               Conference on Machine Learning,Montreal, Canada, 2009
+%   -   RLS-DLA - Skretting, K.; Engan, K.; , "Recursive Least Squares
+%       Dictionary Learning Algorithm," Signal Processing, IEEE Transactions on,
+%       vol.58, no.4, pp.2121-2130, April 2010
 %
+
+
+%   Centre for Digital Music, Queen Mary, University of London.
+%   This file copyright 2011 Ivan Damnjanovic.
 %
-% Ivan Damnjanovic 2010
+%   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.
+%   
 %%
 
 
@@ -24,6 +30,8 @@
 %   If you want to load the image outside of generateImageDenoiseProblem
 %   function uncomment following lines. This can be useful if you want to
 %   denoise more then one image for example.
+%   Here we are loading test_image.mat that contains structure with 5 images : lena,
+%   barbara,boat, house and peppers.
 clear;
 TMPpath=pwd;
 FS=filesep;
@@ -31,18 +39,19 @@
 cd([pathstr1,FS,'data',FS,'images']);
 load('test_image.mat');
 cd(TMPpath);
-% [filename,pathname] = uigetfile({'*.png;'},'Select a file containin pre-calculated notes');
-% [pathstr, name, ext, versn] = fileparts(filename);
-% test_image = imread(filename);
-% test_image = double(test_image);
-% cd(TMPpath);
-% SMALL.Problem.name=name;
+
+%   Deffining the noise levels that we want to test
 
 noise_level=[10 20 25 50 100];
+
+%   Here we loop through different noise levels and images 
+
+for noise_ind=2:2
+for im_num=1:1
+
 % Defining Image Denoising Problem as Dictionary Learning
 % Problem. As an input we set the number of training patches.
-for noise_ind=1:1
-for im_num=2:2
+
 SMALL.Problem = generateImageDenoiseProblem(test_image(im_num).i, 40000, '',256, noise_level(noise_ind));
 SMALL.Problem.name=int2str(im_num);
 
@@ -189,7 +198,7 @@
 X_norm=sqrt(sum(X.^2, 1));
 [X_norm_sort, p]=sort(X_norm);
 p1=p(X_norm_sort>Edata);
-if size(p1,2)>140000
+if size(p1,2)>40000
     p2 = randperm(size(p1,2));
     p2=sort(p2(1:40000));
     size(p2,2)
--- a/examples/SMALL_solver_test.m	Thu Mar 31 15:58:31 2011 +0100
+++ b/examples/SMALL_solver_test.m	Fri Apr 01 12:11:16 2011 +0100
@@ -2,16 +2,6 @@
 %   Example test of solvers from different toolboxes on Sparco compressed
 %   sensing problems
 %
-%   
-%   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.
-%   
 %   The main purpose of this example is to show how to use SMALL structure
 %   to solve SPARCO compressed sensing problems (1-11) and compare results
 %   from different solvers.
@@ -52,6 +42,15 @@
 %
 
 
+%   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.
+%%   
 
 fprintf('\n\nExample test of SMALL solvers against their counterparts on Sparco problems.\n\n');