title: Display a stream images in Google Colab using OpenCV
body: <p>I have a stream of images and have to display it in Google Colab notebook such that it looks like a video,  But what I get is a image under image ...</p>
  <pre><code>from google.colab import drive
  drive.mount('/content/drive')
  
  # importing cv2
  import cv2
  import imutils
  from google.colab.patches import cv2_imshow
  from IPython.display import clear_output
  import os
  
  folder = r'/content/drive/images/'
  
  for filename in os.listdir(folder) :
      VALID_FORMAT = (&quot;.jpg&quot;, &quot;.JPG&quot;, &quot;.jpeg&quot;, &quot;.JPEG&quot;, &quot;.png&quot;, &quot;.PNG&quot;)
      if filename.upper().endswith(VALID_FORMAT):
          path = folder + filename
          image = cv2.imread(path)
          # resize image
          frame = imutils.resize(image, width=1200)
          # show the image
          cv2_imshow(frame) 
          cv2.waitKey(20)
  </code></pre>