This plugin function restores focus ( or sharpens) slightly
defocussed ( one pixel radius)images. Option to spike centrl point of a PSF (point Spread Function)
Conversely images can be slightly defocussed by this plugin if desired.
Shape of PSF can be circular, square or X .
This plugin operates in Frequency domain and requires
or fftw.dll from Fizick's site to be in the path. (system32 folder).
Inversion in freq domain may amplify undesirable low amplitude frequencies
and lead to ringing. White noise wn is added to reduce this. The higher the wn ,
the image will be focussed less but ringing will reduce. Compromise is to be
Spiking of central point of PSF will approach a Gaussian function and proper value
also may lessen ringing in a similar fashion.
RGB32, RGB24 YV12 and YUY2 colorspaces only are supported.
Details of parameters
|clip to be processed
|White noise to be added
||between 0.00002 and 0.4
|value of spike to be added to center of PSF
|| 0.0 to 0.5
|focus or defocus image
|| true for focus, false for defocussing
|shape of PSF
|| "circular", "square", "x"
|| 0.00001 to 100
fn=FQFocusDefocus( focus = false, shape = "x")
fn1 = FQFocusDefocus( focus = true, wn = 0.15, spike = 0.3, shape = "square")
fn2= FQFocusDefocus( focus = true, wn = 0.15, spike = 0.05)
mildly defocussed images in top row. Corresponding focussed images bottom row.
Left "circular", middle "square" and right "x" shape of PSF.