树莓派上可以找到摄像头驱动,但是在树莓派终端输入
raspistill -o image.jpg
,输出如下错误:
mmal: Cannot read camera info, keeping the defaults for OV5647mmal: mmal_vc_component_create: failed to create component \'vc.ril.camera\' (1:ENOMEM)mmal: mmal_component_create_core: could not create component \'vc.ril.camera\' (1)mmal: Failed to create camera componentmmal: main: Failed to create camera componentmmal: Camera is not detected. Please check carefully the camera module is installed correctly
其原因为使用的摄像头为USB摄像头,而raspistill命令只能用于CSI摄像头。对于USB接口的摄像头,可以通过调用fswebcam进行访问。
在树莓派终端输入
sudo apt-get install fswebcam
安装fswebcam。通过输入
sudo fswebcam image.jpg
进行拍照测试。使用方法可以通过输入
fswebcam -h
查询。