Issue 1:
System information (version)

OpenCV => recent 3.4/master branch

Operating System / Platform => Jetson TX2 Ubuntu 16.04 64bit (Aarch64)

Compiler => gcc 5.4.0

Detailed description

Regression test fails on ARM platform

Note: Google Test filter = Objdetect_QRCode.regression*
[==========] Running 30 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 30 tests from Objdetect_QRCode
[ RUN ] Objdetect_QRCode.regression/0, where GetParam() = "version_1_down.jpg"
[ OK ] Objdetect_QRCode.regression/0 (608 ms)
[ RUN ] Objdetect_QRCode.regression/1, where GetParam() = "version_1_left.jpg"
[ OK ] Objdetect_QRCode.regression/1 (544 ms)
[ RUN ] Objdetect_QRCode.regression/2, where GetParam() = "version_1_right.jpg"
[ OK ] Objdetect_QRCode.regression/2 (537 ms)
[ RUN ] Objdetect_QRCode.regression/3, where GetParam() = "version_1_up.jpg"
[ OK ] Objdetect_QRCode.regression/3 (536 ms)
[ RUN ] Objdetect_QRCode.regression/4, where GetParam() = "version_1_top.jpg"
[ OK ] Objdetect_QRCode.regression/4 (551 ms)
[ RUN ] Objdetect_QRCode.regression/5, where GetParam() = "version_2_down.jpg"
[ OK ] Objdetect_QRCode.regression/5 (543 ms)
[ RUN ] Objdetect_QRCode.regression/6, where GetParam() = "version_2_left.jpg"
[ OK ] Objdetect_QRCode.regression/6 (553 ms)
[ RUN ] Objdetect_QRCode.regression/7, where GetParam() = "version_2_right.jpg"
/home/nvidia/opencv-fork/modules/objdetect/test/test_qrcode.cpp:71: Failure
Value of: decodeQRCode(src, corners, decoded_info, straight_barcode)
Actual: false
[ FAILED ] Objdetect_QRCode.regression/7, where GetParam() = "version_2_right.jpg" (486 ms)
[ RUN ] Objdetect_QRCode.regression/8, where GetParam() = "version_2_up.jpg"
/home/nvidia/opencv-fork/modules/objdetect/test/test_qrcode.cpp:71: Failure
Value of: decodeQRCode(src, corners, decoded_info, straight_barcode)
Actual: false
Expected: true
[ FAILED ] Objdetect_QRCode.regression/8, where GetParam() = "version_2_up.jpg" (529 ms)
[ RUN ] Objdetect_QRCode.regression/9, where GetParam() = "version_2_top.jpg"
/home/nvidia/opencv-fork/modules/objdetect/test/test_qrcode.cpp:71: Failure
Value of: decodeQRCode(src, corners, decoded_info, straight_barcode)
Actual: false
Expected: true
[ FAILED ] Objdetect_QRCode.regression/9, where GetParam() = "version_2_top.jpg" (491 ms)
[ RUN ] Objdetect_QRCode.regression/10, where GetParam() = "version_3_down.jpg"
/home/nvidia/opencv-fork/modules/objdetect/test/test_qrcode.cpp:71: Failure
Value of: decodeQRCode(src, corners, decoded_info, straight_barcode)
Actual: false
Expected: true
[ FAILED ] Objdetect_QRCode.regression/10, where GetParam() = "version_3_down.jpg" (535 ms)

Now, the failure was coming from two points

There was a magical hard coded offset here

opencv/modules/objdetect/src/qrcode.cpp

Line 884
in
ab2c16b

const Point delta_diff = Point(4, 4);

The input QR code resolution changes, so this offset delta_diff should be better updated, based on the QR code resolution.

Wrong order of remote_point here

opencv/modules/objdetect/src/qrcode.cpp

Lines 887 to 892
in
ab2c16b

if (norm(black_point - temp_remote) < norm(black_point - locations[i]))

{

const uint8_t value = intermediate.at<uint8_t>(temp_remote - delta_diff);

if (value == 0) { remote_point = temp_remote - delta_diff; }

else { remote_point = temp_remote; }

temp_remote = locations[i];

If the condition is taken, remote_point should be overwritten by locations[i], but in this order, it will be overwritten by "previous" locations[i]

Small difference, but it leads to regression test failure.

I'll send a PR later.

Now, No. 25 of the same regression test fails, but it seems that the reason is different.

I'd like to make it as a separate PR.

Steps to reproduce

Run opencv_test_objdetect on Jetson TX2

Issue 2:
System information (version)

OpenCV => 3.4.1

Operating System / Platform => CentOS 7

Compiler => GCC 4.8.5

Detailed description

Faced a compilation error when turned on verbose logging message:

In file included from opencv-3.4.1/modules/core/src/ocl.cpp:57:0:

/opencv-3.4.1/modules/core/src/ocl.cpp: In member function 'bool cv::ocl::Program::Impl::createFromBinary(const cv::ocl::Context&, const unsigned char*, size_t, cv::String&)':

/opencv-3.4.1/modules/core/src/ocl.cpp:3764:59: error: 'src_' was not declared in this scope

CV_LOG_VERBOSE(NULL, 0, "Load from binary... " << src_.getImpl()->module_.c_str() << "/" << src.getImpl()->name_.c_str());

Steps to reproduce

Set log strip level higher than verbose in logger.hpp and build openCV:

#define CV_LOG_STRIP_LEVEL CV_LOG_LEVEL_VERBOSE + 1