Commit b1384a6d authored by Andrey Kamaev's avatar Andrey Kamaev

Fix cvCalcOpticalFlow when the status parameter is NULL

issue 2526
parent dff59ec9
...@@ -1194,8 +1194,8 @@ cvCalcOpticalFlowPyrLK( const void* arrA, const void* arrB, ...@@ -1194,8 +1194,8 @@ cvCalcOpticalFlowPyrLK( const void* arrA, const void* arrB,
st = cv::Mat(count, 1, CV_8U, (void*)status); st = cv::Mat(count, 1, CV_8U, (void*)status);
if( error ) if( error )
err = cv::Mat(count, 1, CV_32F, (void*)error); err = cv::Mat(count, 1, CV_32F, (void*)error);
cv::calcOpticalFlowPyrLK( A, B, ptA, ptB, status ? cv::_OutputArray(st) : cv::_OutputArray(), cv::calcOpticalFlowPyrLK( A, B, ptA, ptB, st,
error ? cv::_OutputArray(err) : cv::_OutputArray(), error ? cv::_OutputArray(err) : cv::noArray(),
winSize, level, criteria, flags); winSize, level, criteria, flags);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment