Mercurial > hg > smallbox
changeset 129:5a6cef81227e
Merge from branch "ivand_dev"
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 13 Jun 2011 14:58:00 +0100 |
parents | 6f78b069e541 (current diff) 8e660fd14774 (diff) |
children | d8783debe482 |
files | |
diffstat | 36 files changed, 282 insertions(+), 189 deletions(-) [+] |
line wrap: on
line diff
--- a/DL/RLS-DLA/SMALL_rlsdla.m Wed May 25 15:34:37 2011 +0100 +++ b/DL/RLS-DLA/SMALL_rlsdla.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,5 @@ -function Dictionary = SMALL_rlsdla(X, params) -%% Recursive Least Squares Dictionary Learning Algorithm +function [D] = SMALL_rlsdla(X, params) +%% Recursive Least Squares Dictionary Learning Algorithm % % D = SMALL_rlsdla(X, params) - runs RLS-DLA algorithm for % training signals specified as columns of matrix X with parameters @@ -200,6 +200,5 @@ end end -Dictionary = D; end
--- a/DL/my_dummy_DL.m Wed May 25 15:34:37 2011 +0100 +++ b/DL/my_dummy_DL.m Mon Jun 13 14:58:00 2011 +0100 @@ -0,0 +1,22 @@ +function [D]=my_dummy_DL(X, params) +%% Template function that can be used for DL algorithm implementation +% +% +% input arguments: +% X - matrix columns are training signals +% params - struycture with parameters for DL +% algorithm +% +% output arguments: +% D - Learned dictionary. + +%% Change copyright notice as appropriate: +% 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. +%%
--- a/Problems/ImgDenoise_reconstruct.m Wed May 25 15:34:37 2011 +0100 +++ b/Problems/ImgDenoise_reconstruct.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,10 @@ function reconstructed=ImgDenoise_reconstruct(y, Problem, SparseDict) -%%% Pierre Villars Example - reconstruction function +%% Image Denoising Problem reconstruction function +% +% This reconstruction function is using sparse representation y +% in dictionary Problem.A to reconstruct the patches of the denoised +% image. + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,12 +14,8 @@ % 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. -% -% This example is based on the experiment suggested by Professor Pierre -% Vandergheynst on the SMALL meeting in Villars. +%% -% using sparse representation y in dictionary Problem.A reconstruct the -% patches from the target image % stepsize % if (isfield(Problem,'stepsize'))
--- a/Problems/Pierre_reconstruct.m Wed May 25 15:34:37 2011 +0100 +++ b/Problems/Pierre_reconstruct.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,11 @@ function reconstructed=Pierre_reconstruct(y, Problem) -%%% Pierre Villars Example - reconstruction function +%% Pierre Villars Example - reconstruction function +% +% This example is based on the experiment suggested by Professor Pierre +% Vandergheynst on the SMALL meeting in Villars. +% The function is using sparse representation y in dictionary Problem.A +% to reconstruct the patches of the target image. + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,12 +15,10 @@ % 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. -% -% This example is based on the experiment suggested by Professor Pierre -% Vandergheynst on the SMALL meeting in Villars. +%% -% using sparse representation y in dictionary Problem.A reconstruct the -% patches from the target image + + imout=Problem.A*y;
--- a/Problems/generateAMT_Learning_Problem.m Wed May 25 15:34:37 2011 +0100 +++ b/Problems/generateAMT_Learning_Problem.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,16 +1,6 @@ function data = generateAMT_Learning_Problem(nfft, windowSize, overlap) -%%% Generate Automatic Music Transcription Problem +%% Generate Automatic Music Transcription Problem % -% 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. -% -% % generateAMT_Learning_Problem is a part of the SMALLbox and generates % a problem that can be used for comparison of Dictionary Learning/Sparse % Representation techniques in automatic music transcription scenario. @@ -31,7 +21,16 @@ % notesOriginal - notes of the original audio to be used for % comparison (if midi of the original exists) % name - name of the audio file to transcribe - + +% 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. +% %% FS=filesep; if ~ exist( 'nfft', 'var' ) || isempty(nfft), nfft = 4096; end
--- a/Problems/generateAudioDenoiseProblem.m Wed May 25 15:34:37 2011 +0100 +++ b/Problems/generateAudioDenoiseProblem.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,16 +1,5 @@ function data=generateAudioDenoiseProblem(au, trainnum, blocksize, dictsize, overlap, sigma, gain, maxval, initdict); -%%% Audio Denoising Problem -% -% Centre for Digital Music, Queen Mary, University of London. -% This file copyright 2010 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. -% -% +%% Audio Denoising Problem - needs revision, not yet finalised % % generateAudioDenoiseProblem is part of the SMALLbox and generate a % problem for comaprison of Dictionary Learning/Sparse Representation @@ -24,7 +13,15 @@ % overlap - ammount of overlaping frames between 0 and 1 % - +% Centre for Digital Music, Queen Mary, University of London. +% This file copyright 2010 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. +%% disp(' '); disp(' ********** Denoising Problem **********'); disp(' ');
--- a/Problems/generateImageDenoiseProblem.m Wed May 25 15:34:37 2011 +0100 +++ b/Problems/generateImageDenoiseProblem.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,5 @@ function data=generateImageDenoiseProblem(im, trainnum, blocksize, dictsize, sigma, gain, maxval, initdict); -%% Generate Image Denoising Problem +%% Generate Image Denoising Problem % % generateImageDenoiseProblem is a part of the SMALLbox and generates % a problem that can be used for comparison of Dictionary Learning/Sparse
--- a/examples/Automatic Music Transcription/SMALL_AMT_DL_test.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Automatic Music Transcription/SMALL_AMT_DL_test.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,9 @@ -%% DICTIONARY LEARNING FOR AUTOMATIC MUSIC TRANSCRIPTION EXAMPLE 1 +%% Dictionary Learning for Automatic Music Transcription - KSVD vs SPAMS % +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). +% % This file contains an example of how SMALLbox can be used to test diferent % dictionary learning techniques in Automatic Music Transcription problem. % It calls generateAMT_Learning_Problem that will let you to choose midi,
--- a/examples/Automatic Music Transcription/SMALL_AMT_KSVD_Err_test.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Automatic Music Transcription/SMALL_AMT_KSVD_Err_test.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,14 +1,10 @@ -%% DICTIONARY LEARNING FOR AUTOMATIC MUSIC TRANSCRIPTION +%% Dictionary Learning for Automatic Music Transcription - KSVD residual +%% error test +% +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). % -% Centre for Digital Music, Queen Mary, University of London. -% This file copyright 2010 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. -% % This file contains an example of how SMALLbox can be used to test diferent % dictionary learning techniques in Automatic Music Transcription problem. % It calls generateAMT_Learning_Problem that will let you to choose midi, @@ -20,6 +16,15 @@ % dictionary learning technique defined in DL structure. % +% +% Centre for Digital Music, Queen Mary, University of London. +% This file copyright 2010 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. %% clear;
--- a/examples/Automatic Music Transcription/SMALL_AMT_KSVD_Sparsity_test.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Automatic Music Transcription/SMALL_AMT_KSVD_Sparsity_test.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,14 +1,10 @@ -%% DICTIONARY LEARNING FOR AUTOMATIC MUSIC TRANSCRIPTION EXAMPLE 1 +%% Dictionary Learning for Automatic Music Transcription - KSVD sparsity +%% test +% +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). % -% Centre for Digital Music, Queen Mary, University of London. -% This file copyright 2010 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. -% % This file contains an example of how SMALLbox can be used to test diferent % dictionary learning techniques in Automatic Music Transcription problem. % It calls generateAMT_Learning_Problem that will let you to choose midi, @@ -19,6 +15,16 @@ % Problem.p notes spectrograms from training set Problem.b using % dictionary learning technique defined in DL structure. % + +% +% Centre for Digital Music, Queen Mary, University of London. +% This file copyright 2010 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. %% clear;
--- a/examples/Automatic Music Transcription/SMALL_AMT_SPAMS_test.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Automatic Music Transcription/SMALL_AMT_SPAMS_test.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,10 @@ -%% DICTIONARY LEARNING FOR AUTOMATIC MUSIC TRANSCRIPTION EXAMPLE 1 +%% Dictionary Learning for Automatic Music Transcription - SPAMS lambda +%% test % +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). +% % This file contains an example of how SMALLbox can be used to test diferent % dictionary learning techniques in Automatic Music Transcription problem. % It calls generateAMT_Learning_Problem that will let you to choose midi,
--- a/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,4 +1,5 @@ - %% DICTIONARY LEARNING FOR IMAGE DENOISING +%% Dictionary Learning for Image Denoising - KSVD vs Recursive Least Squares +% % This file contains an example of how SMALLbox can be used to test different % dictionary learning techniques in Image Denoising problem. % It calls generateImageDenoiseProblem that will let you to choose image,
--- a/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsSPAMS.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsSPAMS.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,6 +1,9 @@ -%% DICTIONARY LEARNING FOR IMAGE DENOISING - -% +%% Dictionary Learning for Image Denoising - KSVD vs KSVDS vs SPAMS +% +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). +% % This file contains an example of how SMALLbox can be used to test different % dictionary learning techniques in Image Denoising problem. % It calls generateImageDenoiseProblem that will let you to choose image,
--- a/examples/Image Denoising/SMALL_ImgDenoise_DL_test_SPAMS_lambda.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Image Denoising/SMALL_ImgDenoise_DL_test_SPAMS_lambda.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,6 +1,9 @@ -%% DICTIONARY LEARNING FOR IMAGE DENOISING +%% Dictionary Learning for Image Denoising - SPAMS parameter test % -% +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). +% % This file contains an example of how SMALLbox can be used to test different % dictionary learning techniques in Image Denoising problem. % This example can be used to test SPAMS for different values of
--- a/examples/Image Denoising/SMALL_ImgDenoise_DL_test_Training_size.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Image Denoising/SMALL_ImgDenoise_DL_test_Training_size.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,6 +1,10 @@ -%% DICTIONARY LEARNING FOR IMAGE DENOISING +%% Dictionary Learning for Image Denoising - KSVD vs SPAMS Training size +%% test % - +% *WARNING!* You should have SPAMS in your search path in order for this +% script to work.Due to licensing issues SPAMS can not be automatically +% provided in SMALLbox (http://www.di.ens.fr/willow/SPAMS/downloads.html). +% % This file contains an example of how SMALLbox can be used to test different % dictionary learning techniques in Image Denoising problem. % It calls generateImageDenoiseProblem that will let you to choose image,
--- a/examples/Pierre Villars/Pierre_Villars_Example.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/Pierre Villars/Pierre_Villars_Example.m Mon Jun 13 14:58:00 2011 +0100 @@ -23,7 +23,7 @@ % Defining the Problem structure -SMALL.Problem = Pierre_Problem(); +SMALL.Problem = generatePierre_Problem(); % Show original image and image that is used as a dictionary figure('Name', 'Original and Dictionary Image');
--- a/examples/SMALL_solver_test.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/SMALL_solver_test.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,5 @@ function SMALL_solver_test -%% Example test of solvers from different toolboxes on Sparco problem 6 +%% Example test of solvers from different toolboxes on Sparco problem 6 % % 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
--- a/examples/SMALL_solver_test_Audio.m Wed May 25 15:34:37 2011 +0100 +++ b/examples/SMALL_solver_test_Audio.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,15 +1,5 @@ function SMALL_solver_test_Audio -%%% Example test of solvers on Sparco audio source separation 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. -% +%% Example test of solvers on Sparco audio source separation problems % % The main purpose of this example is to show how to use SMALL structure % to solve SPARCO audio source3 separation problems (401-402) and to @@ -44,8 +34,16 @@ % sources against original audio sources. % SMALL_playAudio function plays audio sources of original and % reconstructed signal as well as mixed signal. -% -% + +% +% 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 solvers on Sparco Audio problems (401,402).\n\n');
--- a/solvers/SMALL_MP.m Wed May 25 15:34:37 2011 +0100 +++ b/solvers/SMALL_MP.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,17 @@ function [A]=SMALL_MP(Dict,X, m, maxNumCoef, errorGoal, varargin) -%% +%% Implementation of Matching Pursuit algorithm +% Sparse coding of a group of signals based on a given +% dictionary and specified number of atoms to use. +% input arguments: Dict - the dictionary +% X - the signals to represent +% m - number of atoms in Dictionary +% errorGoal - the maximal allowed representation error for +% each signal. +% +% optional: if Dict is function handle then Transpose Dictionary +% handle needs to be specified. +% + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -10,18 +22,6 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Sparse coding of a group of signals based on a given -% dictionary and specified number of atoms to use. -% input arguments: Dict - the dictionary -% X - the signals to represent -% m - number of atoms in Dictionary -% errorGoal - the maximal allowed representation error for -% each signal. -% -% optional: if Dict is function handle then Transpose Dictionary -% handle needs to be specified. -% - %% % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers explicitD=0;
--- a/solvers/SMALL_cgp.m Wed May 25 15:34:37 2011 +0100 +++ b/solvers/SMALL_cgp.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,19 @@ function [A, resF]=SMALL_cgp(Dict,X, m, maxNumCoef, errorGoal, varargin) -%%% Conjugate Gradient Pursuit Multiple vectors sparse representation +%% Partial Conjugate Gradient Pursuit Multiple vectors sparse representation +% +% Sparse coding of a group of signals based on a given +% dictionary and specified number of atoms to use. +% input arguments: Dict - the dictionary +% X - the signals to represent +% m - number of atoms in Dictionary +% errorGoal - the maximal allowed representation error for +% each signal. +% +% optional: if Dict is function handle then Transpose Dictionary +% handle needs to be specified. +% +% output arguments: A - sparse coefficient matrix. + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,19 +23,6 @@ % 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. -% -% Sparse coding of a group of signals based on a given -% dictionary and specified number of atoms to use. -% input arguments: Dict - the dictionary -% X - the signals to represent -% m - number of atoms in Dictionary -% errorGoal - the maximal allowed representation error for -% each signal. -% -% optional: if Dict is function handle then Transpose Dictionary -% handle needs to be specified. -% -% output arguments: A - sparse coefficient matrix. % %%
--- a/solvers/SMALL_chol.m Wed May 25 15:34:37 2011 +0100 +++ b/solvers/SMALL_chol.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,19 @@ function [A]=SMALL_chol(Dict,X, m, maxNumCoef, errorGoal, varargin) -%% +%% Implementation of OMP with Cholesky factorisation +% Sparse coding of a group of signals based on a given +% dictionary and specified number of atoms to use. +% input arguments: Dict - the dictionary +% X - the signals to represent +% m - number of atoms in Dictionary +% errorGoal - the maximal allowed representation error for +% each signal. +% +% optional: if Dict is function handle then Transpose Dictionary +% handle needs to be specified. +% +% output arguments: A - sparse coefficient matrix. +% + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -10,19 +24,6 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Sparse coding of a group of signals based on a given -% dictionary and specified number of atoms to use. -% input arguments: Dict - the dictionary -% X - the signals to represent -% m - number of atoms in Dictionary -% errorGoal - the maximal allowed representation error for -% each signal. -% -% optional: if Dict is function handle then Transpose Dictionary -% handle needs to be specified. -% -% output arguments: A - sparse coefficient matrix. -% %% % This Dictionary check is based on Thomas Blumensath work in sparsify 0_4 greedy solvers explicitD=0;
--- a/solvers/my_dummy_solver.m Wed May 25 15:34:37 2011 +0100 +++ b/solvers/my_dummy_solver.m Mon Jun 13 14:58:00 2011 +0100 @@ -0,0 +1,27 @@ +function [A]=my_dummy_solver(Dict,X, m, maxNumCoef, errorGoal, varargin) +%% Template function that can be used for solver implementation +% +% Sparse coding of a group of signals based on a given +% dictionary and specified number of atoms to use. +% +% input arguments: Dict - the dictionary +% X - the signals to represent +% m - number of atoms in Dictionary +% errorGoal - the maximal allowed representation +% error for each signal. +% +% optional: if Dict is function handle then Transpose Dictionary +% handle needs to be specified. +% +% output arguments: A - sparse coefficient matrix. + +%% Change copyright notice as appropriate: +% 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. +%%
--- a/util/SL_A.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SL_A.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,8 @@ function y = SL_A(A, mode, m, n, x, I, dim) -%%% Sparco to SparseLab implicit matix conversion +%% Sparco to SparseLab implicit matix conversion +% This is auxilary function to allow implicit matrices from SPARCO +% to be used with SparsLab solvers + % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. % @@ -8,9 +11,7 @@ % 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. -% -% This is auxilary function to allow implicit matrices from SPARCO -% to be used with SparsLab solvers +%% if (mode == 1)
--- a/util/SMALL_AMT_plot.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_AMT_plot.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,7 @@ function figAMT=SMALL_AMT_plot(SMALL, AMT_res) +%% Function gets as input SMALL structure and plots AMT results % + % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. % @@ -9,7 +11,7 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Function gets as input SMALL structure and plots AMT + figAMT=figure('Name','Automatic Music Transcription');
--- a/util/SMALL_AudioDeNoiseResult.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_AudioDeNoiseResult.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,6 @@ function SMALL_AudioDeNoiseResult(SMALL) -% +%% Plots the results of Audio denoising experiment - underconstruction + % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. %
--- a/util/SMALL_denoise.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_denoise.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,14 @@ function solver=SMALL_denoise(Problem, solver) -%%% SMALL denoising +%% SMALL denoising - old replaced denoising function, would go out in v2.0 +% +% Function gets as input SMALL structure that contains SPARCO problem to +% be solved, name of the toolbox and solver, and parameters file for +% particular solver. +% It is based on omp/omps denoising by Ron Rubenstein (KSVD toolbox) +% +% Outputs are denoised image, psnr, number of non-zero coeficients and +% time spent + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -10,13 +19,7 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Function gets as input SMALL structure that contains SPARCO problem to -% be solved, name of the toolbox and solver, and parameters file for -% particular solver. -% It is based on omp/omps denoising by Ron Rubenstein (KSVD toolbox) -% -% Outputs are denoised image, psnr, number of non-zero coeficients and -% time spent + %% %%%%% denoise the signal %%%%%
--- a/util/SMALL_init_DL.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_init_DL.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,4 +1,10 @@ function DL = SMALL_init_DL(varargin) +%% Function initialise SMALL structure for Dictionary Learning. +% Optional input variables: +% toolbox - name of Dictionary Learning toolbox you want to use +% name - name of the algorithm from above toolbox +% param - parameters you want to set + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2010 Ivan Damnjanovic. @@ -9,11 +15,6 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Function initialise SMALL structure for Dictionary Learning. -% Optional input variables: -% toolbox - name of Dictionary Learning toolbox you want to use -% name - name of the algorithm from above toolbox -% param - parameters you want to set %% DL.toolbox=[];
--- a/util/SMALL_init_solver.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_init_solver.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,4 +1,10 @@ function solver = SMALL_init_solver(varargin) +%% Function initialise SMALL structure for sparse representation. +% Optional input variables: +% toolbox - name of Dictionary Learning toolbox you want to use +% name - name of the algorithm from above toolbox +% param - parameters you want to set + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2010 Ivan Damnjanovic. @@ -9,11 +15,6 @@ % License, or (at your option) any later version. See the file % COPYING included with this distribution for more information. % -% Function initialise SMALL structure for Dictionary Learning. -% Optional input variables: -% toolbox - name of Dictionary Learning toolbox you want to use -% name - name of the algorithm from above toolbox -% param - parameters you want to set %% solver.toolbox=[];
--- a/util/SMALL_midiGenerate.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_midiGenerate.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,13 @@ function reconstructed=SMALL_midiGenerate(V, Problem) -%%% Reconstraction of midi file from representation in the given dictionary +%% Reconstraction of midi file from representation in the given dictionary +% +% SMALL_midiGenerate is a part of SMALLbox and can be use to reconstruct +% a midi file given representation of the training set (V) in the +% dictionary Problem.A. +% Output is reconstructed structure with two fields: +% - reconstructed.notes - matrix with transcribed notes +% - reconstructed.midi - midi representation of transcription + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,14 +17,6 @@ % 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. -% -% SMALL_midiGenerate is a part of SMALLbox and can be use to reconstruct -% a midi file given representation of the training set (V) in the -% dictionary Problem.A. -% Output is reconstructed structure with two fields: -% - reconstructed.notes - matrix with transcribed notes -% - reconstructed.midi - midi representation of transcription - %% U=Problem.A; % Dictionary used for representation fs=Problem.fs; % Sampling rate
--- a/util/SMALL_playAudio.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_playAudio.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,8 @@ function SMALL_playAudio(SMALL) -%%% +%% Plays reconstructed and original signals +% Function gets as input SMALL structure and play the original and +% the reconstructed signal + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,9 +12,8 @@ % 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. -% -% Function gets as input SMALL structure and play the original and -% the reconstructed signal +%% + SMALL.solver.reconstructed = SMALL.Problem.reconstruct(SMALL.solver.solution);
--- a/util/SMALL_plot.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_plot.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,8 @@ function SMALL_plot(SMALL) -%%% Plots coefficients and reconstructed signals +%% Plots coefficients and reconstructed signals +% Function gets as input SMALL structure and plots the solution and +% reconstructed signal + % % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2009 Ivan Damnjanovic. @@ -9,9 +12,7 @@ % 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. -% -% Function gets as input SMALL structure and plots the solution and -% reconstructed signal +%% figure;
--- a/util/SMALL_showdict.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_showdict.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,7 +1,7 @@ function x = SMALL_showdict(D,sz,n,m,varargin) %% SMALL_SHOWDICT Display a dictionary of image patches. -%% Reimplementation of showdict function from KSVD toolbox with Image -%% Processing toolbox dependecies removed +% Reimplementation of showdict function from KSVD toolbox with Image +% Processing toolbox dependecies removed % % SMALL_SHOWDICT(D,SZ,N,M) displays the contents of the dictionary D, whos % columns are 2-D image patches (in column-major order). SZ = [SX SY] is @@ -25,7 +25,6 @@ % X = SMALL_SHOWDICT(...) returns a bitmat of the dictionary image without % displaying the figure. - % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2011 Ivan Damnjanovic. %
--- a/util/SMALL_solve.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_solve.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,5 @@ function solver = SMALL_solve(Problem, solver) -%%% SMALL sparse solver +%% SMALL sparse solver % % Function gets as input SMALL structure that contains SPARCO problem to % be solved, name of the toolbox and solver, and parameters file for
--- a/util/SMALL_ssim_index.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_ssim_index.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,5 +1,5 @@ function [mssim, ssim_map] = SMALL_ssim_index(img1, img2, K, window, L) - +%% SSIM Index - Removed dependence on Image Processing Toolbox %======================================================================== %SSIM Index, Version 1.0 %Copyright(c) 2003 Zhou Wang @@ -70,7 +70,7 @@ % imshow(max(0, ssim_map).^4) %Shows the SSIM index map % -% Removed dependency on Image Processing Toolbox - +% Removed dependence on Image Processing Toolbox - % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2011 Ivan Damnjanovic. %========================================================================
--- a/util/SMALL_swipe.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_swipe.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,20 +1,12 @@ function [p,s] = SMALL_swipe(X,fs, f, plim,dlog2p,dERBs,woverlap,sTHR) -% -% -% 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. -% -% +%% Modified SWIPEP Pitch estimation using SWIPE'. % This is modified swipep MATLAB code that is working directly in spectral % domain and uses only one window size. The results are suboptimal % comparing to original code. It is also converted to SWIPE which uses all -% the harmonics of the signal. +% the harmonics of the signal. + +% +% % % SWIPEP Pitch estimation using SWIPE'. % P = SWIPEP(X,Fs,[PMIN PMAX],DT,DLOG2P,DERBS,STHR) estimates the pitch @@ -70,6 +62,17 @@ % inspired pitch estimator for speech and music," J. Acoust. Soc. Am. % 124, 1638-1652. +% +% 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. +%% + if ~ exist( 'plim', 'var' ) || isempty(plim), plim = [30 5000]; end %if ~ exist( 'dt', 'var' ) || isempty(dt), dt = 0.001; end if ~ exist( 'dlog2p', 'var' ) || isempty(dlog2p), dlog2p = 1/48; end
--- a/util/SMALL_vmrse_type2.m Wed May 25 15:34:37 2011 +0100 +++ b/util/SMALL_vmrse_type2.m Mon Jun 13 14:58:00 2011 +0100 @@ -1,6 +1,5 @@ function [RMSErn, RMSEcd, rn_im, cd_im] = SMALL_vmrse_type2(orig, corr, recon) -%% Implementation of VectorRMSE type2 -% +%% Implementation of VectorRMSE type2 % % Input: % - Original image