removed the motion positive counter. it didn't do want i expecting it to do.

This commit is contained in:
Maurice ONeal 2022-04-22 10:46:19 -04:00
parent 8cfa1fccde
commit f721f45fc9

View File

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