Wiener Deconvolve v1.0
This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0 or later
Deconvolution has been sitting on the Nukepedia wishlist for a while now, and while it's a difficult problem, there are some simple solutions if you're not too concerned about perfect quality. This tool uses one of the simplest methods, a single pass Wiener filter. It's a step up from a straight FFT division, which usually just outputs pure garbage, but it still has some issues with ringing artifacts and noise amplification.
I don't know whether this tool will ever be useful for final output without excessive cleanup, but it could help with tracking or texture processing, and it's just plain fun to play with.
Included are the deconvolution node and a node to generate defocus kernels. In theory this method should work with any PSF (Point Spread Function), including glare and uniform motion blur, but in practice I have not seen good results on motion blur.
Performance is reasonable, typically about 10-15 seconds for an HD frame. The main speed limitation is Nuke's FFT nodes, which run on a single CPU thread.
Here are some examples with photos taken at varying levels of focus. It's possible to recover sharp details even from a very blurry image, but there is a noticable loss of quality:
(Right click to see the full size)
Noise is a problem, because the filter amplifies any noise in the image:
The 'Smooth' parameter determines how much noise is allowed through to the final image. Lower values produce more noise, but also sharper detail.
Prescale is the amount by which the edges of the image are expanded. Low values can produce ringing artifacts from the edges. The default value of 2 is generally a good compromomise of speed vs. quality, but if you still have artifacts, try increasing it by powers of 2.