在使用raspistill指令时一直提示未找到命令应该怎么做,lucview 的安装又无法定位软件包
我在这个网页的评论找到了答案:
https://stackoverflow.com/questions/69907904/bash-raspistill-command-not-found/69919964#69919964?newreg=3de1cb1d9c404a07b3d127f0e73b7e71
我用的是树莓派4B和CSI摄像头,在用sudo raspi-config开启Camera的使能后,使用libcamera-still -o test.jpg就可以拍出照片了
输出如下:
pi@raspberrypi:~ $ libcamera-still -o test.jpg
Preview window unavailable
[0:19:53.507029031] [1993] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3156-f4070274
[0:19:53.573790504] [1993] INFO Camera camera.cpp:937 configuring streams: (0) 1296x972-YUV420
[0:19:53.574152572] [1995] INFO RPI raspberrypi.cpp:122 Mode: 2592x1944 fmt BG10 Score: 2067 (best 2067)
[0:19:53.574204243] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt BG10 Score: 1849.67 (best 1849.67)
[0:19:53.574239968] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1296x972 fmt BG10 Score: 1500 (best 1500)
[0:19:53.574272749] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt BG10 Score: 3796 (best 1500)
[0:19:53.574304918] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt BA81 Score: 4796 (best 1500)
[0:19:53.574338421] [1995] INFO RPI raspberrypi.cpp:122 Mode: 2592x1944 fmt pBAA Score: 1567 (best 1500)
[0:19:53.574371146] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt pBAA Score: 1349.67 (best 1349.67)
[0:19:53.574403741] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1296x972 fmt pBAA Score: 1000 (best 1000)
[0:19:53.574435836] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt pBAA Score: 3296 (best 1000)
[0:19:53.576249120] [1995] INFO RPI raspberrypi.cpp:620 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected mode: 1296x972-pBAA
[0:19:53.598938858] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Saturation = 1.000000
[0:19:53.599021105] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Contrast = 1.000000
[0:19:53.599055719] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Brightness = 0.000000
[0:19:53.599085926] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AwbMode = 0
[0:19:53.599115206] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Sharpness = 1.000000
[0:19:53.599146727] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: ExposureValue = 0.000000
[0:19:53.599196898] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeExposureMode = 0
[0:19:53.599236216] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: FrameDurationLimits = [ 33333, 33333 ]
[0:19:53.599279535] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeMeteringMode = 0
[0:19:53.599317890] [1999] INFO IPARPI raspberrypi.cpp:626 Request ctrl: NoiseReductionMode = 3
[0:19:53.601027609] [1995] INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:19:53.601062482] [1995] INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:19:53.601086003] [1995] INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:19:53.601107041] [1995] INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:19:53.673358110] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (7 left)
[0:19:53.718272120] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (6 left)
[0:19:53.751995775] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (5 left)
[0:19:53.785983619] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (4 left)
[0:19:53.818631960] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (3 left)
[0:19:53.855783498] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (2 left)
[0:19:53.885496775] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (1 left)
[0:19:53.918849806] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (0 left)
[0:19:58.701502876] [1993] INFO Camera camera.cpp:937 configuring streams: (0) 2592x1944-YUV420
[0:19:58.702086813] [1995] INFO RPI raspberrypi.cpp:122 Mode: 2592x1944 fmt BG10 Score: 1500 (best 1500)
[0:19:58.702186581] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt BG10 Score: 4738.67 (best 1500)
[0:19:58.702239419] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1296x972 fmt BG10 Score: 6036 (best 1500)
[0:19:58.702292793] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt BG10 Score: 8332 (best 1500)
[0:19:58.702344816] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt BA81 Score: 9332 (best 1500)
[0:19:58.702392524] [1995] INFO RPI raspberrypi.cpp:122 Mode: 2592x1944 fmt pBAA Score: 1000 (best 1000)
[0:19:58.702440157] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1920x1080 fmt pBAA Score: 4238.67 (best 1000)
[0:19:58.702486235] [1995] INFO RPI raspberrypi.cpp:122 Mode: 1296x972 fmt pBAA Score: 5536 (best 1000)
[0:19:58.702532572] [1995] INFO RPI raspberrypi.cpp:122 Mode: 640x480 fmt pBAA Score: 7832 (best 1000)
[0:19:58.703406052] [1995] INFO RPI raspberrypi.cpp:620 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected mode: 2592x1944-pBAA
[0:19:58.756511514] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Saturation = 1.000000
[0:19:58.756654878] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Contrast = 1.000000
[0:19:58.756703937] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Brightness = 0.000000
[0:19:58.756748682] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AwbMode = 0
[0:19:58.756790741] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: Sharpness = 1.000000
[0:19:58.756835967] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: ExposureValue = 0.000000
[0:19:58.756881026] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeExposureMode = 0
[0:19:58.756947791] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: FrameDurationLimits = [ 100, 1000000000 ]
[0:19:58.756997999] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: AeMeteringMode = 0
[0:19:58.757052262] [2001] INFO IPARPI raspberrypi.cpp:626 Request ctrl: NoiseReductionMode = 2
[0:19:58.760472990] [1995] INFO RPISTREAM rpi_stream.cpp:122 No buffers available for ISP Output0
[0:19:58.963090398] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (1 left)
[0:19:59.154571664] [1995] INFO RPI raspberrypi.cpp:1636 Dropping frame at the request of the IPA (0 left)
Still capture image received
https://blog.csdn.net/lanchunhui/article/details/79049023
MMAL (Multimedia Abstraction Layer)
RaspiCam Documentation
0. lucview 的安装
安装命令:sudo apt-get install luvcview
安装完成之后,便可使用 lucview 命令弹出实时拍摄窗口了
如果提示:ERROR opening V4L interface: No such file or directory,或找不到 /dev/video0,可按照:[Raspberry Pi] 解決 Raspberry Pi 找不到 /dev/video0 安装bcm2835-v4l2驱动;
1. 运行树莓派配置工具
sudo raspi-config
1
2. root 登陆
sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具,如halt,reboot,su等等。
初次使用树莓派系统时,默认用户名是 pi,密码为 raspberry。若想使用 root 账号,或者开启 root 用户,可通过 pi 用户登陆,执行:
sudo passwd root
1
此命令为 root 账户设置密码,切换到 root 管理员后,该命令无效。
然后解锁 root 用户:
sudo passwd --unlock root
1
此时便可切换 root 管理员:su root
1
3. raspistill:命令
树莓派进阶之路 (018) - raspberryPi摄像头命令行软件raspistill帮助文档
主要学习其参数及命令:
-w, –width : 设置图像宽度 <尺寸>
-h, –height : 设置图像高度 <尺寸>
-q, –quality : 设置jpeg品质
-t, –timeout : 拍照和关闭时的延时指定,未指定时默认是5s
-o, –output : 输出文件名 <文件名>,如果要写到stdout,使用-o -,如果不特别指定,图像文件不会被保存
4. 专业摄影与延时拍摄
曝光参数:
-ss:后跟的是微秒
-ss 9000000:9s
-ISO 125:感光
-ex verylong:焦距,无限远;
-awb off:自动白平衡,awb:auto white balance
-awbg 1,1
-bm(burst mode), –burst : 运行burst capture mode
-tl(–timelapse ):raspistill 进入 -tl 模式,则排到的便不是一副图像,而是通过一定的时间间隔的多幅图像;
raspistill -t 30000 -tl 2000 -o image%04d.jpg
1
Python爬虫全栈教学,零基础教你成编程大神
作者:Inside_Zhang
来源:CSDN
原文:https://blog.csdn.net/lanchunhui/article/details/79049023
版权声明:本文为博主原创文章,转载请附上博文链接!