Difference between revisions of "Camera module Trigger Mode manual"

From wiki_veye
Jump to navigation Jump to search
Line 10: Line 10:
 
In this mode,The Trigger IO pin is used as the trigger signal, and the module begins to expose and output the image after receiving the trigger signal.
 
In this mode,The Trigger IO pin is used as the trigger signal, and the module begins to expose and output the image after receiving the trigger signal.
  
Pin definition:[[CS-MIPI-SC132 Data Sheet/zh#.E6.8E.A5.E5.8F.A3.E5.92.8C.E5.BC.95.E8.84.9A.E8.AF.B4.E6.98.8E|CS-MIPI-SC132 DataSheet]]
+
Pin definition:[[CS-MIPI-SC132 Data Sheet#Interface .26 Pin list|CS-MIPI-SC132 DataSheet]]
  
触发信号支持沿属性可设,触发延迟可设,去毛刺属性可设。
+
Triggger edge, trigger delay and trigger debouncer attribute supported.
  
triggeredge : 触发沿属性
+
''triggeredge'' :trigger edge
  
tgdly:触发延迟
+
''tgdly'':trigger delay
  
tgdebncr:去毛刺属性
+
''tgdebncr'':debouncer
  
 
'''Software Trigger'''
 
'''Software Trigger'''
  
此模式下,以I2C寄存器来控制触发抓拍一张。
+
In this mode,Use the I2C register to trigger  an image.
  
striggerone:触发抓拍一张指令。
+
''striggerone'': trigger an image
  
注:以上指令参考设置参考:[[CS-MIPI-X i2c/zh|CS系列模组参数配置脚本]]
+
Note:The above instructions refer to [[CS-MIPI-X i2c|CS Serial I2C setting]] .
===触发模式下的曝光控制和最高帧率===
+
===Exposure control and maximum frame rate in Trigger mode===
====触发模式下的曝光和增益的配置====
+
====Configuration of exposure and gain in Trigger mode====
在触发模式下,推荐用户使用手动曝光。当然,也可以使用自动曝光模式,但是由于AE算法需要经过一些帧的运算来收敛,前几帧图像的曝光效果会不好。
+
In trigger mode, it is recommended that users use manual exposure. Of course, the automatic exposure mode can also be used,
  
aemode:曝光模式设置
+
but because the AE algorithm needs to go through some frames  to converge, the exposure effect of the first few frames will not be good.
  
metime:手动曝光时间
+
''expmode'':exposure mode setting
  
meagain:手动模拟增益
+
''metime'':manual exposure time
  
medgain:手动数字增益
+
''meagain'':manual analog gain
  
用户还可以在自动模式下,使用expostate指令来读出当前曝光时间和增益值,作为参考。
+
''medgain'':manual digital gain
  
注:以上指令参考设置参考:[[CS-MIPI-X i2c/zh|CS系列模组参数配置脚本]]。
+
You can use the ''expostate'' instruction to read out the current exposure time and gain value in automatic mode as a reference.
====触发模式下的曝光时间====
 
对于CS-MIPI-SC132模组
 
  
 +
Note:The above instructions refer to [[CS-MIPI-X i2c|CS Serial I2C setting]] .
 +
====Exposure time and Transmission time in Trigger mode====
 
'''''T<sub>tgmin =</sub> T<sub>exp</sub> + T<sub>trans</sub>'''''
 
'''''T<sub>tgmin =</sub> T<sub>exp</sub> + T<sub>trans</sub>'''''
  
T<sub>tgmin</sub> :触发最小间隔时间
+
T<sub>tgmin</sub> : minimum trigger interval
  
T<sub>exp</sub>:曝光时间
+
T<sub>exp</sub>: exposure time
  
T<sub>trans</sub>:一帧传输时间
+
T<sub>trans</sub>: transmission time of one frame
  
相应的,在已知触发最小间隔时间的情况下,允许配置的最大曝光时间为:
+
Accordingly, if the minimum trigger interval is known, the maximum allowable exposure time is:
  
 
'''''T<sub>expmax=</sub> T<sub>tgmin  -</sub> T<sub>trans</sub>'''''
 
'''''T<sub>expmax=</sub> T<sub>tgmin  -</sub> T<sub>trans</sub>'''''
  
T<sub>expmax</sub> :最大曝光时间
+
T<sub>expmax</sub> : maximum exposure time
  
如果当前触发信号与前一次触发信号的时间间隔小与触发最小间隔时间,则传感器会忽略掉当前触发信号。
+
If the time interval between the current trigger signal and the previous trigger signal is smaller than the minimum interval time,
  
*'''T<sub>exp</sub> : 曝光时间'''
+
the sensor will ignore the current trigger signal.
  
用户可以通过自动和手动设置。
+
*'''T<sub>exp</sub> : exposure time'''
  
aemode为自动时,建议结合使用场景,限制最大曝光时间aetime。
+
Users can set it to automatical or manual.
  
aemode为手动时,通过metime设置曝光时间即可。
+
''expmode'' is auto : set max exposure time via a''etime''.
  
*'''T<sub>trans:</sub>一帧传输时间:'''
+
''expmode'' is manual : set exposure time via ''metime''.
  
一帧传输时间与当前分辨率模式有关。
+
*'''T<sub>trans</sub> : transmission time of one frame'''
 +
 
 +
The transmission time of a frame is related to the current resolution mode.
 
{| class="wikitable"
 
{| class="wikitable"
|+触发模式曝光时间计算
+
|+Exposure time table in trigger mode
!工作模式
+
!Video Format
!'''''T<sub>trans</sub>'''''一帧传输时间(ms)
+
!'''''T<sub>trans</sub>'''''(ms)
!最大帧率
+
!Max Framerate
!保证最大帧率的最大曝光时间(ms)
+
!Maximum exposure time to guarantee maximum framerate(ms)
 
|-
 
|-
 
|1280x1080
 
|1280x1080
Line 97: Line 99:
 
|0.68
 
|0.68
 
|}
 
|}
===触发模式下的延迟===
+
===Delay in trigger mode===
 
'''''T<sub>total</sub> = tgdly + T<sub>exp +</sub> T<sub>trans +</sub>T<sub>isp+</sub>T<sub>mipi</sub>'''''
 
'''''T<sub>total</sub> = tgdly + T<sub>exp +</sub> T<sub>trans +</sub>T<sub>isp+</sub>T<sub>mipi</sub>'''''
  
触发总延迟时间 :触发总延迟时间为从触发信号输入到完整一帧图像通过mipi信号输出完成的时间。
+
''T<sub>total</sub>'' :the total trigger delay is the time from the trigger signal to the complete image output through the MIPI signal.
  
tgdly: 人为设置的触发延迟时间,以下测量均配置为0。tgdly仅针对Hardware Trigger有效。
+
tgdly: trigger delay time, the following measurements are configured to 0. ''tgdly'' is valid only for Hardware trigger mode.
  
T<sub>exp</sub> : 曝光时间,用户可以通过自动和手动设置,以下以expostate读出的实际值为准。
+
T<sub>exp</sub> : exposure time,the following is based on the actual values read by ''expostate''.
  
T<sub>isp</sub>:模组处理时间+mipi一帧传输时间。
+
T<sub>isp</sub>:image signal processing time.
  
T<sub>mipi</sub>: MIPI传输时间。
+
T<sub>mipi</sub>: MIPI transmission time.
 
{| class="wikitable"
 
{| class="wikitable"
|+触发延迟测量
+
|+Trigger delay measurement result
!工作模式
+
!Video Format
!T<sub>exp</sub>曝光时间(us)
+
!T<sub>exp</sub>(us)
!T<sub>total</sub>触发总延迟时间(ms)
+
!T<sub>total</sub>(ms)
 
|-
 
|-
 
|1280x1080
 
|1280x1080

Revision as of 15:10, 19 June 2020

查看中文

This AN mainly introduces the trigger mode of global shutter camera module, including hardware trigger and software trigger.

1 Applicable Product models

CS-MIPI-SC132

2 The concept of image synchronization mode

2.1 free running

In this mode, the camera module runs on its own.

2.2 Hardware Trigger

In this mode,The Trigger IO pin is used as the trigger signal, and the module begins to expose and output the image after receiving the trigger signal.

Pin definition:CS-MIPI-SC132 DataSheet

Triggger edge, trigger delay and trigger debouncer attribute supported.

triggeredge :trigger edge

tgdly:trigger delay

tgdebncr:debouncer

Software Trigger

In this mode,Use the I2C register to trigger an image.

striggerone: trigger an image

Note:The above instructions refer to CS Serial I2C setting .

3 Exposure control and maximum frame rate in Trigger mode

3.1 Configuration of exposure and gain in Trigger mode

In trigger mode, it is recommended that users use manual exposure. Of course, the automatic exposure mode can also be used,

but because the AE algorithm needs to go through some frames to converge, the exposure effect of the first few frames will not be good.

expmode:exposure mode setting

metime:manual exposure time

meagain:manual analog gain

medgain:manual digital gain

You can use the expostate instruction to read out the current exposure time and gain value in automatic mode as a reference.

Note:The above instructions refer to CS Serial I2C setting .

3.2 Exposure time and Transmission time in Trigger mode

Ttgmin = Texp + Ttrans

Ttgmin : minimum trigger interval

Texp: exposure time

Ttrans: transmission time of one frame

Accordingly, if the minimum trigger interval is known, the maximum allowable exposure time is:

Texpmax= Ttgmin - Ttrans

Texpmax : maximum exposure time

If the time interval between the current trigger signal and the previous trigger signal is smaller than the minimum interval time,

the sensor will ignore the current trigger signal.

  • Texp : exposure time

Users can set it to automatical or manual.

expmode is auto : set max exposure time via aetime.

expmode is manual : set exposure time via metime.

  • Ttrans : transmission time of one frame

The transmission time of a frame is related to the current resolution mode.

Exposure time table in trigger mode
Video Format Ttrans(ms) Max Framerate Maximum exposure time to guarantee maximum framerate(ms)
1280x1080

1080x1280

18.67 45 3.55
1280x720

720x1280

14.94 60 1.73
640x480

480x640

7.65 120 0.68

4 Delay in trigger mode

Ttotal = tgdly + Texp + Ttrans +Tisp+Tmipi

Ttotal :the total trigger delay is the time from the trigger signal to the complete image output through the MIPI signal.

tgdly: trigger delay time, the following measurements are configured to 0. tgdly is valid only for Hardware trigger mode.

Texp : exposure time,the following is based on the actual values read by expostate.

Tisp:image signal processing time.

Tmipi: MIPI transmission time.

Trigger delay measurement result
Video Format Texp(us) Ttotal(ms)
1280x1080 1000 45.80
1080x1280 1000 43.20
1280x720 1000 35.20
720x1280 1000 33.40
640x480 1000 18.00
480x640 1000 17.20