我已经从here安装了uv4l raspicam驱动程序(rasberrypi相机csi相机模块的驱动程序)。安装后,我按照this discussion删除了使用simplecv时的视频预览,并将640x480设置为分辨率。它可以工作,但是现在我有一些问题来设置simplecv中的相机属性,比如宽度和高度。当我跑步时:

from SimpleCV import *
c = Camera()
im = c.getImage()

im.show()

它作为64x64窗口运行,而不是640x480。所以,here用户解决了这个问题,但是当我用以下方法更改代码时:
from SimpleCV import *
    c = Camera(prop_set={"width":640,"height":480})
    im = c.getImage()

    im.show()

它返回一个错误:
[0]
WARNING: caught exception: SystemError('/dev/video0 does not support streaming i/o',)
WARNING: SimpleCV can't seem to find a camera on your system, or the drivers do not work with SimpleCV.
Traceback (most recent call last):
File "/home/pi/Desktop/sorgenti/Simple_CV_acq.py", line 17, in <module>
im = c.getImage()
File "/home/pi/Code/SimpleCV/SimpleCV/Camera.py", line 618, in getImage
cv.GrabFrame(self.capture)
TypeError: Expected CvCapture for argument 'capture'
如何在simplecv中设置cam的属性?

最佳答案

您需要导出环境变量。

export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so

关于python - 使用uv4l raspicam驱动程序设置SimpleCV,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27232494/

10-09 08:45