Commit 62ee92e3 authored by Rostislav Vasilikhin's avatar Rostislav Vasilikhin

ColorLab_full test fixed

parent 375ec5ed
...@@ -2297,7 +2297,7 @@ static void validateResult(const Mat& reference, const Mat& actual, const Mat& s ...@@ -2297,7 +2297,7 @@ static void validateResult(const Mat& reference, const Mat& actual, const Mat& s
ssize.width *= cn; ssize.width *= cn;
bool next = true; bool next = true;
//RGB2Lab_f works throug LUT and brings additional error //RGB2Lab_f works throug LUT and brings additional error
static const float maxErr = 1.f/200.f; static const float maxErr = 1.f/192.f;
for (int y = 0; y < ssize.height && next; ++y) for (int y = 0; y < ssize.height && next; ++y)
{ {
...@@ -2335,9 +2335,10 @@ TEST(Imgproc_ColorLab_Full, accuracy) ...@@ -2335,9 +2335,10 @@ TEST(Imgproc_ColorLab_Full, accuracy)
Size ssize = src.size(); Size ssize = src.size();
CV_Assert(ssize.width == ssize.height); CV_Assert(ssize.width == ssize.height);
RNG& rng = cvtest::TS::ptr()->get_rng(); for(int i = 0; i < 4; i++)
int blueInd = rng.uniform(0., 1.) > 0.5 ? 0 : 2; {
bool srgb = rng.uniform(0., 1.) > 0.5; int blueInd = (i%2) > 0 ? 0 : 2;
bool srgb = i > 1;
// Convert test image to LAB // Convert test image to LAB
cv::Mat lab; cv::Mat lab;
...@@ -2349,6 +2350,7 @@ TEST(Imgproc_ColorLab_Full, accuracy) ...@@ -2349,6 +2350,7 @@ TEST(Imgproc_ColorLab_Full, accuracy)
cv::cvtColor(lab, recons, inverse_code); cv::cvtColor(lab, recons, inverse_code);
validateResult(src, recons, src, forward_code); validateResult(src, recons, src, forward_code);
}
} }
static void test_Bayer2RGB_EdgeAware_8u(const Mat& src, Mat& dst, int code) static void test_Bayer2RGB_EdgeAware_8u(const Mat& src, Mat& dst, int code)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "opencv2/core/private.hpp" #include "opencv2/core/private.hpp"
#include "opencv2/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp" #include "opencv2/imgcodecs.hpp"
#include "opencv2/core/softfloat.hpp"
#include "opencv2/imgproc/imgproc_c.h" #include "opencv2/imgproc/imgproc_c.h"
......
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