Separates what appears or moves in front of a background learnt from a fixed camera: a person, a hand, an object. Outputs the video keyed by the mask, the mask in black and white, and the part of the frame in the foreground. For installations without a green screen, before Video Mix Over or Video Detection Blob.
Example: a dancer filmed by a fixed camera (1280 x 720), running average, learning rate 0.004, clean 2, fill 6, feather 3, 22 s after learn: the mask; then video out 1 laid by Video Mix Over on a still of a lake, without a green screen.
Each frame is compared with a model of the background (model); the difference gives the mask through threshold and softness, then clean, fill and feather tidy it. The first frame, learn, a change of frame size and the activation of the patch take the current frame as the background: the mask of that frame is black. Use a fixed camera: with a moving one, most of the frame is foreground. Frames up to 4096 x 2160 are analysed; larger ones pass through with a black mask and a foreground of 0. A frame costs 2.5 ms at 1280 x 720, 4 to 5 ms at 1920 x 1080 and 17 to 22 ms at 3840 x 2160 (the model takes 8 bytes per pixel): prefer a camera of 1920 x 1080 or less.
Bypasses the module processing when activated (ON).
Video input flow(s).
Video output flow(s).
The mask as an opaque gray picture: white on the foreground, black on the background. video out 1 is the input with this mask as its alpha: the subject opaque, the background transparent.
Total time used for the calculation of the module.
The background each frame is compared with (default running average).
Share of each new frame in the running average, from 0.001 to 1 (default 0.01). It applies per processed frame: at 0.01 a 25 fps camera absorbs a change in about 4 seconds, a faster source sooner. Used by running average only.
Takes the current frame as the background, with every model, when the button is pressed (not when it is released).
When ON, the background is frozen: running average and previous frame stop learning.
Where the running average learns (default everywhere).
How the difference between the frame and the background is measured (default color).
Difference at and below which a pixel is background, from 0 to 1 (default 0.1, about 26 levels of 255). At 1 nothing is detected.
Width of the ramp above threshold, from 0 to 1 (default 0.05): the mask goes from black at the threshold to white at threshold + softness. 0 gives a hard black and white mask.
threshold = 0.1, softness = 0.05
difference = 26 levels or less: mask = 0
difference = 32 levels: mask = 118
difference = 39 levels or more: mask = 255
Radius of an opening, from 0 to 20 pixels (default 1): removes the white specks and lines narrower than 2 x clean + 1 pixels.
Radius of a closing, from 0 to 20 pixels (default 2): fills the black holes and gaps narrower than 2 x fill + 1 pixels.
Width of the soft edge of the mask, from 0 to 50 pixels (default 0).
Part of the frame in the foreground, from 0 (nothing) to 1 (the whole frame): the mean of the mask. A white square of 200 x 200 pixels on a 1920 x 1080 frame gives 0.0193.
Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.
For more details about information/help creation, see create-help-file.
Free multi-line text attached to the module, saved with the patch. When it is not empty, it is shown as the hint of the module (mouse over the module header in the patch) in place of the default module hint, even when the module hints are disabled.
visible only in god mode, see setup-panel-tab-expert.
Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).
Read-only, not saved. Private ID used to store and recall the values of this control in presets.
Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.
Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.
Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.
Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.
version 7.0.250921
Edit All Pages