What does diffuse or sharpen really do?

I believe a description of the algorithm behind this module is on his website and a bit on this forum if you search for it. Like his filmic module, it has several things going for on, not just the base algorithm, such as localization and frequency separation.

From what I can recall, the aim of the paper(s) he refers to is to recover lens/optic blur in such a way that a kernel is not necessary. Typical deblurring requires a kernel and iterative filtering. Now, I do not remember whether it is a small window or global filter, but I do recall it is supposed to emulate the reversal of real life blur, so that is why the module is diffuse or sharpen rather than just sharpen. We can go either direction.

I also can recall him modifying and simplifying the paper’s algorithm by using the guided image filtering filter (which I think I popularized here on this forum by constantly harping on its merits). dt has a nice version of the guided filter, codeveloped by several people on the forum. Anyway, using the guided filter, which is a windowed filter, so that probably answers the local vs global question, the module is more efficient in its processing, but it may be at the cost of performance (as in the quality of the algorithm: the resultant image).

As @rvietor noted, we are working with gradients and gradients of gradients, etc., so the smoothing should be graduated and continuous without introducing unnatural kinks in the data.

1 Like