刚刚安装了 SimpleCV 版本 1.3 Superpack (Python 2.7) 并尝试使用 SimpleCV 的实用计算机视觉中的 Hello Word 应用程序
from SimpleCV import Camera, Display, Image
import time
# Initialize the camera
cam = Camera()
# Initialize the display
display = Display()
# Snap a picture using the camera
img = cam.getImage()
在最后一行它失败了
OpenCV Error: Bad argument (Array should be CvMat or IplImage) in unknown function, file C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\array.cpp, line 1238
---------------------------------------------------------------------------
error Traceback (most recent call last)
C:\Python27\lib\site-packages\SimpleCV\Shell\Shell.pyc in <module>()
----> 1 img = cam.getImage()
C:\Python27\lib\site-packages\SimpleCV\Camera.pyc in getImage(self)
584
585 frame = cv.RetrieveFrame(self.capture)
--> 586 newimg = cv.CreateImage(cv.GetSize(frame), cv.IPL_DEPTH_8U, 3)
587 cv.Copy(frame, newimg)
588 return Image(newimg, self)
error: Array should be CvMat or IplImage
我在 Windows 7 PC 上通过 CL-Eye 驱动程序使用 PS3 Eye 相机。那是通过usb。否则相机工作正常。有什么想法可以解决这个问题吗?