Line 1: |
Line 1: |
− | '''<big>How to use VEYE and CS series cameras on Radxa's RK35XX board</big>''' | + | '''<big>How to use VEYE series cameras on Radxa's RK35XX board</big>''' |
| | | |
| [[VEYE CS Camera on Radxa Boards/zh|查看中文]] | | [[VEYE CS Camera on Radxa Boards/zh|查看中文]] |
Line 26: |
Line 26: |
| ===Hardware Setup=== | | ===Hardware Setup=== |
| Radxa ZERO 3W provides a 22-pin connector compatible with Raspberry Pi, allowing our camera to be installed on its motherboard without the need for an adapter board. | | Radxa ZERO 3W provides a 22-pin connector compatible with Raspberry Pi, allowing our camera to be installed on its motherboard without the need for an adapter board. |
− | ====Connection of camera and ADP-TRadxa==== | + | ====Connection of Camera and Radxa ZERO 3W Board==== |
− | The two are connected using 1.0 mm pitch*15P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside.[[File:VEYE-MIPI-327S-ADP-Tfirefly 06.jpg|link=http://wiki.veye.cc/index.php/File:VEYE-MIPI-327S-ADP-Tfirefly%2006.jpg|center|thumb|800x800px|VEYE camera connect to ADP-TRadxa]] | + | |
− | ====Connection of ADP-TRadxa and Radxa Board====
| + | The two are connected using 1.0 mm pitch*15P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside. |
− | The two are connected using 0.5 mm pitch*30P FFC cable with same direction. The cable must be inserted with the silver contacts facing inside.[[File:VEYE-MIPI-327S-ADP-Tfirefly 05.jpg|link=http://wiki.veye.cc/index.php/File:VEYE-MIPI-327S-ADP-Tfirefly%2005.jpg|center|thumb|800x800px|ADP-TRadxa connect to Radxa board]]
| + | |
− | ====Overall connection====
| + | Both use a 15-to-22-pin FFC cable for connection, ensuring that the silver contact surface faces outward. |
− | [[File:VEYE-MIPI-327S-ADP-Tfirefly 04.jpg|link=http://wiki.veye.cc/index.php/File:VEYE-MIPI-327S-ADP-Tfirefly%2004.jpg|center|thumb|800x800px|Radxa Board and VEYE camera overall]]
| + | [[File:VEYE camera connect to Radxa ZERO 3W.jpg|link=http://wiki.veye.cc/index.php/File:VEYE%20camera%20connect%20to%20Radxa%20ZERO%203W.jpg|center|thumb|800x800px|VEYE camera connect to Radxa ZERO 3W]] |
− | ====FPD-Link III Camera Connection Diagram====
| + | <br /> |
− | [[File:FPDLINK Camera to RK3588S.png|center|thumb|800x800px|FPDLINK Camera to RK3588S|link=http://wiki.veye.cc/index.php/File:FPDLINK_Camera_to_RK3588S.png]]<br />
| |
| ===Introduction to github repositories=== | | ===Introduction to github repositories=== |
− | [https://github.com/veyeimaging/rk35xx_firefly https://github.com/veyeimaging/rk35xx_Radxa]
| + | https://github.com/veyeimaging/rk35xx_radxa |
| | | |
| includes: | | includes: |
Line 43: |
Line 42: |
| *application demo | | *application demo |
| | | |
− | In addition, a compiled linux kernel installation package and Android image is provided in the [https://github.com/veyeimaging/rk356x_firefly/releases releases]. | + | In addition, a compiled linux kernel installation package is provided in the [https://github.com/veyeimaging/rk356x_radxa/releases releases]. |
− | ===Ubuntu===
| + | ====Upgrade Radxa Debain system==== |
− | ====Upgrade Radxa Ubuntu system(RK356x)==== | |
| =====Overview===== | | =====Overview===== |
| This section describes how to update the RK35xx system to support our camera modules. | | This section describes how to update the RK35xx system to support our camera modules. |
| | | |
− | For the kernel version 4.19, we provide a deb installation package that can be installed directly.
| + | We provide a deb installation package that can be installed directly. |
− | | |
− | For the kernel version 5.10, we provide a burning image.
| |
− | | |
− | For versions where no installer is provided, you will need to refer to later chapters to compile from the driver source code.
| |
− | | |
− | Although we are now using Ubuntu system as an example to introduce, other Linux distributions can also refer to this article.
| |
− | =====kernel version 5.10=====
| |
− | For the ROC-RK3588S-PC, we have provided an image of the release system.
| |
− | | |
− | Download the latest released image file corresponding to the camera model you are using from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/] .
| |
− | | |
− | Refer to the [https://wiki.t-firefly.com/en/ROC-RK3566-PC/03-upgrade_firmware.html Radxa documentation] to burn in a standard system.
| |
| =====kernel version 4.19===== | | =====kernel version 4.19===== |
| ======Burn Radxa standard system====== | | ======Burn Radxa standard system====== |
Line 72: |
Line 58: |
| Download the latest rk356x_Radxa_ubuntu.tar.gz from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/] . | | Download the latest rk356x_Radxa_ubuntu.tar.gz from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/] . |
| | | |
− | <code>tar -xavf rk356x_Radxa.tar.gz</code> | + | <code>tar -xavf rk356x_radxa_zero3w.tar.gz</code> |
| | | |
− | <code>cd rk356x_Radxa/released_images/ROC-RK3566-PC/ubuntu/</code> | + | <code>cd rk356x_radxa_zero3w/released_images/cam2m</code> |
| | | |
− | <code>sudo dpkg -i linux-image-4.19.232_4.19.232-21_arm64.deb</code> | + | <code>sudo dpkg -i linux-headers-5.10.160-36-rk356x_5.10.160-36_arm64_cam2m.deb</code> |
| | | |
− | If the version does not match, it needs to be compiled from the source code.
| + | <code>sudo dpkg -i linux-image-5.10.160-36-rk356x_5.10.160-36_arm64_cam2m.deb</code> |
− | ====Upgrade Radxa Ubuntu system(RK358x)====
| |
− | For the ROC-RK3588S-PC, we have provided an image of the release system.
| |
| | | |
− | Download the latest released image file corresponding to the camera model you are using from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/] .
| + | <code>sudo reboot</code> |
| | | |
− | Refer to the [https://wiki.t-firefly.com/en/ROC-RK3588S-PC/upgrade_bootmode.html Radxa documentation] to burn in a standard system.
| + | If the version does not match, it needs to be compiled from the source code. |
| ====Check system status==== | | ====Check system status==== |
| Run the following command to confirm whether the camera is probed. | | Run the following command to confirm whether the camera is probed. |
Line 90: |
Line 74: |
| *VEYE-MIPI-XXX | | *VEYE-MIPI-XXX |
| | | |
− | <code>dmesg | grep veye</code> | + | <code>sudo dmesg | grep veye</code> |
| | | |
| The output message appears as shown below: | | The output message appears as shown below: |
| | | |
− | <code>veyecam2m 4-003b: camera id is veyecam2m</code> | + | <code>veyecam2m 2-003b: camera id is veyecam2m</code> |
| | | |
− | <code>veyecam2m 4-003b: sensor is IMX327</code> | + | <code>veyecam2m 2-003b: sensor is IMX327</code> |
| | | |
| *Run the following command to check the presence of video node. | | *Run the following command to check the presence of video node. |
Line 106: |
Line 90: |
| <code>video0</code> | | <code>video0</code> |
| | | |
− | For ROC-RK3566-PC, the camera is connected to i2c-4, for ROC-RK3588S-PC to i2c-7. | + | For Radxa Zero 3W, the camera is connected to i2c-2. |
| ====Application examples==== | | ====Application examples==== |
| =====v4l2-ctl===== | | =====v4l2-ctl===== |
Line 120: |
Line 104: |
| <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> |
| | | |
− | Play YUV picture
| + | You can use software like YUV Player or Vooya to play the images. |
− | | |
− | <code>ffplay -f rawvideo -video_size 1920x1080 -pix_fmt nv12 nv12-1920x1080.yuv</code>
| |
| ======Check frame rate====== | | ======Check frame rate====== |
| <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> |
Line 139: |
Line 121: |
| | | |
| We provide several routines to import camera data into opencv. See the [https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples] directory on github for details. | | We provide several routines to import camera data into opencv. See the [https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples] directory on github for details. |
− |
| |
− | In addition, this [https://wiki.t-firefly.com/en/Firefly-Linux-Guide/demo_OpenCV_support.html page] from Radxa has some reference value.
| |
| ====Compile drivers and dtb from source code==== | | ====Compile drivers and dtb from source code==== |
| | | |
| *RK356x | | *RK356x |
| | | |
− | [https://github.com/veyeimaging/rk35xx_firefly/tree/main/linux/drivers/rk356x https://github.com/veyeimaging/rk35xx_Radxa/tree/main/linux/drivers/rk356x]
| + | https://github.com/veyeimaging/rk35xx_radxa/tree/main/linux/drivers/rk356x |
− | | |
− | *RK358x
| |
− | | |
− | [https://github.com/veyeimaging/rk35xx_firefly/tree/main/linux/drivers/rk358x https://github.com/veyeimaging/rk35xx_Radxa/tree/main/linux/drivers/rk358x]
| |
| ===i2c script for parameter configuration=== | | ===i2c script for parameter configuration=== |
| Because of the high degree of freedom of our camera parameters, we do not use V4L2 parameters to control, but use scripts to configure parameters. | | Because of the high degree of freedom of our camera parameters, we do not use V4L2 parameters to control, but use scripts to configure parameters. |
| | | |
− | [https://github.com/veyeimaging/rk35xx_firefly/tree/main/i2c_cmd https://github.com/veyeimaging/rk35xx_Radxa/tree/main/i2c_cmd]
| + | https://github.com/veyeimaging/rk35xx_radxa/tree/main/i2c_cmd |
| | | |
| using -b option to identify which bus you want to use. | | using -b option to identify which bus you want to use. |
Line 160: |
Line 136: |
| | | |
| Video Control Toolkits Manual :[[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-327 I2C]] | | Video Control Toolkits Manual :[[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-327 I2C]] |
− |
| |
− | *CS series
| |
− |
| |
− | Video Control Toolkits Manual :[[CS-MIPI-X i2c|CS-MIPI-X I2C]]
| |
− | ===Android===
| |
− | ====Update Android system====
| |
− |
| |
− | *ROC-RK3566-PC
| |
− |
| |
− | Download the latest rk356x_Radxa_android.tar.gz from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/]
| |
− |
| |
− | *ROC-RK3588S-PC
| |
− |
| |
− | Download the latest rk358x_Radxa_android.tar.gz from [https://github.com/veyeimaging/rk35xx_firefly/releases/ https://github.com/veyeimaging/rk35xx_Radxa/releases/]
| |
− |
| |
− | Burn the system refer to Radxa's documentation.
| |
− | ====Check system status====
| |
− | Login system via ADB, then run the following command to confirm whether the camera is probed.
| |
− |
| |
− | *VEYE-MIPI-XXX
| |
− |
| |
− | <code>dmesg | grep veye</code>
| |
− |
| |
− | The output message appears as shown below:
| |
− |
| |
− | <code>veyecam2m 4-003b: camera id is veyecam2m</code>
| |
− |
| |
− | <code>veyecam2m 4-003b: sensor is IMX327</code>
| |
− |
| |
− | *Run the following command to check the presence of video node.
| |
− |
| |
− | <code>ls /dev/video0</code>
| |
− |
| |
− | The output message appears as shown below.
| |
− |
| |
− | <code>video0</code>
| |
− |
| |
− | The camera can be seen connected to the i2c-4.
| |
− | ====Application example====
| |
− | The camera can be opened using the camera program that comes with the system.
| |
− | ====Compile system from source code====
| |
− |
| |
− | *RK356x
| |
− |
| |
− | [https://github.com/veyeimaging/rk35xx_firefly/tree/main/android/rk356x/drivers https://github.com/veyeimaging/rk35xx_Radxa/tree/main/android/rk356x/drivers]
| |
− |
| |
− | *RK358x
| |
− |
| |
− | [https://github.com/veyeimaging/rk35xx_firefly/tree/main/android/rk358x/drivers https://github.com/veyeimaging/rk35xx_Radxa/tree/main/android/rk358x/drivers]
| |
− | ===Known issues===
| |
− |
| |
− | #The VICAP module of RK3588 does not support outputting the UYVY format, so please use the NV12 format instead.
| |
| | | |
| ===References=== | | ===References=== |
| | | |
− | *ROC-RK3566-PC Manual | + | *Radxa Zero 3W Manual |
| | | |
− | [https://wiki.t-firefly.com/en/ROC-RK3566-PC/ https://wiki.t-Radxa.com/en/ROC-RK3566-PC/]
| + | https://docs.radxa.com/zero/zero3 |
| | | |
− | *ROC-RK3588S-PC Manual | + | * BSP toolkit |
| | | |
− | [https://wiki.t-firefly.com/en/ROC-RK3588S-PC/ https://wiki.t-Radxa.com/en/ROC-RK3588S-PC/]
| + | https://radxa-repo.github.io/bsp/ |
− | | |
− | *Radxa Linux User Guide
| |
− | | |
− | [https://wiki.t-firefly.com/en/Firefly-Linux-Guide/index.html https://wiki.t-Radxa.com/en/Radxa-Linux-Guide/index.html]
| |
| ===Document History=== | | ===Document History=== |
| | | |
− | *2024-04-17 | + | *2024-04-24 |
− | | |
− | Support kernel v5.10 on RK3566.
| |
− | | |
− | *2023-05-22
| |
− | | |
− | Support Fpdlink-III on ubuntu system.
| |
− | | |
− | *2022-12-28
| |
− | | |
− | Add support for RK358x.
| |
− | | |
− | *2022-12-06
| |
− | | |
− | Support Android system.
| |
− | | |
− | *2022-10-22
| |
| | | |
| Release 1st version. | | Release 1st version. |