嵌入式系统(3)- 树莓派DIY小车 - 摄像头的使用

1.基本设置

sudo raspi-config 命令,进入到树莓派基本设置界面

选择:

    5 Interfacing Options

然后选择

    Camera Enable

    SSH Enable

    VNC Enable

    SPI Enable

    I2C Enable

    Serial Enable

   1-Wire Enable

PS:

这里一开始只是将Camera Enable

然后发现无法进行拍照出现

报错

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

进行检查

vcgencmd get_camera

得到结果:

supported=1 detected=0

只能检测到有输入,但是不能识别设备

然后将后面的几项全部Enable,再进行检查

vcgencmd get_camera

得到结果:

supported=1 detected=1

2.拍摄

命令行执行

raspistill -o test.jpg

进行拍摄保存在当前目录

拍摄结果如下

参考资料:

树莓派Camera的基本使用姿势  https://www.aliyun.com/jiaocheng/132180.html

树莓派3 B+ 的摄像头简单使用(video-streamer) http://www.mamicode.com/info-detail-2018954.html

树莓派 3B 发现不了摄像头 https://www.v2ex.com/t/384312

猜你喜欢

转载自blog.csdn.net/Game_Builder/article/details/83756920