removed unnecessary tmp variable (convertTo can work in-place)
This commit is contained in:
@@ -459,14 +459,14 @@ void CV_StereoMatchingTest::run(int)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor;
|
int dispScaleFactor = datasetsParams[datasetName].dispScaleFactor;
|
||||||
Mat tmp; trueLeftDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueLeftDisp = tmp; tmp.release();
|
trueLeftDisp.convertTo( trueLeftDisp, CV_32FC1, 1.f/dispScaleFactor );
|
||||||
if( !trueRightDisp.empty() )
|
if( !trueRightDisp.empty() )
|
||||||
trueRightDisp.convertTo( tmp, CV_32FC1, 1.f/dispScaleFactor ); trueRightDisp = tmp; tmp.release();
|
trueRightDisp.convertTo( trueRightDisp, CV_32FC1, 1.f/dispScaleFactor );
|
||||||
|
|
||||||
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( tmp, CV_32FC1 ); leftDisp = tmp; tmp.release();
|
leftDisp.convertTo( leftDisp, CV_32FC1 );
|
||||||
rightDisp.convertTo( tmp, CV_32FC1 ); rightDisp = tmp; tmp.release();
|
rightDisp.convertTo( rightDisp, CV_32FC1 );
|
||||||
|
|
||||||
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));
|
||||||
|
|||||||
Reference in New Issue
Block a user