From 0e6c335077e94f483f0cc110d86b77bc1d287338 Mon Sep 17 00:00:00 2001 From: Rostislav Vasilikhin Date: Thu, 10 Aug 2017 16:36:46 +0300 Subject: [PATCH] Imgproc_ColorLab_Full.accuracy test fixed --- modules/imgproc/test/test_color.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/imgproc/test/test_color.cpp b/modules/imgproc/test/test_color.cpp index 75ae3ddddf..e920ad4646 100644 --- a/modules/imgproc/test/test_color.cpp +++ b/modules/imgproc/test/test_color.cpp @@ -1898,13 +1898,15 @@ static void validateResult(const Mat& reference, const Mat& actual, const Mat& s int cn = reference.channels(); ssize.width *= cn; bool next = true; + //RGB2Lab_f works throug LUT and brings additional error + static const float maxErr = 1.f/200.f; for (int y = 0; y < ssize.height && next; ++y) { const float* rD = reference.ptr(y); const float* D = actual.ptr(y); for (int x = 0; x < ssize.width && next; ++x) - if (fabs(rD[x] - D[x]) > 0.0001f) + if(fabs(rD[x] - D[x]) > maxErr) { next = false; ts->printf(cvtest::TS::SUMMARY, "Error in: (%d, %d)\n", x / cn, y);