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

<ul dir="auto">
<li>OpenCV =&gt; 4.1.0 (opencv-contrib-python)</li>
<li>Operating System / Platform =&gt; Ubuntu 18</li>
<li>Compiler =&gt; VSCode</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">The rows are getting switched when I assign them to variables.<br>
<code class="notranslate">cv2.rectangle()</code> requires top left then bottom right so I know which ones these are in my bbox[] list and can draw the rectangle.  However when I try to use the same coordinates for slicing, my <code class="notranslate">y</code>'s (which I assigned <code class="notranslate">y1 = bbox[3]</code>, <code class="notranslate">y2=bbox[1]</code> are reversed with y1 being a larger integer than <code class="notranslate">y2</code>  so I have to slice using <code class="notranslate">y2:y1</code> instead.  I am pretty sure that I printed out <code class="notranslate">bbox[]</code> 0 to 3 as well and it was the same so not sure why those coordinates work for both <code class="notranslate">cv2.rectange()</code> and <code class="notranslate">plt.Rectangle()</code> but then not for slicing in this case.<br>
I posted on datasciencestackexchange about it:  <a href="https://datascience.stackexchange.com/questions/58308/unexplainable-reversal-of-x-y-coordinates-in-numpy-image-array?noredirect=1#comment63897_58308" rel="nofollow">https://datascience.stackexchange.com/questions/58308/unexplainable-reversal-of-x-y-coordinates-in-numpy-image-array?noredirect=1#comment63897_58308</a></p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">python code, please look at cv2.rectangle() at the bottom of the function so you know what top left and bottom  of bbox are:</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 4.0.0-dev</li>
<li>Operating System / Platform =&gt; Windows 10</li>
<li>Compiler =&gt; MS Visual Studio 2017 v 15.9.4</li>
<li>CUDA v 10</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">Building openCV with contrib, CUDA, MKL, TBB, VTK, Qt, Eigen and Gstreamer.<br>
VS sln file gets created without a problem using cmake.<br>
Building the INSTALL project causes some projects to fail and going through the debug information, I found the errors you see below</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(535): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(584): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(674): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(751): error : dynamic initialization is not supported for a __constant__ variable"><pre class="notranslate"><code class="notranslate">1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(535): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(584): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(674): error : dynamic initialization is not supported for a __constant__ variable
1&gt;
1&gt;c:\software\opencv\opencv\modules\core\include\opencv2\core\cuda\detail/color_detail.hpp(751): error : dynamic initialization is not supported for a __constant__ variable
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">CMake generates .sln file without a problem. Everything seemed fine. But building the INSTALL project causes some of the subprokects to fail mostly because of the error you see above.</p>