This function denoises an image by sparsely representing each block with the overcomplete DCT Dictionary, and averaging the represented parts.
Detailed description can be found in “Image Denoising Via Sparse and Redundant representations over Learned Dictionaries”, (appeared in the IEEE Trans. on Image Processing, Vol. 15, no. 12, December 2006).
INPUT ARGUMENTS : Image - the noisy image (gray-level scale) sigma - the s.d. of the noise (assume to be white Gaussian). K - the number of atoms in the representing dictionary. Optional argumeters: 'blockSize' - the size of the blocks the algorithm works. All blocks are squares, therefore the given parameter should be one number (width or height). Default value: 8. 'errorFactor' - a factor that multiplies sigma in order to set the allowed representation error. In the experiments presented in the paper, it was set to 1.15 (which is also the default value here). 'maxBlocksToConsider' - maximal number of blocks that can be processed. This number is dependent on the memory capabilities of the machine, and performances’ considerations. If the number of available blocks in the image is larger than 'maxBlocksToConsider', the sliding distance between the blocks increases. The default value is: 250000. 'slidingFactor' - the sliding distance between processed blocks. Default value is 1. However, if the image is large, this number increases automatically (because of memory requirements). Larger values result faster performances (because of fewer processed blocks). 'waitBarOn' - can be set to either 1 or 0. If waitBarOn==1 a waitbar, presenting the progress of the algorithm will be displayed. OUTPUT ARGUMENTS : IOut - a 2-dimensional array in the same size of the input image, that contains the cleaned image. output - a struct that contains that following field: D - the dictionary used for denoising