{
cv::Mat img_l = cv::imread(std::string(ts->get_data_path()) + "csstereobp/aloe-L.png");
cv::Mat img_r = cv::imread(std::string(ts->get_data_path()) + "csstereobp/aloe-R.png");
- cv::Mat img_template = cv::imread(std::string(ts->get_data_path()) + "csstereobp/aloe-disp.png", 0);
+
+ cv::Mat img_template;
+
+ if (cv::gpu::TargetArchs::builtWith(cv::gpu::FEATURE_SET_COMPUTE_20) &&\r
+ cv::gpu::DeviceInfo().supports(cv::gpu::FEATURE_SET_COMPUTE_20))\r
+ img_template = cv::imread(std::string(ts->get_data_path()) + "csstereobp/aloe-disp.png", CV_LOAD_IMAGE_GRAYSCALE);\r
+ else\r
+ img_template = cv::imread(std::string(ts->get_data_path()) + "csstereobp/aloe-disp_CC1X.png", CV_LOAD_IMAGE_GRAYSCALE);
if (img_l.empty() || img_r.empty() || img_template.empty())
{
bpm(cv::gpu::GpuMat(img_l), cv::gpu::GpuMat(img_r), disp);
- //cv::imwrite(std::string(ts->get_data_path()) + "csstereobp/aloe-disp.png", disp);
+ //cv::imwrite(std::string(ts->get_data_path()) + "csstereobp/aloe-disp_CC1X.png", cv::Mat(disp));
disp.convertTo(disp, img_template.type());