From a84e11451b6e638a63f7c39ffb0a3330be882491 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 21 Jan 2019 16:04:23 +0300 Subject: [PATCH] imgproc(test): RGB2YUV regression test --- modules/imgproc/test/test_color.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/imgproc/test/test_color.cpp b/modules/imgproc/test/test_color.cpp index c36bc1fd6e..6ad51ad512 100644 --- a/modules/imgproc/test/test_color.cpp +++ b/modules/imgproc/test/test_color.cpp @@ -3062,4 +3062,14 @@ TEST(ImgProc_BGR2RGBA, 3ch24ch) EXPECT_DOUBLE_EQ(cvtest::norm(expected - dst, NORM_INF), 0.); } +TEST(ImgProc_RGB2YUV, regression_13668) +{ + Mat src(Size(32, 4), CV_8UC3, Scalar(9, 250, 82)); // Ensure that SIMD code path works + Mat dst; + cvtColor(src, dst, COLOR_RGB2YUV); + Vec3b res = dst.at(0, 0); + Vec3b ref(159, 90, 0); + EXPECT_EQ(res, ref); +} + }} // namespace