Skip to content

Commit 0e6c335

Browse files
committed
Imgproc_ColorLab_Full.accuracy test fixed
1 parent d9e364f commit 0e6c335

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/imgproc/test/test_color.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,13 +1898,15 @@ static void validateResult(const Mat& reference, const Mat& actual, const Mat& s
18981898
int cn = reference.channels();
18991899
ssize.width *= cn;
19001900
bool next = true;
1901+
//RGB2Lab_f works throug LUT and brings additional error
1902+
static const float maxErr = 1.f/200.f;
19011903

19021904
for (int y = 0; y < ssize.height && next; ++y)
19031905
{
19041906
const float* rD = reference.ptr<float>(y);
19051907
const float* D = actual.ptr<float>(y);
19061908
for (int x = 0; x < ssize.width && next; ++x)
1907-
if (fabs(rD[x] - D[x]) > 0.0001f)
1909+
if(fabs(rD[x] - D[x]) > maxErr)
19081910
{
19091911
next = false;
19101912
ts->printf(cvtest::TS::SUMMARY, "Error in: (%d, %d)\n", x / cn, y);

0 commit comments

Comments
 (0)