nx_metadata_sdk  1.0
Metadata SDK
Public Member Functions | Static Public Member Functions | List of all members
nx::sdk::analytics::IMotionMetadataPacket Class Referenceabstract

#include <i_motion_metadata_packet.h>

Inheritance diagram for nx::sdk::analytics::IMotionMetadataPacket:
nx::sdk::Interface< IMotionMetadataPacket, IMetadataPacket0 >

Public Member Functions

virtual const uint8_t * motionData () const =0
 
virtual int motionDataSize () const =0
 
virtual int rowCount () const =0
 
virtual int columnCount () const =0
 
virtual bool isEmpty () const =0
 
virtual bool isMotionAt (int columnIndex, int rowIndex) const =0
 
- Public Member Functions inherited from nx::sdk::Interface< IMotionMetadataPacket, IMetadataPacket0 >
virtual IRefCountablequeryInterface (const InterfaceId *id)
 
Ptr< InterfacequeryInterface ()
 
Ptr< const InterfacequeryInterface () const
 

Static Public Member Functions

static auto interfaceId ()
 

Additional Inherited Members

- Protected Member Functions inherited from nx::sdk::Interface< IMotionMetadataPacket, IMetadataPacket0 >
virtual IRefCountablequeryInterface (const IRefCountable::InterfaceId *id) override
 
IRefCountablequeryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)
 

Detailed Description

Metadata packet containing information about motion on the scene.

Member Function Documentation

◆ columnCount()

virtual int nx::sdk::analytics::IMotionMetadataPacket::columnCount ( ) const
pure virtual
Returns
Column count of the motion detector grid.

◆ isEmpty()

virtual bool nx::sdk::analytics::IMotionMetadataPacket::isEmpty ( ) const
pure virtual
Returns
true if motion has been detected at least in one cell, false otherwise.

◆ isMotionAt()

virtual bool nx::sdk::analytics::IMotionMetadataPacket::isMotionAt ( int  columnIndex,
int  rowIndex 
) const
pure virtual
Returns
Whether motion has been detected in the specified cell.

◆ motionData()

virtual const uint8_t* nx::sdk::analytics::IMotionMetadataPacket::motionData ( ) const
pure virtual

Motion metadata is represented as a grid with a certain number of rows and columns. The grid coordinate system starts at the top left corner, the row index grows down and the column index grows right. This grid is represented as a contiguous array, each bit of which corresponds to the state of a particular cell of the grid (1 if motion has been detected in this cell, 0 otherwise). The bit index for a cell with coordinates (column, row) can be calculated within the following formula: bitNumber = gridHeight * column + row.

Returns
Pointer to the grid buffer.

◆ motionDataSize()

virtual int nx::sdk::analytics::IMotionMetadataPacket::motionDataSize ( ) const
pure virtual
Returns
Size of the motion metadata buffer in bytes. Number of bits in the grid buffer may be more than the number of bits needed to store the whole grid, values of those excessive bits are undefined and should be ignored.

◆ rowCount()

virtual int nx::sdk::analytics::IMotionMetadataPacket::rowCount ( ) const
pure virtual
Returns
Row count of the motion detector grid.

The documentation for this class was generated from the following file: