Hi, please don't do a deconvolution in the Lab color model. Natural blur is a phenomenon happening to photons and described by a convolution product. If you want to revert it, you need to use a physically meaningful color space, e.g. a linear one as close as possible to the spectral space.
That would be camera RGB, linearly encoded (be sure the gamma is reverted if the input file is a JPEG/TIFF/PNG file), before it is messed up with non-linear transfer functions in the pipe (from Parseval's theorem of energy conservation in convolutions). The sharpening module happens too late in the pipe (after tone curves) and works in Lab, which is nonsensical (Lab == perceptual model built upon human vision : that means nothing in optics). I would squeeze it right after the denoising modules, but I'm not sure yet if it's better to have it before or after the lens correction. I have worked for 2 years on regularized blind deconvolutions, you can use my code and remove the kernel update if you want : * https://github.com/aurelienpierre/Image-Cases-Studies/blob/master/deconvolve.py * https://github.com/aurelienpierre/Image-Cases-Studies/blob/master/lib/deconvolution.pyx Also, Edgardo began to translate my Python code into a dt module 1.5 years ago (although the algo has changed). The major limitation was the performance : https://github.com/edgardoh/darktable/blob/rlucy/src/iop/rlucy_deblur.c Anyway, I have delayed this work because I wasn't ready to code it in C, but I would be glad to help. Good luck, Aurélien. Le 17/04/2019 à 20:16, Heiko Bauke a écrit : > Hi, > > I just started to implement a simple (non-blind) deconvolution filter > as an addition sharpening method. I plan to add this as an additional > mode for the sharpening module. > > Looking at the code of the current unsharp mask method I realized that > the module uses its own implementation of a gaussian blur filter. Is > there any reason not to employ the one in src/common/gaussian.[ch]? > Are there any concerns against simplifying the sharpening module's > implementation and just calling the functions from > src/common/gaussian.[ch]? > > The deconvolution method also needs to apply gaussian blur kernels and > I would prefer to use the ones in src/common/gaussian.[ch] only. > > > Heiko > > ___________________________________________________________________________ darktable developer mailing list to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org