fixed patch diff calculation in the end of calcopticalflowpyrlk (thanks to Vlad Vinog...
authorVadim Pisarevsky <no@email>
Wed, 7 Mar 2012 13:35:13 +0000 (13:35 +0000)
committerVadim Pisarevsky <no@email>
Wed, 7 Mar 2012 13:35:13 +0000 (13:35 +0000)
modules/video/src/lkpyramid.cpp

index 19d5aed..5392374 100644 (file)
@@ -436,7 +436,7 @@ struct LKTrackerInvoker
             
             if( status[ptidx] && err && level == 0 && (flags & CV_LKFLOW_GET_MIN_EIGENVALS) == 0 )
             {
-                Point2f nextPt = nextPts[ptidx];
+                Point2f nextPt = nextPts[ptidx] - halfWin;
                 Point inextPt;
                 
                 inextPt.x = cvFloor(nextPt.x);