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; } } }