title: Cannot remove a Opencv drawing from Window
body: <p><strong>I have been searching through OpenCV Docs, but I was unable to find the answer to my problem</strong></p>
  
  <p><em>I want to remove all OpenCv prebuilt drawings from the image</em></p>
  
  <p><code>Here is an example:</code>
  <a href="https://i.stack.imgur.com/mcShk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mcShk.png" alt="enter image description here"></a></p>
  
  <p>with the following generic code:</p>
  
  <pre><code>import numpy as np
  import cv2
  # Create a black image
  img = np.zeros((512,512,3), np.uint8)
  # Draw a diagonal blue line with thickness of 5 px
  img = cv2.line(img,(0,0),(511,511),(255,0,0),5)
  
  while True:
      cv2.imshow('generic frame', img)
      if cv2.waitKey(1) &amp; 0xFF is ord('q'):
          break
  </code></pre>
  
  <p><strong>I want the output to be like this following image</strong>
  <a href="https://i.stack.imgur.com/Qg0nc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qg0nc.png" alt="enter image description here"></a></p>
  
  <p><code>The background needs to stay the same, without the OpenCv drawings</code></p>