|
|
|
@ -63,16 +63,17 @@ void CV_GpuStereoBM::run(int ) |
|
|
|
|
cv::Mat img_template = cv::imread(std::string(ts->get_data_path()) + "stereobm/aloe-disp.png", 0); |
|
|
|
|
|
|
|
|
|
cv::gpu::GpuMat disp; |
|
|
|
|
cv::gpu::StereoBM_GPU bm; |
|
|
|
|
cv::gpu::StereoBM_GPU bm(0, 128, 19); |
|
|
|
|
|
|
|
|
|
bm(cv::gpu::GpuMat(img_l), cv::gpu::GpuMat(img_r), disp); |
|
|
|
|
|
|
|
|
|
cv::imwrite(std::string(ts->get_data_path()) + "stereobm/aloe-disp.png", disp); |
|
|
|
|
//cv::imwrite(std::string(ts->get_data_path()) + "stereobm/aloe-disp.png", disp);
|
|
|
|
|
|
|
|
|
|
disp.convertTo(disp, img_template.type()); |
|
|
|
|
|
|
|
|
|
double norm = cv::norm(disp, img_template, cv::NORM_INF); |
|
|
|
|
ts->set_failed_test_info((norm < 0.5) ? CvTS::OK : CvTS::FAIL_GENERIC); |
|
|
|
|
if (norm >= 100) std::cout << "StereoBM norm = " << norm << std::endl; |
|
|
|
|
ts->set_failed_test_info((norm < 100) ? CvTS::OK : CvTS::FAIL_GENERIC); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|