v2d->makeFormVariable("Use OpenCL",use_opencl,"Enable or disable OpenCL acceleration");
v2d->makeWindow(5,30,"Effects");
v2d->makeGroup("Foreground");
v2d->makeFormVariable("Scale",fg_scale,0.1f,4.0f,true,"","Generate the foreground at this scale");
v2d->makeFormVariable("Loss",fg_loss,0.1f,99.9f,true,"%","On every frame the foreground loses on brightness");
v2d->makeGroup("Scene Change Detection");
v2d->makeFormVariable("Threshold",scene_change_thresh,0.1f,1.0f,true,"","Peak threshold. Lowering it makes detection more sensitive");
v2d->makeFormVariable("Threshold Diff",scene_change_thresh_diff,0.1f,1.0f,true,"","Difference of peak thresholds. Lowering it makes detection more sensitive");
v2d->makeGroup("Background");
v2d->makeFormVariable("Grey",grey_background,"Enable or disable global bloom effect");
v2d->makeGroup("Points");
v2d->makeFormVariable("Max. Points",max_points,10,1000000,true,"","The theoretical maximum number of points to track which is scaled by the density of detected points and therefor is usually much smaller");
v2d->makeFormVariable("Point Loss",point_loss,0.0f,100.0f,true,"%","How many of the tracked points to lose intentionally");
v2d->makeGroup("Effect");
v2d->makeGroup("Optical flow");
v2d->makeFormVariable("Max. Stroke Size",max_stroke,1,100,true,"px","The theoretical maximum size of the drawing stroke which is scaled by the area of the convex hull of tracked points and therefor is usually much smaller");
auto*glowKernel=v2d->makeFormVariable("Glow Kernel Size",glow_kernel_size,1,63,true,"","Intensity of glow defined by kernel size");
v2d->makeFormVariable("Gain",bloom_gain,0.1f,20.0f,true,"","Intensity of the effect defined by gain");
v2d->makeWindow(240,30,"Settings");
v2d->makeGroup("Acceleration");
v2d->makeFormVariable("Use OpenCL",use_opencl,"Enable or disable OpenCL acceleration");
v2d->makeGroup("Scene Change Detection");
v2d->makeFormVariable("Threshold",scene_change_thresh,0.1f,1.0f,true,"","Peak threshold. Lowering it makes detection more sensitive");
v2d->makeFormVariable("Threshold Diff",scene_change_thresh_diff,0.1f,1.0f,true,"","Difference of peak thresholds. Lowering it makes detection more sensitive");
v2d->makeWindow(240,45,"Display");
v2d->makeGroup("Display");
v2d->makeFormVariable("Show FPS",show_fps,"Enable or disable the On-screen FPS display");
v2d->form()->add_button("Fullscreen",[=](){
@ -243,7 +292,6 @@ int main(int argc, char **argv) {