From 1a25e58239facb290f8f4ecd1e5d3e612a7afc0f Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 7 Mar 2012 13:35:13 +0000 Subject: [PATCH] fixed patch diff calculation in the end of calcopticalflowpyrlk (thanks to Vlad Vinogradov for the patch) --- modules/video/src/lkpyramid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/video/src/lkpyramid.cpp b/modules/video/src/lkpyramid.cpp index 19d5aede9a..5392374d10 100644 --- a/modules/video/src/lkpyramid.cpp +++ b/modules/video/src/lkpyramid.cpp @@ -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);