Changes

Jump to navigation Jump to search
Line 248: Line 248:     
=== Application examples ===
 
=== Application examples ===
 +
===='''State Detection and Environment Variable Configuration'''====
 +
[https://github.com/veyeimaging/nvidia_jetson_veye_bsp/tree/master/mv_tools_jetson/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.
   −
====Configuring  global variables====
+
Usage:
Based on the board model, configure the I2C_BUS global variable as follows:
  −
 
  −
* ROC-RK3588S-PC
  −
 
  −
<code>export I2C_BUS=7</code>
  −
 
  −
* ROC-RK3566-PC
  −
 
  −
<code>export I2C_BUS=4</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>source ./mv_probe.sh</code>
   −
<code>export HEIGHT=1024</code>
+
A typical output:
   −
<code>export FPS=108</code>
+
<code>$ source ./mv_probe.sh</code>
   −
*MV-MIPI-IMX296M
+
<code>The mvcam driver is loaded on i2c-10, but the camera is not detected!</code>
   −
<code>export WIDTH=1456</code>
+
<code>Found veye_mvcam camera on i2c-11.</code>
   −
<code>export HEIGHT=1088</code>
+
<code>Setenv CAMERAMODEL = RAW-MIPI-SC535M</code>
   −
<code>export FPS=60</code>
+
<code>Setenv FPS = 49</code>
   −
*MV-MIPI-IMX287M
+
<code>Setenv HEIGHT = 2048</code>
   −
<code>export WIDTH=704</code>
+
<code>Setenv WIDTH = 2432</code>
   −
<code>export HEIGHT=544</code>
+
You can verify the environment variable output using:
   −
<code>export FPS=319</code>
+
<code>echo $CAMERAMODEL</code>
   −
*MV-MIPI-IMX265M
+
Note that these environment variables are only valid for the current session.
   −
<code>export WIDTH=2048</code>
+
'''Important Notes:'''
   −
<code>export HEIGHT=1544</code>
+
*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.
   −
<code>export FPS=45</code>
+
Example:
 
  −
*MV-MIPI-IMX264M
      
<code>export WIDTH=2432</code>
 
<code>export WIDTH=2432</code>
   −
<code>export HEIGHT=2056</code>
+
<code>export HEIGHT=2048</code>
   −
<code>export FPS=28</code>
+
<code>export FPS=50</code>
 +
====Configuring  global variables====
 +
Based on the board model, configure the I2C_BUS global variable as follows:
   −
*RAW-MIPI-SC132M
+
* ROC-RK3588S-PC
   −
<code>export WIDTH=1024</code>
+
<code>export I2C_BUS=7</code>
   −
<code>export HEIGHT=1280</code>
+
* ROC-RK3566-PC
   −
<code>export FPS=120</code>
+
<code>export I2C_BUS=4</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>

Navigation menu