• 树莓派摄像头操作命令及流程


    第一步:开启摄像头模式

    在终端输入  sudo raspi-config  

    选择  Enable canmer

    然后finish

    然后方向键右右然后回车  退出config

    第二步:拍照片测试

    终端输入 raspistill -o testcapture.jpg 

    摄像头红灯开始闪烁,屏幕有五秒预览画面,第五秒的图像进行拍照

    附带的调整图像命令是

    raspistill -otestcapture.jpg -vf   使图像上下颠倒

    raspistill -otestcapture.jpg -hf   使图像左右颠倒

    -o将图像输出到了名为tescapture的JPEG文件中   还可以用如下命令改变调整格式

     Raspistill -o testcapture.png -e png    (改变为PNG格式)

     Raspistill -o testcapture.bmp -e bmp   (改变为BMP格式)

     Raspistill -o testcapture.gif -e gif     (改变为GIF格式)

    调整图像长宽的命令如下:、

     Raspistill -w 1920 -h 1080 -ofullhdcapture.jpg

    -w   宽度    -h   长度

    控制预览的延时命令如下:

     raspistill-t 10000 -o tensecondcapture.jpg    (单位为毫秒)

     raspistill-t 1 -o instancapture.jpg    (秒拍)

    此处缺少知道照片所存储的位置以及如何读取

    录制视频

    第一步:检查摄像头可用与否

    Raspivid -o testvideo.h246    格式只能是H.246   

    调整窗口大小 raspivid -w 1280 -h 720 -ofullhvideo.h246

    调整录制时间 raspivid -t 60000 -ominutelongvideo.h246

    第二步:使用shell脚本编写定时控制

    Mkdir timeplace            #创建文件

    Cd timeplace               #进入文件

    Nano timeplace.sh          #打开脚本,进入编辑

    输入如下:

    #!bin/bash                       #注释使用默认的bash 的shell

    #capture time-lapse images using raspistillapplication    #避免我们不知道自己在干嘛

    While true

    Do

        Flamename=’data+%Y%M%D%H%M%S’.jpg      #调用data   形成文件格式名称

    Raspistill -w 1920 -h 1080 -t 1 -o$filename         #拍照

    Echo Image captured                           #向控制台或终端输出打印信息

    Sleep 30  #单位  秒

    Done      #关闭循环

    第三步:修改文件权限

    Chmod +xtimeplace.sh

    第四步:执行命令

    ./timeplace.sh

    第一步:开启摄像头模式

    在终端输入  sudo raspi-config  

    选择  Enable canmer

    然后finish

    然后方向键右右然后回车  退出config

    第二步:拍照片测试

    终端输入 raspistill -o testcapture.jpg 

    摄像头红灯开始闪烁,屏幕有五秒预览画面,第五秒的图像进行拍照

    附带的调整图像命令是

    raspistill -otestcapture.jpg -vf   使图像上下颠倒

    raspistill -otestcapture.jpg -hf   使图像左右颠倒

    -o将图像输出到了名为tescapture的JPEG文件中   还可以用如下命令改变调整格式

     Raspistill -o testcapture.png -e png    (改变为PNG格式)

     Raspistill -o testcapture.bmp -e bmp   (改变为BMP格式)

     Raspistill -o testcapture.gif -e gif     (改变为GIF格式)

    调整图像长宽的命令如下:、

     Raspistill -w 1920 -h 1080 -ofullhdcapture.jpg

    -w   宽度    -h   长度

    控制预览的延时命令如下:

     raspistill-t 10000 -o tensecondcapture.jpg    (单位为毫秒)

     raspistill-t 1 -o instancapture.jpg    (秒拍)

    此处缺少知道照片所存储的位置以及如何读取

    录制视频

    第一步:检查摄像头可用与否

    Raspivid -o testvideo.h246    格式只能是H.246   

    调整窗口大小 raspivid -w 1280 -h 720 -ofullhvideo.h246

    调整录制时间 raspivid -t 60000 -ominutelongvideo.h246

    第二步:使用shell脚本编写定时控制

    Mkdir timeplace            #创建文件

    Cd timeplace               #进入文件

    Nano timeplace.sh          #打开脚本,进入编辑

    输入如下:

    #!bin/bash                       #注释使用默认的bash 的shell

    #capture time-lapse images using raspistillapplication    #避免我们不知道自己在干嘛

    While true

    Do

        Flamename=’data+%Y%M%D%H%M%S’.jpg      #调用data   形成文件格式名称

    Raspistill -w 1920 -h 1080 -t 1 -o$filename         #拍照

    Echo Image captured                           #向控制台或终端输出打印信息

    Sleep 30  #单位  秒

    Done      #关闭循环

    第三步:修改文件权限

    Chmod +xtimeplace.sh

    第四步:执行命令

    ./timeplace.sh
    ————————————————
    版权声明:本文为CSDN博主「qq_39705572」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_39705572/article/details/80800254

  • 相关阅读:
    Git clone The requested URL returned error: 403 错误
    创建DOTA2本地数据库(一)
    如何打开VPK文件?里面究竟有什么?
    DOTA 2 API(个人资料)
    新的博客,新的开始!
    你应该在开始API开发之前知道的事(下)(翻译)
    你应该在开始API开发之前知道的事(上)(翻译)
    DOTA 2 Match History WebAPI(翻译)
    C#中UnixTime和DateTime的转换(转载)
    搜查令中期总结
  • 原文地址:https://www.cnblogs.com/cloudrivers/p/11482441.html
Copyright © 2020-2023  润新知