Hi,
there is a bug in you're implementation (it seems that is not in the python implementation).
when you track the points you add also the old ones. You should fix that this way:
instead of:
if (status[i]) //TODO error
p.first.pt = nextPts[i];
keypointsTracked.push_back(p); //This line can be different in my implementation
you should write:
if (status[i])
{
p.first.pt = nextPts[i];
keypointsTracked.push_back(p);
}
unfortunatly, I can't provide you a pull request, because I've done major changes in my code, and now is incopatible with yours....
with that fix, the false positive rate goes down considerably, in particular when the object or the camera are in motion and the object goes out of view.
Hi, there is a bug in you're implementation (it seems that is not in the python implementation). when you track the points you add also the old ones. You should fix that this way:
instead of:
if (status[i]) //TODO error p.first.pt = nextPts[i]; keypointsTracked.push_back(p); //This line can be different in my implementation
you should write:
if (status[i]) { p.first.pt = nextPts[i]; keypointsTracked.push_back(p); }
unfortunatly, I can't provide you a pull request, because I've done major changes in my code, and now is incopatible with yours....
with that fix, the false positive rate goes down considerably, in particular when the object or the camera are in motion and the object goes out of view.