<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; recent 3.4/master branch</li>
<li>Operating System / Platform =&gt; Jetson TX2 Ubuntu 16.04 64bit (Aarch64)</li>
<li>Compiler =&gt; gcc 5.4.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Regression test fails on ARM platform</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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() = &quot;version_1_down.jpg&quot;
[       OK ] Objdetect_QRCode.regression/0 (608 ms)
[ RUN      ] Objdetect_QRCode.regression/1, where GetParam() = &quot;version_1_left.jpg&quot;
[       OK ] Objdetect_QRCode.regression/1 (544 ms)
[ RUN      ] Objdetect_QRCode.regression/2, where GetParam() = &quot;version_1_right.jpg&quot;
[       OK ] Objdetect_QRCode.regression/2 (537 ms)
[ RUN      ] Objdetect_QRCode.regression/3, where GetParam() = &quot;version_1_up.jpg&quot;
[       OK ] Objdetect_QRCode.regression/3 (536 ms)
[ RUN      ] Objdetect_QRCode.regression/4, where GetParam() = &quot;version_1_top.jpg&quot;
[       OK ] Objdetect_QRCode.regression/4 (551 ms)
[ RUN      ] Objdetect_QRCode.regression/5, where GetParam() = &quot;version_2_down.jpg&quot;
[       OK ] Objdetect_QRCode.regression/5 (543 ms)
[ RUN      ] Objdetect_QRCode.regression/6, where GetParam() = &quot;version_2_left.jpg&quot;
[       OK ] Objdetect_QRCode.regression/6 (553 ms)
[ RUN      ] Objdetect_QRCode.regression/7, where GetParam() = &quot;version_2_right.jpg&quot;
/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() = &quot;version_2_right.jpg&quot; (486 ms)
[ RUN      ] Objdetect_QRCode.regression/8, where GetParam() = &quot;version_2_up.jpg&quot;
/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() = &quot;version_2_up.jpg&quot; (529 ms)
[ RUN      ] Objdetect_QRCode.regression/9, where GetParam() = &quot;version_2_top.jpg&quot;
/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() = &quot;version_2_top.jpg&quot; (491 ms)
[ RUN      ] Objdetect_QRCode.regression/10, where GetParam() = &quot;version_3_down.jpg&quot;
/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() = &quot;version_3_down.jpg&quot; (535 ms)"><pre class="notranslate"><code class="notranslate">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)
</code></pre></div>
<p dir="auto">Now, the failure was coming from two points</p>
<ol dir="auto">
<li>
<p dir="auto">There was a magical hard coded offset <a href="https://github.com/opencv/opencv/blob/ab2c16b2e55acaf193815e43475eb11670c45d60/modules/objdetect/src/qrcode.cpp#L884">here</a><br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/opencv/opencv/blob/ab2c16b2e55acaf193815e43475eb11670c45d60/modules/objdetect/src/qrcode.cpp#L884">opencv/modules/objdetect/src/qrcode.cpp</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 884
      in
      <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/ab2c16b2e55acaf193815e43475eb11670c45d60">ab2c16b</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L884" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="884"></td>
          <td id="LC884" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-c1">Point</span> delta_diff = <span class="pl-c1">Point</span>(<span class="pl-c1">4</span>, <span class="pl-c1">4</span>); </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
The input QR code resolution changes, so this offset <code class="notranslate">delta_diff</code> should be better updated, based on the QR code resolution.<p></p>
</li>
<li>
<p dir="auto">Wrong order of <code class="notranslate">remote_point</code> <a href="https://github.com/opencv/opencv/blob/ab2c16b2e55acaf193815e43475eb11670c45d60/modules/objdetect/src/qrcode.cpp#L887-L892">here</a><br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/opencv/opencv/blob/ab2c16b2e55acaf193815e43475eb11670c45d60/modules/objdetect/src/qrcode.cpp#L887-L892">opencv/modules/objdetect/src/qrcode.cpp</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 887 to 892
      in
      <a data-pjax="true" class="commit-tease-sha" href="/opencv/opencv/commit/ab2c16b2e55acaf193815e43475eb11670c45d60">ab2c16b</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L887" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="887"></td>
          <td id="LC887" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-c1">norm</span>(black_point - temp_remote) &lt;  <span class="pl-c1">norm</span>(black_point - locations[i])) </td>
        </tr>

        <tr class="border-0">
          <td id="L888" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="888"></td>
          <td id="LC888" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> { </td>
        </tr>

        <tr class="border-0">
          <td id="L889" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="889"></td>
          <td id="LC889" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">const</span> <span class="pl-c1">uint8_t</span> value = intermediate.<span class="pl-smi">at</span>&lt;<span class="pl-c1">uint8_t</span>&gt;(temp_remote - delta_diff); </td>
        </tr>

        <tr class="border-0">
          <td id="L890" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="890"></td>
          <td id="LC890" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">if</span> (value == <span class="pl-c1">0</span>) { remote_point = temp_remote - delta_diff; } </td>
        </tr>

        <tr class="border-0">
          <td id="L891" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="891"></td>
          <td id="LC891" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">else</span> { remote_point = temp_remote; } </td>
        </tr>

        <tr class="border-0">
          <td id="L892" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="892"></td>
          <td id="LC892" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     temp_remote = locations[i]; </td>
        </tr>
    </tbody></table>
  </div>
</div>
<br>
If the condition is taken, <code class="notranslate">remote_point</code> should be overwritten by <code class="notranslate">locations[i]</code>, but in this order, it will be overwritten by "previous" <code class="notranslate">locations[i]</code><p></p>
</li>
</ol>
<p dir="auto">Small difference, but it leads to regression test failure.<br>
I'll send a PR later.</p>
<p dir="auto">Now, No. 25 of the same regression test fails, but it seems that the reason is different.<br>
I'd like to make it as a separate PR.</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Run <code class="notranslate">opencv_test_objdetect</code> on Jetson TX2</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 3.4.1</li>
<li>Operating System / Platform =&gt; CentOS 7</li>
<li>Compiler =&gt; GCC 4.8.5</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Faced a compilation error when turned on verbose logging message:</p>
<p dir="auto"><strong>In file included from opencv-3.4.1/modules/core/src/ocl.cpp:57:0:</strong><br>
<strong>/opencv-3.4.1/modules/core/src/ocl.cpp:</strong> In member function 'bool cv::ocl::Program::Impl::createFromBinary(const cv::ocl::Context&amp;, const unsigned char*, size_t, cv::String&amp;)':<br>
<strong>/opencv-3.4.1/modules/core/src/ocl.cpp:3764:59:</strong> error: 'src_' was not declared in this scope<br>
CV_LOG_VERBOSE(NULL, 0, "Load from binary... " &lt;&lt; src_.getImpl()-&gt;module_.c_str() &lt;&lt; "/" &lt;&lt; src.getImpl()-&gt;name_.c_str());</p>

<h5 dir="auto">Steps to reproduce</h5>

<p dir="auto">Set log strip level higher than verbose in logger.hpp and build openCV:</p>
<p dir="auto"><code class="notranslate">#define CV_LOG_STRIP_LEVEL CV_LOG_LEVEL_VERBOSE + 1</code></p>