Detect Motion Performance Concerns #1

Closed
opened 2020-10-24 00:15:38 +00:00 by steven · 0 comments
Owner

This is running on a freaking fisher price computer meant for kids (raspberry pi 4). I don't yet have hardware to benchmark performance, but I suspect that attempting to detect motion between every frame inline with the rest of the code will result in low framerates in the saved video.

There are a few possible methods I've thought of to overcome this:

  1. Implement CSP-style architecture with buffered channels for motion detection in a separate Goroutine, so it can be processed concurrently.
  2. Keep motion detection inline, but "frameskip" when it runs.

Idea #1 is probably better overall but requires more work. Idea #2 will be quick to implement, but may result in jittery video (plays fine for a second, then frame pauses for a few milliseconds, then plays fine again, etc). Idea #2 will also probably require more tuning as the more time between motionDetection runs, the more pixels in the frame may change which could result in having to tune the minimumArea parameter.

This is running on a freaking fisher price computer meant for kids (raspberry pi 4). I don't yet have hardware to benchmark performance, but I suspect that attempting to detect motion between every frame inline with the rest of the code will result in low framerates in the saved video. There are a few possible methods I've thought of to overcome this: 1. Implement CSP-style architecture with buffered channels for motion detection in a separate Goroutine, so it can be processed concurrently. 2. Keep motion detection inline, but "frameskip" when it runs. Idea #1 is probably better overall but requires more work. Idea #2 will be quick to implement, but may result in jittery video (plays fine for a second, then frame pauses for a few milliseconds, then plays fine again, etc). Idea #2 will also probably require more tuning as the more time between motionDetection runs, the more pixels in the frame may change which could result in having to tune the minimumArea parameter.
steven added the
enhancement
label 2020-10-24 00:15:38 +00:00
steven self-assigned this 2020-10-24 00:15:38 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: steven/storage-security#1
No description provided.