This function detects portions of input clip which are in good focus and copies them on to the heavily blurred clip. This creates image with accentuated 'Bokeh' effect. Borders are not processed. May crop them if desired. Function bokeh which works in spatial domain operates on a different princeple to determine focus/defocus areas.
Threshold and grid size has some dependancy. It is necessary to experiment with FrameEval for a good outcome. On a an image I used to test, the following combinations seemed to work. So they may be starting values for experimenting.
grid threshold 8 0.15 16 0.45 24 0.6 32 0.75 48 0.8 64 0.85This function operates in frequency domain and requires libfftwf.dll to be in path.