removed the motion positive counter. it didn't do want i expecting it to do.
This commit is contained in:
parent
8cfa1fccde
commit
f721f45fc9
12
src/main.cpp
12
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user