40. An imaging system, comprise: an imaging device having an optical mask and being configured for capturing an image of a scene, wherein said optical mask is selected to optically decompose said image into a plurality of channels, each being characterized by a different depth-dependence of a spatial frequency response of said imaging device; a non-transitory computer readable medium storing an in-focus dictionary defined over a plurality of dictionary atoms, and an out-of-focus dictionary defined over a plurality of sets of dictionary atoms, each set corresponding to a different out-of-focus condition, wherein said out-of-focus dictionary comprises a plurality of sub-dictionaries, each being characterized by a defocus parameter, and wherein different sub-dictionaries correspond to different values of said defocus parameter; and a digital image processor configured for accessing said computer readable medium, for computing and storing in a memory at least one sparse representation of said decomposed image over said dictionaries, for generating a processed image using said sparse representation, and for displaying said processed image on a display device.
40. An imaging system, comprise: an imaging device having an optical mask and being configured for capturing an image of a scene, wherein said optical mask is selected to optically decompose said image into a plurality of channels, each being characterized by a different depth-dependence of a spatial frequency response of said imaging device; a non-transitory computer readable medium storing an in-focus dictionary defined over a plurality of dictionary atoms, and an out-of-focus dictionary defined over a plurality of sets of dictionary atoms, each set corresponding to a different out-of-focus condition, wherein said out-of-focus dictionary comprises a plurality of sub-dictionaries, each being characterized by a defocus parameter, and wherein different sub-dictionaries correspond to different values of said defocus parameter; and a digital image processor configured for accessing said computer readable medium, for computing and storing in a memory at least one sparse representation of said decomposed image over said dictionaries, for generating a processed image using said sparse representation, and for displaying said processed image on a display device. 47. The imaging system according to claim 40 , wherein each of said plurality of sub-dictionaries is obtainable from said in-focus dictionary by an inner product of said in-focus dictionary by a kernel function characterized by a respective defocus parameter.