added support of 4 channels images to StereoBeliefPropagation, minor code refactoring.

This commit is contained in:
Vladislav Vinogradov
2010-12-07 10:20:03 +00:00
parent 5e401f2998
commit c18aa438ec
4 changed files with 186 additions and 244 deletions

View File

@@ -106,6 +106,7 @@ protected:
if (!compareMatches(matchesCPU, matchesGPU))
{
ts->printf(CvTS::LOG, "Match FAIL");
ts->set_failed_test_info(CvTS::FAIL_MISMATCH);
return;
}
@@ -117,6 +118,7 @@ protected:
if (!compareMatches(knnMatchesCPU, knnMatchesGPU))
{
ts->printf(CvTS::LOG, "KNN Match FAIL");
ts->set_failed_test_info(CvTS::FAIL_MISMATCH);
return;
}
@@ -128,6 +130,7 @@ protected:
if (!compareMatches(radiusMatchesCPU, radiusMatchesGPU))
{
ts->printf(CvTS::LOG, "Radius Match FAIL");
ts->set_failed_test_info(CvTS::FAIL_MISMATCH);
return;
}

View File

@@ -62,6 +62,9 @@ struct CV_GpuStereoBPTest : public CvTest
try
{
{cv::Mat temp; cv::cvtColor(img_l, temp, CV_BGR2BGRA); cv::swap(temp, img_l);}
{cv::Mat temp; cv::cvtColor(img_r, temp, CV_BGR2BGRA); cv::swap(temp, img_r);}
cv::gpu::GpuMat disp;
cv::gpu::StereoBeliefPropagation bpm(64, 8, 2, 25, 0.1f, 15, 1, CV_16S);