mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Fixed bug #1629
This commit is contained in:
parent
3228599a35
commit
e50c0ed4c8
@ -322,7 +322,6 @@ CV_EXPORTS_W void calcOpticalFlowPyrLK( InputArray prevImg, InputArray nextImg,
|
||||
TermCriteria criteria=TermCriteria(
|
||||
TermCriteria::COUNT+TermCriteria::EPS,
|
||||
30, 0.01),
|
||||
double derivLambda=0.5,
|
||||
int flags=0,
|
||||
double minEigThreshold=1e-4);
|
||||
|
||||
|
@ -498,18 +498,15 @@ void cv::calcOpticalFlowPyrLK( InputArray _prevImg, InputArray _nextImg,
|
||||
OutputArray _status, OutputArray _err,
|
||||
Size winSize, int maxLevel,
|
||||
TermCriteria criteria,
|
||||
double derivLambda,
|
||||
int flags, double minEigThreshold )
|
||||
{
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
if (tegra::calcOpticalFlowPyrLK(_prevImg, _nextImg, _prevPts, _nextPts, _status, _err, winSize, maxLevel, criteria, derivLambda, flags, minEigThreshold))
|
||||
if (tegra::calcOpticalFlowPyrLK(_prevImg, _nextImg, _prevPts, _nextPts, _status, _err, winSize, maxLevel, criteria, flags, minEigThreshold))
|
||||
return;
|
||||
#endif
|
||||
Mat prevImg = _prevImg.getMat(), nextImg = _nextImg.getMat(), prevPtsMat = _prevPts.getMat();
|
||||
derivLambda = std::min(std::max(derivLambda, 0.), 1.);
|
||||
const int derivDepth = DataType<deriv_type>::depth;
|
||||
|
||||
CV_Assert( derivLambda >= 0 );
|
||||
CV_Assert( maxLevel >= 0 && winSize.width > 2 && winSize.height > 2 );
|
||||
CV_Assert( prevImg.size() == nextImg.size() &&
|
||||
prevImg.type() == nextImg.type() );
|
||||
|
Loading…
Reference in New Issue
Block a user