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

<ul dir="auto">
<li>OpenCV =&gt; 4.5.4</li>
<li>Operating System / Platform =&gt; win10 LTSC 2021</li>
<li>Compiler =&gt; Visual Studio 2019</li>
<li>Python Version =&gt; 3.9.9</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<ul dir="auto">
<li>cv2.resize() function return cv2.error (-215:Assertion failed) _step &gt;= minstep in function 'cv::Mat::Mat'</li>
<li>opencv was compiled with cuda version 11.4.3, cudnn version 8.2.4 following tutorial from <a href="https://www.youtube.com/watch?v=HsuKxjQhFU0" rel="nofollow">YouTube</a></li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2
import numpy as np
origin_black = np.zeros((1, 1, 3), np.uint8)
cv2.resize(origin_black, (100, 100))"><pre class="notranslate"><code class="notranslate">import cv2
import numpy as np
origin_black = np.zeros((1, 1, 3), np.uint8)
cv2.resize(origin_black, (100, 100))
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(then it returns) cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:466: error: (-215:Assertion failed) _step &gt;= minstep in function 'cv::Mat::Mat'"><pre class="notranslate"><code class="notranslate">(then it returns) cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:466: error: (-215:Assertion failed) _step &gt;= minstep in function 'cv::Mat::Mat'
</code></pre></div>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I updated to latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.5.4-dev</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; precompiled from opencv-contrib-python-headless 4.5.4.58</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Issue encountered in python: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1038952137" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv-python/issues/575" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv-python/issues/575/hovercard" href="https://github.com/opencv/opencv-python/issues/575">opencv/opencv-python#575</a><br>
cvtColor should be able to convert a single pixel's color as it does in version 4.5.3</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2
import numpy as np

pixel = np.uint8([[[40, 50, 200]]])
new_pixel = cv2.cvtColor(pixel, cv2.COLOR_RGB2BGR)
print(new_pixel)"><pre class="notranslate"><code class="notranslate">import cv2
import numpy as np

pixel = np.uint8([[[40, 50, 200]]])
new_pixel = cv2.cvtColor(pixel, cv2.COLOR_RGB2BGR)
print(new_pixel)
</code></pre></div>
<p dir="auto">with OpenCV 4.5.3, this runs successfully. With OpenCV 4.5.4-dev, I get the following error:<br>
<code class="notranslate">OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matrix.cpp:466: error: (-215:Assertion failed) _step &gt;= minstep in function 'cv::Mat::Mat'</code></p>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>