Video Detection

Video detection module. Enables interaction with a camera.

Supported format are RGB, YUY2 and UYVY.

Works as a motion detector, light zones or dark zones.

start detection

Starts the detection process.

stop detection

Stops the detection process.


List of detected video devices.


Gives the average luminance of the current frame.

maxi value

  • In motion detection mode gives the maximum of the difference between the current frame and the previous frame.
  • In light zones mode gives the maximum luminance of the current frame.
  • In dark zones mode gives (256 - minimum luminance) of the current frame.

Can be helpful for calibration and to adjust the threshold value.

detect mode

Detection mode.

  • motion: detects the movements.
  • light zones: detects light or white zones.
  • dark zones: detects darks or black zones.


Detection threshold and sensibility.

  • 0 always detected.
  • 255 never detected.

group tolerance

Determines if zones which are close together are grouped into a single zone.

  • 0 not grouped
  • 10 if the distance between two zones is less than 10pixels they are grouped together.
  • etc.

nb zones found

Number of detected zones.


Array of 0 or 1 with a nb zone detected length.

For example if 3 zones are detected this output is the array [1,1,1].

zones X and zones Y

X or Y position of all the zones. Array of single (0..1) which gives the position of each zone on the X or Y axis.

For example [0.23,0.67,0.96] is for a 3 zones detection, the first X or Y position is at 0.23 the second at 0.67 and so on.


Array of single which gives the surface of each zone. The surface is (width x height).

barycenter X and barycenter Y

Coordinates of the barycenter of all the zones. It’s the average position.

detected N

Sends a 1 value if the Nth zone is detected.

zone X and zone Y

Position of the Nth zone.


Surface of the Nth zone.