OpenCV Error in Ubuntu W/Python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

OpenCV Error in Ubuntu W/Python

maxmorresi
Hi All,
I am trying to get my webcam to work using python, and found some great
links.
I followed these instructions to install OpenCV:
http://shankhs4u.blogspot.com/2009/01/how-to-install-opencv-in-ubuntu-80\
4810.html
<http://shankhs4u.blogspot.com/2009/01/how-to-install-opencv-in-ubuntu-8\
04810.html>

I also am using the sample code foudn here:
http://www.jperla.com/blog/2007/09/26/capturing-frames-from-a-webcam-on-\
linux/
<http://www.jperla.com/blog/2007/09/26/capturing-frames-from-a-webcam-on\
-linux/>

I believe this may be an OpenCV bug, but here is the error I am getting:
Traceback (most recent call last):
   File "example.py", line 29, in <module>
     im = get_image()
   File "example.py", line 14, in get_image
     im = opencv.cvGetMat(im)
   File "/var/lib/python-support/python2.5/opencv/cv.py", line 3826, in
cvGetMat
     return _cv.cvGetMat(*args)
RuntimeError:  openCV Error:
         Status=Null pointer
         function name=cvGetMat
         error message=NULL array pointer is passed
         file_name=cxarray.cpp
         line=2780


[Non-text portions of this message have been removed]