Bart, do you think using deconvolution over undemosaiced data (i.e. deconvolute the RAW R, G1/G2 and B channels separately) prior to demosaicing could mean some advantage?. Since diffraction is wavelength dependent, a different PSF for each RAW channel could provide more accurate deconvolution of the information. Also the deconvolution process (PSF estimation + deconvolution) wouldn't be fooled by any undesired characteristic of the demosaicing algorithm.
Hi Guillermo,
Theoretically, and assuming it doesn't screw up subsequent demosaicing, I think it would be a benefit. The 3 color band PSFs could be optimzed for the CFA filter characteristics. However, the practical question will be how much will the benefit be compared to the current practice of deconvolving the RGB channels with the same PSF.
It's interesting to notice that the R/G/B resolution of a gray tone test target is virtually identical to the weighted luminance resolution. They have practically identical MTFs after demosaicing (as determined with Imatest). So the potential gain is in improving the chroma resolution, which isn't the most critical for human vision. How much that would improve the luminance resolution after demosaicing, remains to be seen.
Care should be taken that each RAW channel is individually sampled at half the spatial frequency as the final image.
Possibly the easiest (from a programming point of view) approach would be to create 4 intermediate Raw images, just using the relevant R/G1/B/G2 channel sensel data, that would each be 1/4th of the full sensor size (which will also speed up the processing of each). These can then be deconvolved with the appropriate PSF for the spectral band. After that the full Raw data can be repopulated with resolution improved data, and normal demosaicing can take place. That could be an interesting thing for Emil Martinec to try, since he also has worked on the basis of the AMaZE demosaicing algorithm for RawTherapee.
Cheers,
Bart