System information (version)
- OpenCV => recent 3.4 ( 57fae4a )
- Operating System / Platform => TinkerBoard (Armv7), Debian stretch
- Compiler => GCC 6.3.0
Detailed description
Two tests fail in OCL_ImgProc/CvtColor8u.mRGBA2RGBA
[ RUN ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/0, where GetParam() = (CV_8U, false)
/home/linaro/opencv-fork/modules/imgproc/test/ocl/test_color.cpp:89: Failure
Expected: (TestUtils::checkNorm2(dst_roi, udst_roi)) <= (threshold), actual: 1 vs 0.001
Size: [15 x 21]
[ FAILED ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/0, where GetParam() = (CV_8U, false) (14 ms)
[ RUN ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/1, where GetParam() = (CV_8U, true)
/home/linaro/opencv-fork/modules/imgproc/test/ocl/test_color.cpp:89: Failure
Expected: (TestUtils::checkNorm2(dst_roi, udst_roi)) <= (threshold), actual: 1 vs 0.001
Size: [15 x 21]
[ FAILED ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/1, where GetParam() = (CV_8U, true) (2 ms)
Full log is available here
This seems to be a rounding error, since there is a float operation in the color conversion code.
|
v_float32 fd00, fd01, fd10, fd11; |
|
fd00 = fs00/fa00; |
|
fd01 = fs01/fa01; |
|
fd10 = fs10/fa10; |
|
fd11 = fs11/fa11; |
If I disable the NEON feature, the test passes
[ RUN ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/0, where GetParam() = (CV_8U, false)
[ OK ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/0 (260 ms)
[ RUN ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/1, where GetParam() = (CV_8U, true)
[ OK ] OCL_ImgProc/CvtColor8u.mRGBA2RGBA/1 (3 ms)
I believe it's close enough to loosen the eps.
|
#ifdef HAVE_IPP |
|
#define IPP_EPS depth <= CV_32S ? 1 : 1e-3 |
|
#else |
|
#define IPP_EPS 1e-3 |
|
#endif |
|
|
|
OCL_TEST_P(CvtColor8u, RGBA2mRGBA) { performTest(4, 4, CVTCODE(RGBA2mRGBA), IPP_EPS); } |
|
OCL_TEST_P(CvtColor8u, mRGBA2RGBA) { performTest(4, 4, CVTCODE(mRGBA2RGBA)); } |
One thing I'm not sure is how it behaves on aarch64.
At this moment, I don't have access to any of my Arm 64bit boards.
Let's just keep it for 32bit for now.
I'll send a patch later
Steps to reproduce
./opencv_test_imgproc --gtest_filter=*OCL*mRGBA2RGBA*
System information (version)
Detailed description
Two tests fail in
OCL_ImgProc/CvtColor8u.mRGBA2RGBAFull log is available here
This seems to be a rounding error, since there is a float operation in the color conversion code.
opencv/modules/imgproc/src/color_rgb.simd.hpp
Lines 1040 to 1044 in 57fae4a
If I disable the NEON feature, the test passes
I believe it's close enough to loosen the
eps.opencv/modules/imgproc/test/ocl/test_color.cpp
Lines 297 to 304 in 57fae4a
One thing I'm not sure is how it behaves on
aarch64.At this moment, I don't have access to any of my Arm 64bit boards.
Let's just keep it for 32bit for now.
I'll send a patch later
Steps to reproduce
./opencv_test_imgproc --gtest_filter=*OCL*mRGBA2RGBA*