Video to Data Array

Crops a video flow and converts pixels to a data array of luminances in the range [0..1], 0 for totally black and 1 for totally white.

The luminance of a pixel is (77 x R + 151 x G + 28 x B) / 256, an integer from 0 to 255 (the fraction dropped), divided by 255; the transparency of the pixels is not used.

The output data array holds one value per pixel of the cropped rectangle, from start idx X to end idx X and from start idx Y to end idx Y (both included, clamped to the image): (end idx X - start idx X + 1) x (end idx Y - start idx Y + 1) values, the whole image with the default settings. So try to reduce the size of the input video if you don't want to overload the CPU.

When the module is off, without input or with an empty image, the data array is empty.

Settings

on

Activates or deactivates the module.

video in

Video input flow(s).

process time

Total time used for the calculation of the module.

start idx X

Crop start index (in pixel) on X axis, from 0 to 16384; 0 by default. Beyond the right edge of the image the last column is used.

end idx X

Crop end index (in pixel) on X axis, included, from 0 to 16384; 16384 by default (up to the right edge). Beyond the right edge of the image the last column is used; below start idx X, start idx X is used (one column).

start idx Y

Crop start index (in pixel) on Y axis, from 0 to 16384; 0 by default. Beyond the bottom edge of the image the last row is used.

end idx Y

Crop end index (in pixel) on Y axis, included, from 0 to 16384; 16384 by default (down to the bottom edge). Beyond the bottom edge of the image the last row is used; below start idx Y, start idx Y is used (one row).

scan direction

Determines the way the image is converted:

  • horizontal: line by line, from the top line, each one from left to right (default).
  • vertical: column by column, from the left column, each one from top to bottom.

data array

Data array output.

Common Settings

info

show manual

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.

description

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.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

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).

preset ID

Read-only, not saved. Private ID used to store and recall the values of this control in presets.

recreate ID

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.

Object Remote Address

absolute

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.

local

Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.

user addr

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.

See also

version 7.0.250921

Edit All Pages