fixed the size of output velocity map in OptFlowBM, ticket #1362 (thanks to Takanori...
authorVadim Pisarevsky <no@email>
Mon, 26 Mar 2012 09:20:03 +0000 (09:20 +0000)
committerVadim Pisarevsky <no@email>
Mon, 26 Mar 2012 09:20:03 +0000 (09:20 +0000)
modules/video/src/optflowbm.cpp

index 54bea06..f3c1fd8 100644 (file)
@@ -77,8 +77,8 @@ cvCalcOpticalFlowBM( const void* srcarrA, const void* srcarrB,
 
     CvSize velSize =
     {
-        (srcA->width - blockSize.width)/shiftSize.width,
-        (srcA->height - blockSize.height)/shiftSize.height
+        (srcA->width - blockSize.width + shiftSize.width)/shiftSize.width,
+        (srcA->height - blockSize.height + shiftSize.height)/shiftSize.height
     };
 
     if( !CV_ARE_SIZES_EQ( srcA, srcB ) ||