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

<ul dir="auto">
<li>OpenCV =&gt; 3.4 and master</li>
<li>Operating System / Platform =&gt;  ppc64le GNU/Linux</li>
<li>Compiler =&gt; gcc</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'cv::hal_baseline::v_uint8x16 cv::hal_baseline::operator&lt;&lt;(const cv::hal_baseline::v_uint8x16&amp;, int)':
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:18:77: warning: narrowing conversion of 'imm' from 'int' to 'unsigned char' inside { } [-Wnarrowing]
 #define __VSX_S16__(c, v) (c){v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v}
                                                                             ^
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:25:31: note: in expansion of macro '__VSX_S16__'
 #define vec_uchar16_sp(c)    (__VSX_S16__(vec_uchar16, c))
                               ^~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:533:31: note: in expansion of macro 'vec_uchar16_sp'
 { return _Tpvec(vec_sl(a.val, splfunc(imm))); }              \
                               ^~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:541:1: note: in expansion of macro 'OPENCV_HAL_IMPL_VSX_SHIFT_OP'
 OPENCV_HAL_IMPL_VSX_SHIFT_OP(v_uint8x16, vec_sr, vec_uchar16_sp)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:18:77: warning: narrowing conversion of 'imm' from 'int' to 'unsigned char' inside { } [-Wnarrowing]
 #define __VSX_S16__(c, v) (c){v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v}
                                                                             ^
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:25:31: note: in expansion of macro '__VSX_S16__'
 #define vec_uchar16_sp(c)    (__VSX_S16__(vec_uchar16, c))
                               ^~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:533:31: note: in expansion of macro 'vec_uchar16_sp'
 { return _Tpvec(vec_sl(a.val, splfunc(imm))); }              \
                               ^~~~~~~
...."><pre class="notranslate"><code class="notranslate">/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp: In function 'cv::hal_baseline::v_uint8x16 cv::hal_baseline::operator&lt;&lt;(const cv::hal_baseline::v_uint8x16&amp;, int)':
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:18:77: warning: narrowing conversion of 'imm' from 'int' to 'unsigned char' inside { } [-Wnarrowing]
 #define __VSX_S16__(c, v) (c){v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v}
                                                                             ^
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:25:31: note: in expansion of macro '__VSX_S16__'
 #define vec_uchar16_sp(c)    (__VSX_S16__(vec_uchar16, c))
                               ^~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:533:31: note: in expansion of macro 'vec_uchar16_sp'
 { return _Tpvec(vec_sl(a.val, splfunc(imm))); }              \
                               ^~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:541:1: note: in expansion of macro 'OPENCV_HAL_IMPL_VSX_SHIFT_OP'
 OPENCV_HAL_IMPL_VSX_SHIFT_OP(v_uint8x16, vec_sr, vec_uchar16_sp)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:18:77: warning: narrowing conversion of 'imm' from 'int' to 'unsigned char' inside { } [-Wnarrowing]
 #define __VSX_S16__(c, v) (c){v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v}
                                                                             ^
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/vsx_utils.hpp:25:31: note: in expansion of macro '__VSX_S16__'
 #define vec_uchar16_sp(c)    (__VSX_S16__(vec_uchar16, c))
                               ^~~~~~~~~~~
/worker/buildbot/Power9_Linux_gcc-6__opencv/opencv/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:533:31: note: in expansion of macro 'vec_uchar16_sp'
 { return _Tpvec(vec_sl(a.val, splfunc(imm))); }              \
                               ^~~~~~~
....
</code></pre></div>
<p dir="auto">CI: <a href="https://ocv-power.imavr.com/#/builders/5/builds/23" rel="nofollow">https://ocv-power.imavr.com/#/builders/5/builds/23</a></p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">build OpenCV on ppc64le</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 3.4.1</li>
<li>Operating System / Platform =&gt; any</li>
<li>Compiler =&gt; any</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Several bugs were introduced as a fix of the issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143990198" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/6336" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/6336/hovercard" href="https://github.com/opencv/opencv/issues/6336">#6336</a>.  The issue reporter provided an erroneous example in which a camera matrix of a scaled image was computed by simply multiplying the matrix with the scaling factor that was used to scale the image (see my comment in the <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143990198" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/6336" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/6336/hovercard" href="https://github.com/opencv/opencv/issues/6336">#6336</a>). OpenCV code for the mentioned functions (and all that depend upon) was correct up until that point and is now buggy and inconsistent.</p>
<p dir="auto">The following changes, <a class="commit-link" href="https://github.com/opencv/opencv/commit/a86a5c798ba8b82cefda7e68ce7086209340e4d0#diff-e0620279a9a42557449008a88b6ed816"><tt>a86a5c7</tt>#diff-e0620279a9a42557449008a88b6ed816</a> and <a class="commit-link" href="https://github.com/opencv/opencv/commit/fa42a1cfc2b0fce1d807f18f0ea26ba1e5753b80#diff-e0620279a9a42557449008a88b6ed816"><tt>fa42a1c</tt>#diff-e0620279a9a42557449008a88b6ed816</a> should be reverted. If anything else was changed because of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143990198" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/6336" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/6336/hovercard" href="https://github.com/opencv/opencv/issues/6336">#6336</a> - I only checked the calibration.cpp  - revert it as well.</p>
<p dir="auto">The bugs were partly caused by the lack of the documentation. To reduce false issue reports in the future, the origin of the image coordinate system should be noted in the calib3d documentation.</p>