Error when using VirtualCamera

asked 2012-09-13 14:53:16 -0500

anonymous user

Anonymous

Hi,

I'm relatively new to OpenCV and I can't work my way out of this error. On Google I also didn't get a good result.

The problem: When I try to use VirtualCamera (both with images and videos) I get an error when using the method live() or getImage(). I tried multiple videos with different codecs which all play in VLC and several images.

Code:

from SimpleCV import *

vir = Camera()

vir.getImage().show()

Error:

ERROR:
Traceback (most recent call last):
  File "helloworld.py", line 5, in <module>
    vir.getImage().show()
  File "C:\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 5448, in sho
w
    self.save(d)
  File "C:\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 1984, in sav
e
    saveimg = saveimg.toBGR()
  File "C:\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 1196, in toB
GR
    cv.CvtColor(self.getBitmap(), retVal, cv.CV_RGB2BGR)
TypeError: CvArr argument 'src' must be IplImage, CvMat or CvMatND. Use fromarra
y() to convert numpy arrays to CvMat or cvMatND

What is it that I'm doing wrong?

Thank you in advance!

edit retag flag offensive close merge delete