fixed errors in StereoBeliefPropogation under linux

This commit is contained in:
Vladislav Vinogradov
2010-12-13 13:52:40 +00:00
parent 070d87fb7f
commit b18a3a5f83
2 changed files with 165 additions and 77 deletions

View File

@@ -47,7 +47,7 @@ struct CV_GpuStereoBPTest : public CvTest
{
CV_GpuStereoBPTest() : CvTest( "GPU-StereoBP", "StereoBP" ){}
~CV_GpuStereoBPTest() {}
void run(int )
{
cv::Mat img_l = cv::imread(std::string(ts->get_data_path()) + "stereobp/aloe-L.png");
@@ -74,20 +74,20 @@ struct CV_GpuStereoBPTest : public CvTest
disp.convertTo(disp, img_template.type());
double norm = cv::norm(disp, img_template, cv::NORM_INF);
if (norm >= 0.5)
{
ts->printf(CvTS::LOG, "\nStereoBP norm = %f\n", norm);
ts->set_failed_test_info(CvTS::FAIL_GENERIC);
return;
}
}
catch(const cv::Exception& e)
{
if (!check_and_treat_gpu_exception(e, ts))
throw;
return;
}
double norm = cv::norm(disp, img_template, cv::NORM_INF);
if (norm >= 0.5)
{
ts->printf(CvTS::LOG, "\nStereoBP norm = %f\n", norm);
ts->set_failed_test_info(CvTS::FAIL_GENERIC);
return;
}
}
catch(const cv::Exception& e)
{
if (!check_and_treat_gpu_exception(e, ts))
throw;
return;
}
ts->set_failed_test_info(CvTS::OK);
}