Commit 579f723f authored by Andrey Kamaev's avatar Andrey Kamaev Committed by OpenCV Buildbot

Merge pull request #762 from vpisarev:cvt_fix

parents 7c402d1e 6aa4f533
...@@ -459,14 +459,29 @@ void CV_StereoMatchingTest::run(int) ...@@ -459,14 +459,29 @@ void CV_StereoMatchingTest::run(int)
continue; continue;
} }
int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor; int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor;
trueLeftDisp.convertTo( trueLeftDisp, CV_32FC1, 1.f/dispScaleFactor ); Mat tmp;
trueLeftDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor );
trueLeftDisp = tmp;
tmp.release();
if( !trueRightDisp.empty() ) if( !trueRightDisp.empty() )
trueRightDisp.convertTo( trueRightDisp, CV_32FC1, 1.f/dispScaleFactor ); {
trueRightDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor );
trueRightDisp = tmp;
tmp.release();
}
Mat leftDisp, rightDisp; Mat leftDisp, rightDisp;
int ignBorder = max(runStereoMatchingAlgorithm(leftImg, rightImg, leftDisp, rightDisp, ci), EVAL_IGNORE_BORDER); int ignBorder = max(runStereoMatchingAlgorithm(leftImg, rightImg, leftDisp, rightDisp, ci), EVAL_IGNORE_BORDER);
leftDisp.convertTo( leftDisp, CV_32FC1 );
rightDisp.convertTo( rightDisp, CV_32FC1 ); leftDisp.convertTo( tmp, CV_32FC1 );
leftDisp = tmp;
tmp.release();
rightDisp.convertTo( tmp, CV_32FC1 );
rightDisp = tmp;
tmp.release();
int tempCode = processStereoMatchingResults( resFS, ci, isWrite, int tempCode = processStereoMatchingResults( resFS, ci, isWrite,
leftImg, rightImg, trueLeftDisp, trueRightDisp, leftDisp, rightDisp, QualityEvalParams(ignBorder)); leftImg, rightImg, trueLeftDisp, trueRightDisp, leftDisp, rightDisp, QualityEvalParams(ignBorder));
......
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