From f721f45fc9ef450101b6de9271452f87507f1fbc Mon Sep 17 00:00:00 2001 From: Maurice ONeal Date: Fri, 22 Apr 2022 10:46:19 -0400 Subject: [PATCH] removed the motion positive counter. it didn't do want i expecting it to do. --- src/main.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 18d4818..8505d51 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -138,19 +138,11 @@ bool detectDiff(const Mat &prev, const Mat &next, shared_t *share) // select good points if(status[i] == 1) { - if (count == 5) - { - return true; - } - else if (norm(p0[i] - p1[i]) > distance) + if (norm(p0[i] - p1[i]) > distance) { // any points that moved 0.0578% or more of the total pixel // area can be considered motion. - // the count variable is there to make sure mutiple points - // are calling out motion. this prevents false positives - // due to insects or other small objects like grass, bush - // etc... - count += 1; + return true; } } }