vcm


F2QBokeh


The script call is:

vcm.F2QBokeh(clip, clipb clip [, int grid = 16][ ,float thresh = 0.45][, int rgb = [1,1,1][, int yuv = [1,1,1])



clip: Input RGB, YUV444, and Gray except Compat and half float formats. RGB seems to give better results.
clipb: heavily blurred version of input clip.
grid: side of rectangular moving grid used to find focus. Can be 3 to 64.
thresh: threshold to accept as in focus. Value above is treated as out of focus. Can have values from 0.0 to 1.0.
rgb: for rgb format input, planes to be considered for process. 1 for consider and 0 for skip.
yuv: for YUV format input, planes to be considered for process. 1 for consider and 0 for skip.

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.85
This function operates in frequency domain and requires libfftwf.dll to be in path.
freqScript page has a usage script.