Ask Your Question

Revision history [back]

Calcopticalflowpyrlk function in opencv 3.0

I'm trying to track something in some frames. I know calcopticalflowpyrlk(http://docs.opencv.org/3.0-beta/modules/video/doc/motion_analysis_and_object_tracking.html) is supposed to be used for sparse tracking problems. However, I thought it wouldn't really hurt if I just try to track all pixels in the frames.

So my video frames are actually very stable(motions are barely visible by eyes), and calcopticalflowpyrlk works well for most pixels. But for some pixels it returns really big flow vectors(like [200,300]), which doesn't make sense.

And I also found a Matlab implementation that's using the same Pyramidal Lucas-Kanade algorithm, but this Matlab version doesn't return any crazy values.

So I'm wondering what is causing opencv function to return huge non-reasonable values. Is it because the matrix inversion is done differently?