Line 54:
Line 54:
此外,在[https://github.com/veyeimaging/rk356x_firefly/releases releases]中,提供了编译好的linux内核安装包以及Android系统镜像。
此外,在[https://github.com/veyeimaging/rk356x_firefly/releases releases]中,提供了编译好的linux内核安装包以及Android系统镜像。
−
== Ubuntu系统 ==
+
=== Ubuntu系统 ===
−
=== 更新Firefly主板的Ubuntu系统 ===
+
==== 更新Firefly主板的Ubuntu系统 ====
−
==== 概述 ====
+
===== 概述 =====
本章节描述怎样更新RK35xx系统以支持我们的摄像头模组。
本章节描述怎样更新RK35xx系统以支持我们的摄像头模组。
Line 65:
Line 65:
尽管我们现在以Ubuntu系统为例进行介绍,其他linux发行版也可以参考本文。
尽管我们现在以Ubuntu系统为例进行介绍,其他linux发行版也可以参考本文。
−
==== 烧写Firefly官方标准系统 ====
+
===== 烧写Firefly官方标准系统 =====
参考Firefly[https://wiki.t-firefly.com/zh_CN/ROC-RK3566-PC/01-bootmode.html 文档],烧写标准系统。
参考Firefly[https://wiki.t-firefly.com/zh_CN/ROC-RK3566-PC/01-bootmode.html 文档],烧写标准系统。
−
==== 使用编译好的debain安装包 ====
+
===== 使用编译好的debain安装包 =====
在RK35xx板子上,执行:
在RK35xx板子上,执行:
Line 81:
Line 81:
如果版本不匹配,需要从源代码进行编译。
如果版本不匹配,需要从源代码进行编译。
−
=== 系统状态检测 ===
+
==== 系统状态检测 ====
完成系统安装后,在Firefly板端执行以下命令来检测是否正确连接摄像头。
完成系统安装后,在Firefly板端执行以下命令来检测是否正确连接摄像头。
Line 104:
Line 104:
正确识别摄像头之后,MIPI-CSI2接口的摄像头挂载到i2c-4,识别为/dev/video0。
正确识别摄像头之后,MIPI-CSI2接口的摄像头挂载到i2c-4,识别为/dev/video0。
−
=== 应用范例 ===
+
==== 应用范例 ====
−
==== v4l2-ctl ====
+
===== v4l2-ctl =====
−
=====安装v4l2-utils=====
+
======安装v4l2-utils======
<code>sudo apt-get install v4l-utils</code>
<code>sudo apt-get install v4l-utils</code>
−
=====列出相机支持的数据格式=====
+
======列出相机支持的数据格式======
<code>v4l2-ctl --list-formats-ext</code>
<code>v4l2-ctl --list-formats-ext</code>
−
===== 抓取图片 =====
+
====== 抓取图片 ======
<code>v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --stream-to=uyvy-1920x1080.yuv</code>
<code>v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --stream-to=uyvy-1920x1080.yuv</code>
Line 121:
Line 121:
<code>ffplay -f rawvideo -video_size 1920x1080 -pix_fmt nv12 nv12-1920x1080.yuv</code>
<code>ffplay -f rawvideo -video_size 1920x1080 -pix_fmt nv12 nv12-1920x1080.yuv</code>
−
===== 查看帧率 =====
+
====== 查看帧率 ======
<code>v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code>
<code>v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code>
−
==== yavta示例 ====
+
===== yavta示例 =====
<code>git clone <nowiki>https://github.com/veyeimaging/yavta.git</nowiki></code>
<code>git clone <nowiki>https://github.com/veyeimaging/yavta.git</nowiki></code>
Line 131:
Line 131:
<code>./yavta -c1 -Fuyvy-1920x1080.yuv --skip 0 -f UYVY -s 1920x1080 /dev/video0</code>
<code>./yavta -c1 -Fuyvy-1920x1080.yuv --skip 0 -f UYVY -s 1920x1080 /dev/video0</code>
−
==== gstreamer应用范例 ====
+
===== gstreamer应用范例 =====
我们提供了几个gstreamer例程,实现了预览,抓拍,录像等功能。详见github上的[https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples]目录。
我们提供了几个gstreamer例程,实现了预览,抓拍,录像等功能。详见github上的[https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples]目录。
−
==== OpenCV的导入 ====
+
===== OpenCV的导入 =====
首先安装OpenCV:
首先安装OpenCV:
Line 142:
Line 142:
此外,Firefly的这个[https://wiki.t-firefly.com/zh_CN/Firefly-Linux-Guide/demo_OpenCV_support.html 页面]也有一定的参考价值。
此外,Firefly的这个[https://wiki.t-firefly.com/zh_CN/Firefly-Linux-Guide/demo_OpenCV_support.html 页面]也有一定的参考价值。
+
==== 从源码编译驱动和dtb ====
+
https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/drivers
−
== Android系统 ==
+
=== Android系统 ===
=== i2c脚本使用说明 ===
=== i2c脚本使用说明 ===
Line 155:
Line 157:
[[CS-MIPI-X for Raspberry Pi/zh|CS系列参数控制软件包使用说明]]
[[CS-MIPI-X for Raspberry Pi/zh|CS系列参数控制软件包使用说明]]
−
=== 从源码编译驱动和dtb ===
+
−
https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/drivers
+
<br />
=== 参考资料 ===
=== 参考资料 ===