Difference between revisions of "5m mipi i2c user guide"

From wiki_veye
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 25: Line 25:
  
 
-d [i2c addr]   i2c addr if not default 0x3b
 
-d [i2c addr]   i2c addr if not default 0x3b
====i2c bus====
+
===i2c bus number on different board===
[http://wiki.veye.cc/index.php/VEYE_CS_Camera_for_Jetson_TX2#Video_Control_Toolkits_Manual bus number on jetson platform]
+
Please refer to the following article to determine which -b parameter you need to use.
====Format description====
+
 
 +
[http://wiki.veye.cc/index.php/I2c_bus_number_and_video_node i2c bus number on different boards]
 +
=== Functions list===
 
The part in  square brackets [param] in the following code indicates the variable.
 
The part in  square brackets [param] in the following code indicates the variable.
====Details====
+
=====manufacturer=====
====manufacturer====
 
 
<code>./veye5_mipi_i2c.sh -r -f manufacturer</code>
 
<code>./veye5_mipi_i2c.sh -r -f manufacturer</code>
  
Line 85: Line 86:
 
|0x00
 
|0x00
 
|use i2c port on FFC cable
 
|use i2c port on FFC cable
|VEYE-MIPI-IMX335:'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J1 IIC]]'''
+
|'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J1:IIC]]'''
 
|-
 
|-
 
|0x01
 
|0x01
 
|use alternate i2c port
 
|use alternate i2c port
|VEYE-MIPI-IMX335:'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J5 IIC AUX]]'''
+
|'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J5:IIC AUX]]'''
 
|}
 
|}
 
=====daynightmode=====
 
=====daynightmode=====
Line 119: Line 120:
 
!value
 
!value
 
!description
 
!description
 +
!Remarks
 
|-
 
|-
 
|0x00
 
|0x00
 
|Default direction
 
|Default direction
 +
|'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J3:IRCUT Control Functional specifications]]'''
 
|-
 
|-
 
|0x01
 
|0x01
 
|Reverse IRCUT control pin level
 
|Reverse IRCUT control pin level
 +
|
 
|}
 
|}
 
=====irtrigger=====
 
=====irtrigger=====
Line 135: Line 139:
 
!value
 
!value
 
!description
 
!description
 +
!Remarks
 
|-
 
|-
 
|0x00
 
|0x00
 
|Low level for black and white mode, high level for color mode.
 
|Low level for black and white mode, high level for color mode.
 +
| rowspan="2" |'''[[VEYE-MIPI-IMX335 Data Sheet#Connector Pinlist|J4 : Day/Night  External Trigger]]'''
 
|-
 
|-
 
|0x01
 
|0x01
Line 157: Line 163:
 
|-
 
|-
 
|0x01
 
|0x01
|2592x1944@20fps
+
|5M 2592x1944@20fps
 
|-
 
|-
 
|0x02
 
|0x02
|2592x1944@12.5fps
+
|5M 2592x1944@12.5fps
 
|-
 
|-
 
|0x03
 
|0x03
|2560x1440@25fps
+
|4M 2560x1440@25fps
 
|-
 
|-
 
|0x04
 
|0x04
|2560x1440@30fps
+
|4M 2560x1440@30fps
 
|}
 
|}
 
=====test_pattern=====
 
=====test_pattern=====
Line 229: Line 235:
 
Current gain value.
 
Current gain value.
 
=====mshutter=====
 
=====mshutter=====
<code>./veye5_mipi_i2c.sh -w -f mshutter -p1 [0,0x0B]</code>
+
<code>./veye5_mipi_i2c.sh -w -f mshutter -p1 [0,0x0A]</code>
  
 
<code>./veye5_mipi_i2c.sh -r -f mshutter</code>
 
<code>./veye5_mipi_i2c.sh -r -f mshutter</code>
Line 236: Line 242:
  
 
<nowiki>#</nowiki>0,auto; others, manual value
 
<nowiki>#</nowiki>0,auto; others, manual value
 +
{| class="wikitable"
 +
! rowspan="3" |mshutter value
 +
(manual value)
 +
! colspan="5" |Exposure time
 +
|-
 +
! rowspan="2" |4M 30FPS
 +
! rowspan="2" |4M 25FPS
 +
! colspan="2" |5M 20FPS
 +
! rowspan="2" |5M 12.5FPS
 +
|-
 +
!antiflicker=0
 +
!antiflicker=1
 +
|-
 +
|0x00
 +
|AUTO
 +
|AUTO
 +
|AUTO
 +
|AUTO
 +
|AUTO
 +
|-
 +
|0x01
 +
|1/30
 +
|1/25
 +
|1/30
 +
|1/40
 +
|1/25
 +
|-
 +
|0x02
 +
|1/60
 +
|1/50
 +
|1/60
 +
|1/80
 +
|1/50
 +
|-
 +
|0x03
 +
|1/120
 +
|1/100
 +
|1/120
 +
|1/160
 +
|1/100
 +
|-
 +
|0x04
 +
|1/240
 +
|1/200
 +
|1/240
 +
|1/240
 +
|1/200
 +
|-
 +
|0x05
 +
|1/480
 +
|1/400
 +
|1/480
 +
|1/480
 +
|1/400
 +
|-
 +
|0x06
 +
|1/1000
 +
|1/1000
 +
|1/1000
 +
|1/1000
 +
|1/1000
 +
|-
 +
|0x07
 +
|1/2000
 +
|1/2000
 +
|1/2000
 +
|1/2000
 +
|1/2000
 +
|-
 +
|0x08
 +
|1/3000
 +
|1/5000
 +
|1/5000
 +
|1/5000
 +
|1/5000
 +
|-
 +
|0x09
 +
|1/5000
 +
|1/10000
 +
|1/10000
 +
|1/10000
 +
|1/12375
 +
|-
 +
|0x0A
 +
|1/10000
 +
|1/76923
 +
|1/76923
 +
|1/76923
 +
|1/50000
 +
|-
 +
|0x0B - 0x0F
 +
|1/30
 +
|1/25
 +
|1/20
 +
|1/20
 +
|1/12.5
 +
|}
 +
 
=====mirrormode=====
 
=====mirrormode=====
 
<code>./veye5_mipi_i2c.sh -w -f mirrormode -p1 [0,0x03]</code>
 
<code>./veye5_mipi_i2c.sh -w -f mirrormode -p1 [0,0x03]</code>
Line 280: Line 384:
 
!description
 
!description
 
|-
 
|-
|0x00
+
|0x10
 
|close
 
|close
 
|-
 
|-
|0x09
+
|0x19
 
|low
 
|low
 
|-
 
|-
|0x0B
+
|0x1B
 
|middle
 
|middle
 
|-
 
|-
|0x0C
+
|0x1D
 
|high
 
|high
|}<br />
+
|}
 +
=====saturation=====
 +
<code>./veye5_mipi_i2c.sh -w -f saturation -p1 [0,0x0A]</code>
 +
 
 +
<code>./veye5_mipi_i2c.sh -r -f saturation</code>
 +
 
 +
saturation setting,default value: 0xA.
 +
=====extra_color_gain=====
 +
<code>./veye5_mipi_i2c.sh -w -f extra_color_gain -p1 [0,0xFF]</code>
 +
 
 +
<code>./veye5_mipi_i2c.sh -r -f extra_color_gain</code>
 +
 
 +
extra color gain setting,default value: 0xC0.<br />

Latest revision as of 10:52, 3 January 2024

查看中文

veye5_mipi_i2c.sh user guide

1 Overview

This script is an open source program to configure the camera module by direct access to i2c registers.

Applicable models: VEYE-MIPI-IMX335

2 veye5_mipi_i2c.sh help

Usage:  ./veye_mipi_i2c.sh [-r/w] [-f] function name -p1 param1 -p2 param2 -b bus

options:

-r                       read

-w                       write

-f [function name]       function name

-p1 [param1]   param1 of each function

-p2 [param1]   param2 of each function

-b [i2c bus num]  i2c bus number

-d [i2c addr]  i2c addr if not default 0x3b

3 i2c bus number on different board

Please refer to the following article to determine which -b parameter you need to use.

i2c bus number on different boards

4 Functions list

The part in square brackets [param] in the following code indicates the variable.

4.1 manufacturer

./veye5_mipi_i2c.sh -r -f manufacturer

Read manufacturer information, always returns:

Manufacturer is VEYE

4.2 model

./veye5_mipi_i2c.sh -r -f model

Read the device model, for example: VEYE_MIPI_IMX335

4.3 version

./veye5_mipi_i2c.sh -r -f version

Reads the version number, for example:

control version is 01.03 , isp version 01.00

4.4 timestamp

./veye5_mipi_i2c.sh -r -f timestamp

Gets the time in milliseconds calculated from the moment the module starts up, incremented cyclically.

4.5 factoryparam

./veye5_mipi_i2c.sh -w -f factoryparam

All parameters revert to their default values.

4.6 paramsave

./veye5_mipi_i2c.sh -w -f paramsave

Save parameters. After all parameters are modified, this command must be executed for the parameters to be saved in flash and no longer lost when power off.

4.7 reboot

./veye5_mipi_i2c.sh -w -f reboot

reboot the camera.

4.8 errcode

./veye5_mipi_i2c.sh -r -f errcode

Get the camera error code. It should be 0 normally.

4.9 i2caddr

./veye5_mipi_i2c.sh -w -f i2caddr -p1 [new i2caddr] -d [old i2c addr]

./veye5_mipi_i2c.sh -r -f i2caddr -d [current i2c addr]

The camera i2c address,run paramsave and reboot to takes effect .

4.10 i2cport

./veye5_mipi_i2c.sh -w -f i2cport -p1 [i2c port]

./veye5_mipi_i2c.sh -r -f i2cport

The camera i2c port,run paramsave and reboot to takes effect .

value description Interface Position
0x00 use i2c port on FFC cable J1:IIC
0x01 use alternate i2c port J5:IIC AUX
4.11 daynightmode

./veye5_mipi_i2c.sh -w -f daynightmode -p1 [0,2]

./veye5_mipi_i2c.sh -r -f daynightmode

Day and night mode configuration

value description
0x00 Color mode
0x01 White and Black mode
0x02 Trigger mode
4.12 ircutdir

./veye5_mipi_i2c.sh -w -f ircutdir -p1 [0,1]

./veye5_mipi_i2c.sh -r -f ircutdir

Controls whether the IRCUT control pin level reverse.

value description Remarks
0x00 Default direction J3:IRCUT Control Functional specifications
0x01 Reverse IRCUT control pin level
4.13 irtrigger

./veye5_mipi_i2c.sh -w -f irtrigger -p1 [0,1]

./veye5_mipi_i2c.sh -r -f irtrigger

Trigger signal high and low level configuration in Trigger mode.

value description Remarks
0x00 Low level for black and white mode, high level for color mode. J4 : Day/Night External Trigger
0x01 Low level for color mode, high level for black and white mode.
4.14 sensor_reg

./veye5_mipi_i2c.sh -r -f sensor_reg -p1 [sensor reg addr]

Read sensor register.

4.15 videomode

./veye5_mipi_i2c.sh -w -f videomode -p1 [video mode]

./veye5_mipi_i2c.sh -r -f videomode

Camera resolution configuration.

value description
0x01 5M 2592x1944@20fps
0x02 5M 2592x1944@12.5fps
0x03 4M 2560x1440@25fps
0x04 4M 2560x1440@30fps
4.16 test_pattern

./veye5_mipi_i2c.sh -w -f test_pattern -p1 [test_enable] -p2 [type]

./veye5_mipi_i2c.sh -r -f test_pattern

Image test mode configuration.

4.17 awb_mode

./veye5_mipi_i2c.sh -w -f awb_mode -p1 [0,1]

./veye5_mipi_i2c.sh -r -f awb_mode

AWB mode configuration.

value description
0x00 auto
0x01 oneset,write once to trigger a white balance operation
4.18 antiflicker

./veye5_mipi_i2c.sh -w -f antiflicker -p1 [0,1]

./veye5_mipi_i2c.sh -r -f antiflicker

Whether the anti-flicker function is on or not.

4.19 agc_max

./veye5_mipi_i2c.sh -w -f agc_max -p1 [0,0xf]

./veye5_mipi_i2c.sh -r -f agc_max

The upper limit of the auto gain function.

4.20 ae_target

./veye5_mipi_i2c.sh -w -f ae_target -p1 [0,0x64]

./veye5_mipi_i2c.sh -r -f ae_target

The target brightness of the automatic exposure.

4.21 ae_speed

./veye5_mipi_i2c.sh -w -f ae_speed -p1 [0,0x64]

./veye5_mipi_i2c.sh -r -f ae_speed

The adjustment speed of automatic exposure.

4.22 agc_speed

./veye5_mipi_i2c.sh -w -f agc_speed -p1 [0,0x64]

./veye5_mipi_i2c.sh -r -f agc_speed

The adjustment speed of auto gain.

4.23 exp_val

./veye5_mipi_i2c.sh -r -f exp_val

Current exposure value.

4.24 agc_val

./veye5_mipi_i2c.sh -r -f agc_val

Current gain value.

4.25 mshutter

./veye5_mipi_i2c.sh -w -f mshutter -p1 [0,0x0A]

./veye5_mipi_i2c.sh -r -f mshutter

Whether manual exposure is on and manual exposure configuration.

#0,auto; others, manual value

mshutter value

(manual value)

Exposure time
4M 30FPS 4M 25FPS 5M 20FPS 5M 12.5FPS
antiflicker=0 antiflicker=1
0x00 AUTO AUTO AUTO AUTO AUTO
0x01 1/30 1/25 1/30 1/40 1/25
0x02 1/60 1/50 1/60 1/80 1/50
0x03 1/120 1/100 1/120 1/160 1/100
0x04 1/240 1/200 1/240 1/240 1/200
0x05 1/480 1/400 1/480 1/480 1/400
0x06 1/1000 1/1000 1/1000 1/1000 1/1000
0x07 1/2000 1/2000 1/2000 1/2000 1/2000
0x08 1/3000 1/5000 1/5000 1/5000 1/5000
0x09 1/5000 1/10000 1/10000 1/10000 1/12375
0x0A 1/10000 1/76923 1/76923 1/76923 1/50000
0x0B - 0x0F 1/30 1/25 1/20 1/20 1/12.5
4.26 mirrormode

./veye5_mipi_i2c.sh -w -f mirrormode -p1 [0,0x03]

./veye5_mipi_i2c.sh -r -f mirrormode

Video flip configuration.

value description
0x00 Normal
0x01 Mirror
0x02 V-flip
0x03 Mirror and V-flip
4.27 denoise_2d

./veye5_mipi_i2c.sh -w -f denoise_2d -p1 [0,0x3]

./veye5_mipi_i2c.sh -r -f denoise_2d

2D noise reduction intensity.

4.28 denoise_3d

./veye5_mipi_i2c.sh -w -f denoise_3d -p1 [0,0x3]

./veye5_mipi_i2c.sh -r -f denoise_3d

3D noise reduction intensity.

4.29 sharppen

./veye5_mipi_i2c.sh -w -f sharppen -p1 [0,0x0f]

./veye5_mipi_i2c.sh -r -f sharppen

Sharpening intensity configuration.

value description
0x10 close
0x19 low
0x1B middle
0x1D high
4.30 saturation

./veye5_mipi_i2c.sh -w -f saturation -p1 [0,0x0A]

./veye5_mipi_i2c.sh -r -f saturation

saturation setting,default value: 0xA.

4.31 extra_color_gain

./veye5_mipi_i2c.sh -w -f extra_color_gain -p1 [0,0xFF]

./veye5_mipi_i2c.sh -r -f extra_color_gain

extra color gain setting,default value: 0xC0.