Skip to content

Commit

Permalink
Imgproc_ColorLab_Full.accuracy test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
savuor committed Sep 12, 2017
1 parent d9e364f commit 0e6c335
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/imgproc/test/test_color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(y);
const float* D = actual.ptr<float>(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);
Expand Down

0 comments on commit 0e6c335

Please sign in to comment.