樹莓派上可以找到攝像頭驅動,但是在樹莓派終端輸入raspistill -o image.jpg,輸出如下錯誤:
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: 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 component
mmal: main: Failed to create camera component
mmal: 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查詢。