How can one display an image using cv2 in Python
<p>I've been working with code to display frames from a movie. The bare bones of the code is as follows:</p>

<pre><code>import cv2
import matplotlib.pyplot as plt

# Read single frame avi
cap = cv2.VideoCapture('singleFrame.avi')
rval, frame = cap.read()

# Attempt to display using cv2 (doesn't work)
cv2.namedWindow("Input")
cv2.imshow("Input", frame)

#Display image using matplotlib (Works)
b,g,r = cv2.split(frame)
frame_rgb = cv2.merge((r,g,b))
plt.imshow(frame_rgb)
plt.title('Matplotlib') #Give this plot a title, 
                        #so I know it's from matplotlib and not cv2
plt.show()
</code></pre>

<p>Because I can display the image using matplotlib, I know that I'm successfully reading it in. </p>

<p>I don't understand why my creation of a window and attempt to show an image using cv2 doesn't work. No cv2 window ever appears. Oddly though, if I create a second cv2 window, the 'input' window appears, but it is only a blank/white window. </p>

<p>What am I missing here?</p>