Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for Motion Triggering #42

Open
DDR0 opened this issue Sep 17, 2019 · 1 comment
Open

API for Motion Triggering #42

DDR0 opened this issue Sep 17, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request.

Comments

@DDR0
Copy link
Contributor

DDR0 commented Sep 17, 2019

An API should be added for motion triggering. Even if it's not implemented, having an API will help with UI design and implementation pending API implementation.

As I understand it, motion detection will be implemented as a 5x5 array of cells, each cell with a separate motion level. While any cell is over a specified level of motion, the motion trigger is set high.

Potentially, the API for motion triggering could look like this:

Motion Control Parameters

Parameter G S N Type Min Max Description
motion G float 0.0 1.0 A value between 0 and 1, with 0 being no motion and 1 being all hell breaking loose.
motionTriggerThreshold G S N float 0.0 1.0 A value between 0 and 1, with 0 being no motion and 1 being all hell breaking loose.
motionTriggerArea G S N map A dict containing top, left, bottom, right. Each value is a 0..1 normal, with 0 being the top or left of the screen and 1 being the bottom or right of the screen. Top must be less than bottom, and left must be less than right.

The following method would be added to grant access to heatmap information.

Additional Control Methods

Method S Arguments State Change Description
getMotionHistory G int res Retrieve a 2D array 5×res entries long, each entry reporting the maximum motion encountered for that line of motion detection during the recorded period covered by the entry. In the back of camera interface, this data is used to draw texturing behind the playback seek slider to help find the interesting bits of the recording.
getMotionData G Retrieve a 2D array 5×5 entries long, each entry reporting the maximum motion detected for the current frame. This is used as an informative overlay on the motion triggering screen, to show how motion triggering is working.

Please note, again, that is merely a currently proposed API. As part of this issue, it is subject to change and revision.

@DDR0 DDR0 added the enhancement New feature or request. label Sep 17, 2019
@DDR0
Copy link
Contributor Author

DDR0 commented Sep 17, 2019

A blocked task for the UI is being tracked as CR14-90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants