Fix cvCalcOpticalFlow when the status parameter is NULL

issue 2526
This commit is contained in:
Andrey Kamaev 2013-01-10 18:14:08 +04:00
parent dff59ec960
commit b1384a6da8

View File

@ -1194,8 +1194,8 @@ cvCalcOpticalFlowPyrLK( const void* arrA, const void* arrB,
st = cv::Mat(count, 1, CV_8U, (void*)status);
if( error )
err = cv::Mat(count, 1, CV_32F, (void*)error);
cv::calcOpticalFlowPyrLK( A, B, ptA, ptB, status ? cv::_OutputArray(st) : cv::_OutputArray(),
error ? cv::_OutputArray(err) : cv::_OutputArray(),
cv::calcOpticalFlowPyrLK( A, B, ptA, ptB, st,
error ? cv::_OutputArray(err) : cv::noArray(),
winSize, level, criteria, flags);
}