Integrating motion detection with analytics plugin
CompletedHi,
I'm developing an analytics plugin which is sending frames to my inference server to do some object detection. The problem is that currently I'm sending all the frames which generates unnecessary costs (GPU compute time, network traffic etc.). I was wondering if it was possible to somehow integrate my plugin with motion detector in NX Witness server and send only frames when something is happening. Because writing my custom motion detector inside the plugin sounds redundant.
Or maybe there is another, simpler solution for this use case (eg. using event rules) than writing a C++ plugin?
Thanks in advance for the help.
-
Hello Bartłomiej,
there is a possibility to received motion metadata from the server's motion detection engine. You can set motion flag in the Engine's Manifest:
- `"streamTypeFilter"`: Flag set (String)
A combination of zero or more of the following flags, separated with `|`, defining which kind of streaming data will the plugin receive from the Server in IConsumingDeviceAgent::doPushDataPacket():
- `compressedVideo` - Compressed video packets, as ICompressedVideoPacket.
- `uncompressedVideo` - Uncompressed video frames, as IUncompressedVideoFrame.
- `metadata` - Metadata that comes in the stream (e.g. RTSP) that goes from the Device to the Server, as ICustomMetadataPacket.
- `motion` - Motion metadata retrieved by the Server's Motion Engine, as IMotionMetadataPacket.
Optional; default value is empty.Please refer to this community post which illustrates how you can filter out frames without motion in your DeviceAgent class.
Please sign in to leave a comment.
Comments
1 comment