Mercurial > hg > smallbox
changeset 125:002ec1b2ceff sup_158_IMG_Processing_toolbox_
cleaning up. All IMP toolbox dependencies removed
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Wed, 25 May 2011 15:29:20 +0100 |
parents | 436e6c044099 |
children | db5a7fe1a404 |
files | Problems/Pierre_Problem.m Problems/generateImageDenoiseProblem.m examples/SMALL_solver_test.m util/Pierre_reconstruct.m util/SMALL_ImgDeNoiseResult.m |
diffstat | 5 files changed, 38 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/Problems/Pierre_Problem.m Wed May 25 15:20:04 2011 +0100 +++ b/Problems/Pierre_Problem.m Wed May 25 15:29:20 2011 +0100 @@ -1,14 +1,5 @@ function data=Pierre_Problem(src, trg, blocksize, dictsize); -%%% Generate Pierre 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. +%% Generate Pierre Problem % % Pierre_Problem is a part of the SMALLbox and generates the problem % suggested by Professor Pierre Vandergheynst on the SMALL meeting in @@ -38,6 +29,15 @@ % - sparse - if 1 SMALL_solve will keep solution matrix in sparse form, % due to memory constrains. +% +% 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. %% prompt user for images %% % ask for source file name
--- a/Problems/generateImageDenoiseProblem.m Wed May 25 15:20:04 2011 +0100 +++ b/Problems/generateImageDenoiseProblem.m Wed May 25 15:29:20 2011 +0100 @@ -1,14 +1,5 @@ function data=generateImageDenoiseProblem(im, trainnum, blocksize, dictsize, sigma, gain, maxval, initdict); -%%% Generate Image 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. +%% 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 @@ -39,6 +30,16 @@ % - maxval - maximum value (default - 255) % - initdict - initial dictionary (default - 4x overcomlete dct) % - signalDim - signal dimension (default - 2) + +% +% 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. % % Based on KSVD denoise demo by Ron Rubinstein % See also KSVDDENOISEDEMO and KSVDDEMO.
--- a/examples/SMALL_solver_test.m Wed May 25 15:20:04 2011 +0100 +++ b/examples/SMALL_solver_test.m Wed May 25 15:29:20 2011 +0100 @@ -1,6 +1,5 @@ function SMALL_solver_test -% Example test of solvers from different toolboxes on Sparco compressed -% sensing problems +%% 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/util/Pierre_reconstruct.m Wed May 25 15:20:04 2011 +0100 +++ b/util/Pierre_reconstruct.m Wed May 25 15:29:20 2011 +0100 @@ -1,5 +1,11 @@ function reconstructed=Pierre_reconstruct(y, Problem) -%%% Pierre Villars Example - reconstruction function +%% 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. @@ -10,12 +16,7 @@ % 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; % combine the patches into reconstructed image
--- a/util/SMALL_ImgDeNoiseResult.m Wed May 25 15:20:04 2011 +0100 +++ b/util/SMALL_ImgDeNoiseResult.m Wed May 25 15:29:20 2011 +0100 @@ -1,5 +1,11 @@ -function SMALL_ImgDeNoiseResult(SMALL) +function SMALL_ImgDeNoiseResult(SMALL) +%% Represents the results of Dictionary Learning for Image denoising % +% Function gets as input SMALL structure and plots Image Denoise +% results: Original Image, Noisy Image and for learned dictionaries and +% denoised images +% + % Centre for Digital Music, Queen Mary, University of London. % This file copyright 2010 Ivan Damnjanovic. % @@ -8,10 +14,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 Image Denoise -% results: Original Image, Noisy Image and for learned dictionaries and -% denoised images +%% figure('Name', sprintf('Image %s (training set size- %d, sigma - %d)',SMALL.Problem.name, SMALL.Problem.n, SMALL.Problem.sigma));