From 73047b6d4edf4130169c524f37fe57aedb78c53d Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 16 Apr 2012 15:56:27 +0000 Subject: [PATCH] Fixed failing Video_OpticalFlow.accuracy test --- modules/legacy/test/test_optflow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/legacy/test/test_optflow.cpp b/modules/legacy/test/test_optflow.cpp index 2ff1330f69..e14e8554a7 100644 --- a/modules/legacy/test/test_optflow.cpp +++ b/modules/legacy/test/test_optflow.cpp @@ -88,7 +88,7 @@ void calcOpticalFlowLK( const Mat& prev, const Mat& curr, Size winSize, Mat& flo void calcOpticalFlowBM( const Mat& prev, const Mat& curr, Size bSize, Size shiftSize, Size maxRange, int usePrevious, Mat& flow ) { - Size sz((curr.cols - bSize.width)/shiftSize.width, (curr.rows - bSize.height)/shiftSize.height); + Size sz((curr.cols - bSize.width + shiftSize.width)/shiftSize.width, (curr.rows - bSize.height + shiftSize.height)/shiftSize.height); Mat velx(sz, CV_32F), vely(sz, CV_32F); CvMat cvvelx = velx; CvMat cvvely = vely;