Line 4: |
Line 4: |
| ===概述=== | | ===概述=== |
| CS-MIPI-X 摄像头模组理论上支持树莓派的所有型号,出于性能最优考虑,建议使用树莓派3以后的版本。本篇文章以树莓派4为例讲解CS-MIPI-X系列摄像头模组接入树莓派的方法。此外介绍了接入树莓派Computer Module与树莓派Zero应用中的特殊之处。 | | CS-MIPI-X 摄像头模组理论上支持树莓派的所有型号,出于性能最优考虑,建议使用树莓派3以后的版本。本篇文章以树莓派4为例讲解CS-MIPI-X系列摄像头模组接入树莓派的方法。此外介绍了接入树莓派Computer Module与树莓派Zero应用中的特殊之处。 |
| + | |
| + | === 关于piOS版本---Bullseye === |
| + | The latest system of Raspberry Pi - bullseye has removed the support of raspicam by default. But we still have 2 ways to use it. |
| + | |
| + | 最新版本的piOS——Bullseye默认去掉了raspicam的支持。但是我们依然有两种方法来使用。 |
| + | |
| + | * 1, 使用 legacy 版本的 piOS,也就是说,不升级到Bullseye。 |
| + | |
| + | https://www.raspberrypi.com/software/operating-systems/ |
| + | |
| + | * 2, 在Bullseye版本上,打开Open legacy camera的支持。我们已经升级了程序以适应这种应用。 |
| + | |
| + | <blockquote><u>If you want to add the legacy camera interfaces to Bullseye, please click your update icon in the taskbar to update. Then open a terminal (Ctrl-Alt-T) and type ‘sudo raspi-config’, go to ‘Interface Options’ and then ‘Legacy Camera’, and reboot. These camera interfaces are deprecated, and we are not supporting them going forwards.</u></blockquote>https://www.raspberrypi.com/news/new-old-functionality-with-raspberry-pi-os-legacy/ |
| + | |
| + | 使用如下命令查看当前系统版本: |
| + | |
| + | <code>lsb_release -a</code> |
| ===硬件准备及安装=== | | ===硬件准备及安装=== |
| 原材料:树莓派4,网线,Micro SD卡,树莓派电源线,HDMI显示器,FFC线,杜邦线,镜头,摄像头主板。 | | 原材料:树莓派4,网线,Micro SD卡,树莓派电源线,HDMI显示器,FFC线,杜邦线,镜头,摄像头主板。 |
Line 10: |
Line 27: |
| | | |
| *树莓派接好摄像头模组后,将烧录好树莓派系统的MicroSD卡插入卡槽,网线插入网线接口,HDMI显示器接入树莓派,电源线插入power接口,为树莓派接通电源。 | | *树莓派接好摄像头模组后,将烧录好树莓派系统的MicroSD卡插入卡槽,网线插入网线接口,HDMI显示器接入树莓派,电源线插入power接口,为树莓派接通电源。 |
− | *'''CS-MIPI-SC132默认供电方式为FFC排线3.3V供电,无需插红黑电源线。''' | + | *'''CS-MIPI-SC132、CS-MIPI-IMX307默认供电方式为FFC排线3.3V供电,无需插红黑电源线。''' |
| | | |
| [[File:CS-MIPI-IMX307树莓派连接图001.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 001 (CS-MIPI-IMX307 as an example)]] | | [[File:CS-MIPI-IMX307树莓派连接图001.jpg|center|thumb|600x600px|connect CS-MIPI-X to Raspberry Pi 001 (CS-MIPI-IMX307 as an example)]] |
Line 21: |
Line 38: |
| | | |
| ===树莓派系统安装及配置=== | | ===树莓派系统安装及配置=== |
− | 具体安装树莓派系统方法请参考官方文档,详见:[https://www.raspberrypi.org/documentation/installation/ Install raspberrypi guide] | + | 具体安装树莓派系统方法请参考官方文档,详见:[https://www.raspberrypi.org/documentation/installation/ Install raspberrypi guide]。 |
| | | |
| 接通电源后,树莓派系统启动,初始树莓派系统中Camera 和 I2C都处于未启用状态。开机后我们需要将其手动打开,执行命令 | | 接通电源后,树莓派系统启动,初始树莓派系统中Camera 和 I2C都处于未启用状态。开机后我们需要将其手动打开,执行命令 |
Line 153: |
Line 170: |
| | | |
| =====veye_raspistill 抓拍(JPG,bmp)===== | | =====veye_raspistill 抓拍(JPG,bmp)===== |
− | <code>./veye_raspistill -md 1 -o ~/test.jpg</code> | + | <code>./veye_raspistill -md 0 -o ~/test.jpg</code> |
| | | |
− | 实现抓拍一张图片,图片为1280*720,并保存,文件格式为jpg。
| + | 实现抓拍一张图片,图片为1920*1080,并保存,文件格式为jpg。 |
| | | |
| <code>./veye_raspistill -e bmp -tl 50 -t 1000 -o /dev/shm/test%d.bmp</code> | | <code>./veye_raspistill -e bmp -tl 50 -t 1000 -o /dev/shm/test%d.bmp</code> |
Line 261: |
Line 278: |
| 连续获取YUV数据并转为opencv格式,显示。 | | 连续获取YUV数据并转为opencv格式,显示。 |
| ===视频控制软件包使用=== | | ===视频控制软件包使用=== |
| + | 视频控制软件包实际上是一个i2c命令的shell脚本,在i2c_cmd目录下。 |
| + | |
| 对于树莓派,我们使用I2C-0作为控制总线。我们提供了一个脚本camera_i2c_config进行总线的管脚复用配置。 | | 对于树莓派,我们使用I2C-0作为控制总线。我们提供了一个脚本camera_i2c_config进行总线的管脚复用配置。 |
| | | |
| 具体使用说明请见:[[CS-MIPI-X i2c/zh|I2C脚本使用说明]] | | 具体使用说明请见:[[CS-MIPI-X i2c/zh|I2C脚本使用说明]] |
| | | |
− | <br />
| + | PS:新版本PiOS需要使用i2c-10,如果i2c-0不通,请尝试 -b 10。 |
| | | |
| ===关于树莓派Computer Module 和树莓派Zero使用的补充说明=== | | ===关于树莓派Computer Module 和树莓派Zero使用的补充说明=== |
| 请参考[[VEYE MIPI 290/327 for Raspberry Pi/zh#.E5.85.B3.E4.BA.8E.E6.A0.91.E8.8E.93.E6.B4.BEComputer Module .E5.92.8C.E6.A0.91.E8.8E.93.E6.B4.BEZero.E4.BD.BF.E7.94.A8.E7.9A.84.E8.A1.A5.E5.85.85.E8.AF.B4.E6.98.8E|关于树莓派Computer Module 和树莓派Zero使用的补充说明]]<br /> | | 请参考[[VEYE MIPI 290/327 for Raspberry Pi/zh#.E5.85.B3.E4.BA.8E.E6.A0.91.E8.8E.93.E6.B4.BEComputer Module .E5.92.8C.E6.A0.91.E8.8E.93.E6.B4.BEZero.E4.BD.BF.E7.94.A8.E7.9A.84.E8.A1.A5.E5.85.85.E8.AF.B4.E6.98.8E|关于树莓派Computer Module 和树莓派Zero使用的补充说明]]<br /> |