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

Setting motion masks to zero to improve startup calibration #9992

Conversation

SpangleLabs
Copy link
Contributor

Setting the motion masked areas to zero, rather than 255, will speed up calibration, as the average frame starts out at zero, currently the motion masked areas take the longest time to blend into the average of any region of the frame.

Here's a comparison of frames 1, 11, 21, 31, 41, 51 of startup, with each image column exported in various stages of processing via the save_images flag in ImprovedMotionDetector

bird_box-frames-1to51

Switching the motion masked areas to black, will mean they're immediately matched to the average frame and won't risk being considered motion after everything else. The blurred areas around the motion detection should also blend into the average frame faster than their surrounding areas anyway.

The current 255 motion mask doesn't present any issue after startup, so this is only a minor improvement, but this should improve things during system start at least.

…ion, as the average frame starts out at zero
Copy link

netlify bot commented Feb 23, 2024

Deploy Preview for frigate-docs ready!

Name Link
🔨 Latest commit 19bdf26
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65d869908a2b63000876a59c
😎 Deploy Preview https://deploy-preview-9992--frigate-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@blakeblackshear
Copy link
Owner

Great find. Thanks for the PR.

@blakeblackshear blakeblackshear merged commit fc94fcb into blakeblackshear:dev Feb 23, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants