I'm trying to run a program that has been running before. After a while I switched the OS and came back to Ubuntu 14.10 (before it was 14.04). I'm not quite shure if the problem is within openCV or more of a basic thing. I can't find the problem. Maybe someone of you has an idea.
import cv2
cap = cv2.VideoCapture(0)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Display the resulting frame
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
It is running to the point that i can see a video capture. But typing "q" to quit the program. The window that was opened freez, is turning black after a while and nothing else happens. Then I'l have to close the window and force it to exit. Any idea what the problem is and how to solve?