Line 4:
Line 4:
The MV series and RAW series cameras are cameras designed for AI applications in the industrial field. They use the MIPI CSI-2 interface and are particularly suitable for use with embedded computing platforms. They have rich data formats and triggering features, extremely low latency, high bandwidth, and reliable stability.
The MV series and RAW series cameras are cameras designed for AI applications in the industrial field. They use the MIPI CSI-2 interface and are particularly suitable for use with embedded computing platforms. They have rich data formats and triggering features, extremely low latency, high bandwidth, and reliable stability.
−
This article takes Radxa's ZERO 3W board as an example to introduce how to connect MV and RAW series cameras to the RK3566/3K3568 system.
+
This article takes Radxa's ZERO 3W/3E board as an example to introduce how to connect MV and RAW series cameras to the RK3566/3K3568 system.
We provide drivers for the Linux operating system (using Radxa OS Debainas an example).
We provide drivers for the Linux operating system (using Radxa OS Debainas an example).
Line 54:
Line 54:
|}
|}
===Hardware Setup===
===Hardware Setup===
−
====Connection of MV series camera and Radxa ZERO 3W====
+
====Connection of MV series camera and Radxa ZERO 3W/3E====
−
The MV series cameras require the ADP-MV1 adapter board in order to connect to the Radxa ZERO 3W board.
+
The MV series cameras require the ADP-MV1 adapter board in order to connect to the Radxa ZERO 3W/3E board.
−
The ADP-MV1 and Zero 3W are connected to each other using a 15 to 22P FFC cable, taking care that the silver contacts are facing outwards.
+
The ADP-MV1 and Zero 3W/3E are connected to each other using a 15 to 22P FFC cable, taking care that the silver contacts are facing outwards.
{| class="wikitable"
{| class="wikitable"
!TOP
!TOP
!BOTTOM
!BOTTOM
|-
|-
−
|[[File:Radxa Zero 3W connect to MV camera.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20MV%20camera.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W connect to MV camera]]
+
|[[File:Radxa Zero 3W connect to MV camera.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20MV%20camera.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W/3E connect to MV camera]]
−
|[[File:Radxa Zero 3W connect to MV camera 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20MV%20camera%202.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W connect to MV camera 2]]
+
|[[File:Radxa Zero 3W connect to MV camera 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20MV%20camera%202.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W/3E connect to MV camera 2]]
|}
|}
=====Connection of RAW-MIPI-SC132M and ADP-MV2=====
=====Connection of RAW-MIPI-SC132M and ADP-MV2=====
Line 71:
Line 71:
!BOTTOM
!BOTTOM
|-
|-
−
|[[File:Radxa Zero 3W connect to RAW-MIPI-SC132M.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW-MIPI-SC132M.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W connect to RAW-MIPI-SC132M]]
+
|[[File:Radxa Zero 3W connect to RAW-MIPI-SC132M.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW-MIPI-SC132M.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W/3E connect to RAW-MIPI-SC132M]]
−
|[[File:Radxa Zero 3W connect to RAW-MIPI-SC132M 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW-MIPI-SC132M%202.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W connect to RAW-MIPI-SC132M 2]]
+
|[[File:Radxa Zero 3W connect to RAW-MIPI-SC132M 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW-MIPI-SC132M%202.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W/3E connect to RAW-MIPI-SC132M 2]]
|}
|}
−
====Connection of other RAW series camera and Radxa ZERO 3W====
+
====Connection of other RAW series camera and Radxa ZERO 3W/3E====
The two are connected using 0.5 mm pitch*pin FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside.
The two are connected using 0.5 mm pitch*pin FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside.
{| class="wikitable"
{| class="wikitable"
Line 80:
Line 80:
!BOTTOM
!BOTTOM
|-
|-
−
|[[File:Radxa Zero 3W connect to RAW series camera.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW%20series%20camera.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W connect to RAW series camera]]
+
|[[File:Radxa Zero 3W connect to RAW series camera.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW%20series%20camera.jpg|alt=|center|thumb|600x600px|Radxa Zero 3W/3E connect to RAW series camera]]
−
|[[File:Radxa Zero 3W connect to RAW series camera 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW%20series%20camera%202.jpg|alt=ADP-MV2 to RAW series camera No.2|center|thumb|600x600px|Radxa Zero 3W connect to RAW series camera 2]]
+
|[[File:Radxa Zero 3W connect to RAW series camera 2.jpg|link=https://wiki.veye.cc/index.php/File:Radxa%20Zero%203W%20connect%20to%20RAW%20series%20camera%202.jpg|alt=ADP-MV2 to RAW series camera No.2|center|thumb|600x600px|Radxa Zero 3W/3E connect to RAW series camera 2]]
|}
|}
===Introduction to github repositories===
===Introduction to github repositories===
+
https://github.com/veyeimaging/rk35xx_veye_bsp
+
https://github.com/veyeimaging/rk35xx_radxa
https://github.com/veyeimaging/rk35xx_radxa
Line 107:
Line 109:
On the RK35xx board,
On the RK35xx board,
−
Download the latest rk356x_radxa_zero3w.tar.gz from https://github.com/veyeimaging/rk35xx_radxa/releases/ .
+
Download the latest rk356x_radxa_zero3w.tar.gz or rk356x_radxa_zero3e.tar.gz from https://github.com/veyeimaging/rk35xx_radxa/releases/ .
<code>tar -xavf rk356x_radxa_zero3w.tar.gz</code>
<code>tar -xavf rk356x_radxa_zero3w.tar.gz</code>
Line 136:
Line 138:
<code>mvcam 2-003b: firmware version: 0x1290133</code>
<code>mvcam 2-003b: firmware version: 0x1290133</code>
−
For Radxa Zero 3W, the camera is connected to i2c-2.
+
For Radxa Zero 3W/3E, the camera is connected to i2c-2.
*Check the video0 device node:
*Check the video0 device node:
Line 147:
Line 149:
After successfully identifying the camera, the camera will be recognized as /dev/video0.
After successfully identifying the camera, the camera will be recognized as /dev/video0.
+
===='''State Detection and Environment Variable Configuration'''====
+
[https://github.com/veyeimaging/rk35xx_veye_bsp/tree/main/mv_tools_rockchip/i2c_tools Here], we provide an <code>mv_probe.sh</code> script that automatically detects the connected camera and configures environment variables with its default model, width, height, frame rate, and other information.
+
+
Usage:
+
+
<code>source ./mv_probe.sh</code>
+
+
A typical output:
+
+
<code>$ source ./mv_probe.sh</code>
+
+
<code>The mvcam driver is loaded on i2c-10, but the camera is not detected!</code>
+
+
<code>Found veye_mvcam camera on i2c-11.</code>
+
+
<code>Setenv CAMERAMODEL = RAW-MIPI-SC535M</code>
+
+
<code>Setenv FPS = 49</code>
+
+
<code>Setenv HEIGHT = 2048</code>
+
+
<code>Setenv WIDTH = 2432</code>
+
+
You can verify the environment variable output using:
+
+
<code>echo $CAMERAMODEL</code>
+
+
Note that these environment variables are only valid for the current session.
+
+
'''Important Notes:'''
+
+
* This script requires the <code>mvcam</code> driver version '''1.1.06 or later'''.
+
*If your driver version is '''earlier than 1.1.06''' or you need to use different width, height, or frame rate values, refer to the camera module manual and manually configure the following environment variables. Otherwise, subsequent programs may not function correctly.
+
+
Example:
+
+
<code>export WIDTH=2432</code>
+
+
<code>export HEIGHT=2048</code>
+
+
<code>export FPS=50</code>
+
====Configuring global variables====
+
Based on the board model, configure the I2C_BUS global variable as follows:
+
+
*Radxa Zero 3W/3E
+
+
<code>export I2C_BUS=2</code>
====Using media-ctl to view topology====
====Using media-ctl to view topology====
Using the media-ctl command can clearly display the current topography structure.
Using the media-ctl command can clearly display the current topography structure.
Line 240:
Line 289:
Also, y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe].
Also, y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe].
===Application examples===
===Application examples===
−
====Configuring global variables====
−
Based on the board model, configure the I2C_BUS global variable as follows:
−
−
*Radxa Zero 3W
−
−
<code>export I2C_BUS=2</code>
−
−
For the convenience of later descriptions, global variables are configured here according to the sensor size.
−
−
*MV-MIPI-IMX178M
−
−
<code>export WIDTH=3088</code>
−
−
<code>export HEIGHT=2064</code>
−
−
<code>export FPS=22</code>
−
−
*MV-MIPI-SC130M
−
−
<code>export WIDTH=1280</code>
−
−
<code>export HEIGHT=1024</code>
−
−
<code>export FPS=108</code>
−
−
*MV-MIPI-IMX296M
−
−
<code>export WIDTH=1456</code>
−
−
<code>export HEIGHT=1088</code>
−
−
<code>export FPS=60</code>
−
−
*MV-MIPI-IMX287M
−
−
<code>export WIDTH=704</code>
−
−
<code>export HEIGHT=544</code>
−
−
<code>export FPS=319</code>
−
−
*MV-MIPI-IMX265M
−
−
<code>export WIDTH=2048</code>
−
−
<code>export HEIGHT=1544</code>
−
−
<code>export FPS=45</code>
−
−
*MV-MIPI-IMX264M
−
−
<code>export WIDTH=2432</code>
−
−
<code>export HEIGHT=2056</code>
−
−
<code>export FPS=28</code>
−
−
*RAW-MIPI-SC132M
−
−
<code>export WIDTH=1024</code>
−
−
<code>export HEIGHT=1280</code>
−
−
<code>export FPS=120</code>
−
−
*RAW-MIPI-IMX462M
−
−
<code>export WIDTH=1920</code>
−
−
<code>export HEIGHT=1088</code>
−
−
<code>export FPS=60</code>
−
−
*RAW-MIPI-AR0234M
−
−
<code>export WIDTH=1920</code>
−
−
<code>export HEIGHT=1200</code>
−
−
<code>export FPS=60</code>
−
−
* RAW-MIPI-SC535M
−
−
<code>export WIDTH=2432</code>
−
−
<code>export HEIGHT=2048</code>
−
−
<code>export FPS=50</code>
−
====Configure parameters using v4l2-ctl====
====Configure parameters using v4l2-ctl====
<code>$ v4l2-ctl -d /dev/v4l-subdev2 -L</code>
<code>$ v4l2-ctl -d /dev/v4l-subdev2 -L</code>
Line 451:
Line 411:
Note: To increase the maximum frame rate and bandwidth, some modules no longer support the UYVY format. Please use the "fmtcap" command in the script to read the registers to confirm the specific configuration.
Note: To increase the maximum frame rate and bandwidth, some modules no longer support the UYVY format. Please use the "fmtcap" command in the script to read the registers to confirm the specific configuration.
−
We provide several gstreamer routines that implement the preview function. See the [https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples] directory on github for details.
+
We provide several gstreamer routines that implement the preview function. See the [https://github.com/veyeimaging/rk35xx_veye_bsp/tree/main/samples samples] directory on github for details.
====Trigger mode====
====Trigger mode====
=====Set data format, resolution, frame rate=====
=====Set data format, resolution, frame rate=====
Line 502:
Line 462:
===References===
===References===
−
*Radxa Zero 3W Manual
+
*Radxa Zero 3W/3E Manual
https://docs.radxa.com/zero/zero3
https://docs.radxa.com/zero/zero3
Line 510:
Line 470:
https://radxa-repo.github.io/bsp/
https://radxa-repo.github.io/bsp/
===Document History===
===Document History===
+
+
* 2025-04-07
+
+
Add support for Radxa Zero 3E.
+
+
* 2025-03-23
+
+
Add description of mv_probe.sh.
* 2024-07-09
* 2024-07-09