Skip to content

motionmanaged Lua Interface


get

Get a pointer to the MotionDetection object

Arguments:
any ptr Pointer to Module object
Returns:
motionmanaged ptr Pointer to casted motionmanaged object

Example

ptr = motionmanaged:.get(ptr)


getConfig

Get the configuration object for the plugin

Arguments:
motionmanaged ptr Pointer to motionmanaged object
Returns:
table obj Map with configurations

Example

obj = motionmanaged:.getConfig(ptr)


getState

Get the the internal state of the object

Arguments:
motionmanaged ptr Pointer to motionmanaged object
Returns:
table obj Map with statistics

Example

obj = motionmanaged:.getState(ptr)


saveConfig

Save the configuration object for the plugin

Arguments:
motionmanaged ptr Pointer to motionmanaged object
table new_config Map with configurations

Example

motionmanaged:.saveConfig(ptr,new_config)


reset

Reset the plugin state

Arguments:
motionmanaged ptr Pointer to motionmanaged object

Example

motionmanaged:.reset(ptr)


getName

Get the plugin name

Arguments:
motionmanaged ptr Pointer to motionmanaged object
Returns:
string name Plugin Name

Example

name = motionmanaged:.getName(ptr)


detectMotion

Trigger motion detection

Arguments:
motionmanaged ptr Pointer to motionmanaged object
buffer buffer Pointer to a buffer object
Returns:
table detections List of detections

Example

detections = motionmanaged:.detectMotion(ptr,buffer)


deleteDetection

Delete a detection from the detections list

Arguments:
motionmanaged ptr Pointer to motionmanaged object
number targetid ID of the detection to delete

Example

motionmanaged:.deleteDetection(ptr,targetid)


deleteDetections

Delete all detections from the detections list

Arguments:
motionmanaged ptr Pointer to motionmanaged object

Example

motionmanaged:.deleteDetections(ptr)


getDetections

Get current detections list

Arguments:
motionmanaged ptr Pointer to motionmanaged object
Returns:
table detections table with Detections

Example

detections = motionmanaged:.getDetections(ptr)


getDebugBuffer

Get current motion debug buffer

Arguments:
motionmanaged ptr Pointer to motionmanaged object
number index Index of the Debug buffer to get (0 - Entry image, 1 - Post motion process image)
Returns:
buffer Debug Buffer

Example

Debug = motionmanaged:.getDebugBuffer(ptr,index)


calculateMask

Automatically calculates the motion masks from tripwires or zones

Arguments:

Example

motionmanaged:.calculateMask()