<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.3.0</li>
<li>Operating System / Platform =&gt; Ubuntu 20.04 LTS (64 bit)</li>
<li>Interpreter =&gt; Python 3.8.2</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Python
import cv2

img = cv2.imread('./lena.jpg', 1)

cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()"><pre class="notranslate"><code class="notranslate"># Python
import cv2

img = cv2.imread('./lena.jpg', 1)

cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
</code></pre></div>
<ul dir="auto">
<li>The above code is not working properly.</li>
<li>Sometimes a new window is opening with a dark small background.</li>
<li>Screenshot of the same has been attached.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/57290210/89702491-67834c80-d95f-11ea-8015-83972238774d.png"><img src="https://user-images.githubusercontent.com/57290210/89702491-67834c80-d95f-11ea-8015-83972238774d.png" alt="Screenshot from 2020-08-08 09-52-57" style="max-width: 100%;"></a></li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">According to me, the method <code class="notranslate">cv2.imshow()</code> is not working properly.<br>
Fixing the method would work.</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>
answers.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"> There is reproducer code and related data files: videos, images, onnx, etc</li>
</ul>
<h3 dir="auto">Expected behaviour</h3>
<p dir="auto">imshow displays image</p>
<h3 dir="auto">Actual behaviour</h3>
<p dir="auto">when calling cv2.imshow(), I mostly get a small window with the correct name but containing only a black screen. It does work sometimes however but it is unpredictable. This issue was not encountered in previous versions of opencv-contrib-python.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43655410/87697368-9e4ab600-c757-11ea-98b9-d88afcdc83d5.png"><img src="https://user-images.githubusercontent.com/43655410/87697368-9e4ab600-c757-11ea-98b9-d88afcdc83d5.png" alt="error" style="max-width: 100%;"></a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ul dir="auto">
<li>example code</li>
</ul>
<p dir="auto">import cv2<br>
import os<br>
import imutils</p>
<p dir="auto">image = cv2.imread("ref_image.png")</p>
<p dir="auto">cv2.imshow("test", image)<br>
cv2.waitKey(0)</p>
<p dir="auto">cv2.destroyAllWindows()</p>
<ul dir="auto">
<li>operating system : Ubuntu 20.04</li>
<li>architecture (e.g. x86): x64</li>
<li>python version: 3.8</li>
<li>opencv-python version: opencv-contrib-python 4.3.36</li>
</ul>