Commit 0d09352f authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed gpu::cvtColor

parent ada3e6e6
This diff is collapsed.
......@@ -461,17 +461,17 @@ protected:
int CV_GpuCvtColorTest::CheckNorm(const Mat& m1, const Mat& m2)
{
double ret = norm(m1, m2, NORM_INF);
float max_err = 1e-2f;
Mat diff;
cv::matchTemplate(m1, m2, diff, CV_TM_CCORR_NORMED);
float err = abs(diff.at<float>(0, 0) - 1.f);
if (err > max_err)
return cvtest::TS::FAIL_INVALID_OUTPUT;
if (ret <= 3)
{
return cvtest::TS::OK;
}
else
{
ts->printf(cvtest::TS::LOG, "\nNorm: %f\n", ret);
return cvtest::TS::FAIL_GENERIC;
}
}
void CV_GpuCvtColorTest::run( int )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment