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

Suggestion: small improvement on checkMotion #25

Closed
RibeiroSantos opened this issue May 13, 2021 · 2 comments
Closed

Suggestion: small improvement on checkMotion #25

RibeiroSantos opened this issue May 13, 2021 · 2 comments

Comments

@RibeiroSantos
Copy link

Hi,

I think if we change the if (changeCount> moveThreshold) code, in motionDetect.cpp-> checkMotion (), into the loop for (int i = 0; i <num_pixels; i ++) , the motion detection will be faster, in the cases where the changes are at the "beginning" of the frame, because it will not be necessary to go through the entire frame.

Thanks for sharing your work.

@s60sc
Copy link
Owner

s60sc commented May 14, 2021

Thanks, I'll take a look

@s60sc
Copy link
Owner

s60sc commented May 14, 2021

The loop is also used to calculate the light level and generate debug data so a change would not be straightforward

@s60sc s60sc closed this as completed May 14, 2021
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

No branches or pull requests

2 participants