milestonexprotectrestpython.xprmotiondetection

Module: xprmotiondetection.py

Revision History

Date Version Description
2023/07/11 1.0.0.0 Initial Version.

@export
class XPRMotionDetection:

Motion Detection information.

Threadsafety:

This class is fully thread-safe.

More information about Motion Detection configuration can be found on the vendor documentation page.

XPRMotionDetection()

Initializes a new instance of the class.

DetectionMethod: str

Motion detection method used to optimize motion detection by analyzing only a percentage of the image. Valid values are:

  • Normal
  • Optimized
  • Fast
Returns:

The DetectionMethod property value.

DisplayName: str

User-friendly display name used in various user-interface displays.

Returns:

The DisplayName property value.

Enabled: bool

True if motion detection is enabled; otherwise, False.

Returns:

The Enabled property value.

ExcludeRegions: str

Defines regions of the camera view to exclude from motion detection.

Returns:

The ExcludeRegions property value.

Excluding motion detection from specific areas helps you avoid detection of irrelevant motion, for example if the camera covers an area where a tree is swaying in the wind or where cars regularly pass by in the background.

GenerateMotionMetadata: bool

True to generate motion metadata for smart search function; otherwise, False.

Returns:

The GenerateMotionMetadata property value.

GridSize: str

Grid size used when defining exclude regions. Valid values are:

  • 8x8
  • 16x16
  • 32x32
  • 64x64
Returns:

The GridSize property value.

HardwareAccelerationMode: str

Hardware acceleration mode that is in use. Valid values are:

  • Automatic = hardware acceleration enabled.
  • Off = hardware acceleration disabled.
Returns:

The HardwareAccelerationMode property value.

Id: str

Globally unique identifier of the motion detection item.

Returns:

The Id property value.

KeyframesOnly: bool

True to do motion detection on keyframes only; otherwise, False to do motion detection on the entire video stream.

Returns:

The KeyframesOnly property value.

Only applies to MPEG-4/H.264/H.265.

Motion detection on keyframes reduces the amount of processing power used to carry out the analysis.

ManualSensitivity: int

Determines how much each pixel in the image must change before it is regarded as motion. Value in range 0 - 765.

Returns:

The ManualSensitivity property value.

ManualSensitivityEnabled: bool

True to enable manual sensitivity settings; otherwise, False to utilize automatic sensitivity settings.

Returns:

The ManualSensitivityEnabled property value.

ParentId: str

Globally unique identifier of the parent device.

Returns:

The ParentId property value.

ParentType: str

Parent device type ("cameras", etc).

Returns:

The ParentType property value.

ProcessTime: str

Image processing interval that determines how often the system performs the motion detection analysis.
Default value is every 500 milliseconds.

Motion detection check interval that specifies how often to check for motion. Valid values are:

  • Ms100 = every 100 milliseconds.
  • Ms250 = every 250 milliseconds.
  • Ms500 = every 500 milliseconds.
  • Ms750 = every 750 milliseconds.
  • Ms1000 = every 1000 milliseconds (or 1 second).
Returns:

The ProcessTime property value.

The interval is applied if the actual frame rate is higher than the interval you set here. For example, every 1000 milliseconds are once every second.

Threshold: int

Determine how many pixels in the image must change before it is regarded as motion and triggers a motion event. Value in range 0 - 10000.

Returns:

The Threshold property value.

UseExcludeRegions: bool

True to enable exclude regions in the motion detection; otherwise, False to include all pixels in the view for motion detection.

Returns:

The UseExcludeRegions property value.