Line 149:
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
+
+
<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 242:
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 512:
Line 470:
https://radxa-repo.github.io/bsp/
https://radxa-repo.github.io/bsp/
===Document History===
===Document History===
+
+
* 2025-03-23
+
+
Add description of mv_probe.sh.
* 2024-07-09
* 2024-07-09