opencv-adaptors.py problem iniciating camera "must be called with a cv.CvMat!"
HI
I just starting to program a python script for use my fireware web cam.
I am using ubuntu 8.04
what I did is:
sudo modprobe raw1394
for load the module and
sudo chmod 666 /dev/raw1394
for add writing permission
so it was working before
but now I got this problem:
File "/var/lib/
raise TypeError, 'must be called with a cv.CvMat!'
TypeError: must be called with a cv.CvMat!
this is the script that I use in python for run the camera. I think the script is correct because it was working before.
#! /usr/bin/python
import opencv, pygame
from opencv import highgui
from pygame.locals import *
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
camera = highgui.
delay = 0
def get_image():
im = highgui.
#convert Ipl image to PIL image
return opencv.
im = get_image()
fps = 30.0
pygame.init()
window = pygame.
pygame.
screen = pygame.
while True:
events = pygame.event.get()
for event in events:
if event.type == QUIT or event.type == KEYDOWN:
im = get_image()
pg_img_temp = pygame.
pg_img = pygame.
screen.
pygame.
pygame.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu opencv Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Diego Diaz for more information if necessary.