Ask Your Question

maldridge's profile - activity

2018-07-18 01:23:57 -0600 received badge  Popular Question (source)
2012-12-22 10:53:23 -0600 commented answer imshow in python

Thank you for this answer, it works now. Although I must say, that isn't very clear in the online help pages.

2012-12-22 10:52:42 -0600 received badge  Scholar (source)
2012-12-22 10:52:39 -0600 received badge  Supporter (source)
2012-12-21 23:02:58 -0600 asked a question imshow in python

I am having immense trouble getting a program I wrote with cv to work with cv2. This is a simple webcam viewer that grabs camera 0 and displays the incoming frames to the user. I have the versions of python and opencv that are in the repo's and available by typing apt-get install python python-opencv.

I consistently get this error: TypeError: <unknown> is not a numpy array

Here is the code that causes that error:

#!/usr/bin/env python

import cv2

capture=cv2.VideoCapture(0)
cv2.waitKey(200)
frame = capture.read()
grey = frame

while True:
    frame = capture.read()
    cv2.imshow("image", frame)

Any help is appreciated, I eagerly await suggestions.