Line 1: |
Line 1: |
− | ==<big>veye_mipi_i2c.sh详细说明</big>==
| + | [[VEYE-MIPI-290/327 i2c/|English]] |
| + | |
| + | '''<big><big><big><big>[[VEYE-MIPI-290/327 i2c/zh|VEYE-MIPI-290/327 I2C.sh用户手册]]</big></big></big></big>''' |
| | | |
| ===介绍=== | | ===介绍=== |
| 目录下总共4个文件,camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。 | | 目录下总共4个文件,camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。 |
| | | |
− | 你需要先运行camera_i2c_config配置管脚,然后执行veye_mipi_i2c.sh。
| + | ===树莓派配置管脚,非树莓派忽略此步=== |
| + | 你需要先运行camera_i2c_config |
| | | |
− | <br /> | + | <code>./enable_i2c_vc.sh</code> |
| + | |
| + | <code>./camera_i2c_config</code> |
| + | |
| + | 配置管脚,然后执行veye_mipi_i2c.sh |
| + | |
| + | ====camera_i2c_config USAGE==== |
| + | 连接树莓派Computer Module情况下,运行 |
| + | |
| + | <code>./camera_i2c_config [cameranum]</code> |
| + | {| class="wikitable" |
| + | !cameranum |
| + | !description |
| + | |- |
| + | |0 |
| + | |CAM0 |
| + | |- |
| + | |1 |
| + | |CAM1 |
| + | |} |
| + | 连接树莓派经典版型情况下,直接运行 |
| | | |
− | === camera_i2c_config USAGE ===
| + | <code>./camera_i2c_config</code> |
− | 本脚本实现I2C总线管脚复用的配置。<br />
| |
| | | |
| ===veye_mipi_i2c.sh USAGE=== | | ===veye_mipi_i2c.sh USAGE=== |
Line 30: |
Line 52: |
| -b [i2c bus num] i2c bus number | | -b [i2c bus num] i2c bus number |
| | | |
− | function list and param,ref to [veye_mipi_290_isp_function_and_param.pdf]
| + | support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger,cameramode, notf, capture, csienable |
− | | |
− | support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger | |
| | | |
− | ===使用详解===
| + | 对于树莓派Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G),使用i2c0, '''对于Compute Module/ CM3,使用i2c1,请添加-b1 选项。''' |
| | | |
− | *devid
| + | ====使用详解==== |
| | | |
| + | =====devid===== |
| <code>./veye_mipi_i2c.sh -r -f devid</code> | | <code>./veye_mipi_i2c.sh -r -f devid</code> |
| {| class="wikitable" | | {| class="wikitable" |
Line 43: |
Line 64: |
| !description | | !description |
| |- | | |- |
− | |0x02 | + | |0x06 |
− | |MIPI, WDRDisable, 2Lane
| + | |VEYE-MIPI-290/327 |
− | |- | |
− | |0x22
| |
− | |MIPI, WDREnable, 2Lane
| |
− | |-
| |
− | |0x13
| |
− | |LVDS,WDRDisable,3Lane
| |
− | |-
| |
− | |0x33
| |
− | |LVDS,WDREnable,3Lane
| |
| |} | | |} |
| | | |
− | *hdver
| + | =====hdver===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f hdver</code> | | <code>./veye_mipi_i2c.sh -r -f hdver</code> |
| {| class="wikitable" | | {| class="wikitable" |
Line 67: |
Line 78: |
| |} | | |} |
| | | |
− | *wdrmode
| + | =====wdrmode===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f wdrmode | | <code>./veye_mipi_i2c.sh -r -f wdrmode |
| ./veye_mipi_i2c.sh -w -f wdrmode -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f wdrmode -p1 [value]</code> |
Line 85: |
Line 95: |
| |- | | |- |
| |0x03 | | |0x03 |
− | |WDR Enable | + | |DOL WDR Enable |
| |} | | |} |
| | | |
− | *videoformat
| + | =====videoformat===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f videoformat | | <code>./veye_mipi_i2c.sh -r -f videoformat |
| ./veye_mipi_i2c.sh -w -f videoformat -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f videoformat -p1 [value]</code> |
Line 104: |
Line 113: |
| |} | | |} |
| | | |
− | *mirrormode
| + | =====mirrormode===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f mirrormode | | <code>./veye_mipi_i2c.sh -r -f mirrormode |
| ./veye_mipi_i2c.sh -w -f mirrormode -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f mirrormode -p1 [value]</code> |
Line 125: |
Line 133: |
| |} | | |} |
| | | |
− | *denoise
| + | =====denoise===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f denoise | | <code>./veye_mipi_i2c.sh -r -f denoise |
| ./veye_mipi_i2c.sh -w -f denoise -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f denoise -p1 [value]</code> |
Line 182: |
Line 189: |
| |} | | |} |
| | | |
− | *agc
| + | =====agc===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f agc | | <code>./veye_mipi_i2c.sh -r -f agc |
| ./veye_mipi_i2c.sh -w -f agc -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f agc -p1 [value]</code> |
| + | 含义为增益上限 |
| {| class="wikitable" | | {| class="wikitable" |
| !value | | !value |
Line 194: |
Line 201: |
| |} | | |} |
| | | |
− | *lowlight
| + | =====lowlight===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f lowlight | | <code>./veye_mipi_i2c.sh -r -f lowlight |
| ./veye_mipi_i2c.sh -w -f lowlight -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f lowlight -p1 [value]</code> |
| + | 低照度情况下的降帧(慢快门)设置。在低照度情况下,摄像机模组可以通过配置此参数,延长曝光时间,降低帧率,达到更好的低照度效果。 |
| + | |
| + | 注意,在运动场景下不适合使用。 |
| {| class="wikitable" | | {| class="wikitable" |
| !value | | !value |
Line 233: |
Line 242: |
| |} | | |} |
| | | |
− | *daynightmode
| + | =====daynightmode===== |
− | | |
| <code>./veye_mipi_i2c.sh -r -f daynightmode | | <code>./veye_mipi_i2c.sh -r -f daynightmode |
| ./veye_mipi_i2c.sh -w -f daynightmode -p1 [value]</code> | | ./veye_mipi_i2c.sh -w -f daynightmode -p1 [value]</code> |
Line 250: |
Line 258: |
| |Trigger Mode | | |Trigger Mode |
| |} | | |} |
| + | IR-CUT (Infrared cut-off filter) is a mechanical shutter design. It is placed between the lens and the image sensor, and is controlled by a motor or an electromagnet. |
| + | |
| + | IR-CUT has two status: '''Block''' or '''Deliver''' the infrared. |
| + | |
| + | *Color Mode |
| + | |
| + | Image is Color Mode and IR_CUT status '''Block''' infrared. |
| + | |
| + | *Black&White Mode |
| + | |
| + | Image is Black&White Mode and IR_CUT status '''Deliver''' infrared. |
| + | |
| + | *Trigger Mode |
| + | |
| + | Trigger pin : [[VEYE-MIPI-290/327|J3 pin1]]. |
| + | |
| + | Trigger pin High(3.3~12V),Image is Black&White Mode and IR-CUT status '''Deliver''' infrared. |
| + | |
| + | Trigger pin Low(GND),Image is Color Mode and IR-CUT status '''Bolck''' infrared. |
| + | |
| + | =====mshutter===== |
| + | close AE, use manual shutter |
| + | |
| + | <code>./veye_mipi_i2c.sh -r -f mshutter</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f mshutter -p1 [value]</code> |
| + | |
| + | value值为曝光时间(单位:s) |
| + | |
| + | value 大于等于0x4B则进入低帧率模式 |
| + | {| class="wikitable" |
| + | |+ |
| + | !value |
| + | !description |
| + | |- |
| + | | |
| + | |NTSC(PAL) |
| + | |- |
| + | |0x40 |
| + | |auto mode |
| + | |- |
| + | |0x41 |
| + | |1/30 (25) |
| + | |- |
| + | |0x42 |
| + | |1/60(50) |
| + | |- |
| + | |0x43 |
| + | |1/120(100) |
| + | |- |
| + | |0x44 |
| + | |1/240(200) |
| + | |- |
| + | |0x45 |
| + | |1/480(400) |
| + | |- |
| + | |0x46 |
| + | |1/1000 |
| + | |- |
| + | |0x47 |
| + | |1/2000 |
| + | |- |
| + | |0x48 |
| + | |1/5000 |
| + | |- |
| + | |0x49 |
| + | |1/10000 |
| + | |- |
| + | |0x4A |
| + | |1/50000 |
| + | |- |
| + | |0x4B |
| + | |1/30 (25) *2 |
| + | |- |
| + | |0x4C |
| + | |1/30 (25) *4 |
| + | |- |
| + | |0x4D |
| + | |1/30 (25) *6 |
| + | |- |
| + | |0x4E |
| + | |1/30 (25) *8 |
| + | |- |
| + | |0x4F |
| + | |1/30 (25) *10 |
| + | |- |
| + | |0x50 |
| + | |1/30 (25) *15 |
| + | |- |
| + | |0x51 |
| + | |1/30 (25) *20 |
| + | |- |
| + | |0x52 |
| + | |1/30 (25) *25 |
| + | |- |
| + | |0x53 |
| + | |1/30 (25) *30 |
| + | |} |
| + | =====cameramode===== |
| + | Requirements:hdver >= 0x3 |
| + | |
| + | <code>./veye_mipi_i2c.sh -r -f cameramode</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f cameramode -p1 [value]</code> |
| + | {| class="wikitable" |
| + | !value |
| + | !description |
| + | |- |
| + | |0x0 |
| + | |Stream mode |
| + | |- |
| + | |0x1 |
| + | |Capture mode |
| + | |} |
| + | Stream mode: stream output |
| + | |
| + | Caputre mode: output the next frame each '''capture''' cmd. |
| + | |
| + | =====notf===== |
| + | Requirements:hdver >= 0x3, effective in Stream mode |
| + | |
| + | Number of dropped frames |
| + | |
| + | It is a method of framerate control, output one frame,discard '''notf''' frames,output next frame, and so on. |
| + | |
| + | ''actual framerate = original framerate /(1+notf)'' |
| + | |
| + | For example,if the original framerate is 30fps, set '''notf''' to 2, then ''actual framerate'' is 10fps. |
| + | |
| + | <code>./veye_mipi_i2c.sh -r -f notf</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f notf -p1 [value]</code> |
| + | |
| + | '''ntof''' range is [0-0xFF], default 0. |
| + | |
| + | =====capture===== |
| + | Requirements:hdver >= 0x3, effective in Capture mode |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f capture</code> |
| + | |
| + | Output the next frame. This cmd does not interfere the sensor, it just output the next frame (the newest frame). |
| + | |
| + | So it is not trigger mode, there will be a delay[0,1/framerate] between the cmd and the frame exposure. |
| + | |
| + | It is applicable to those that do not require a high level of real-time performance. |
| + | |
| + | =====csienable===== |
| + | Requirements:hdver >= 0x3 |
| + | |
| + | <code>./veye_mipi_i2c.sh -r -f csienable</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f csienable -p1 [value]</code> |
| + | {| class="wikitable" |
| + | !value |
| + | !description |
| + | |- |
| + | |0x0 |
| + | |suspend csi output |
| + | |- |
| + | |0x1 |
| + | |enable csi output |
| + | |} |
| + | default: 0x1 |
| + | |
| + | Note: This is not low power mode, the camera is still working. |
| + | |
| + | =====brightness===== |
| + | <code>./veye_mipi_i2c.sh -r -f brightness</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f brightness -p1 0x32</code> |
| + | |
| + | AE的目标亮度,范围[0,0x64] |
| + | |
| + | =====aespeed===== |
| + | <code>./veye_mipi_i2c.sh -r -f aespeed</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f aespeed -p1 0x32 -p2 0x32</code> |
| + | |
| + | AE 调节速度p1为agc速度,p2为shutter速度,由慢到快[0,0x64] |
| + | |
| + | =====contrast===== |
| + | <code>./veye_mipi_i2c.sh -r -f contrast</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f contrast -p1 0x32</code> |
| + | |
| + | 图像对比度,范围[0,0xFF],默认为0x80 |
| + | |
| + | =====saturation===== |
| + | <code>./veye_mipi_i2c.sh -r -f saturation</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f saturation -p1 0x32</code> |
| + | |
| + | 饱和度,范围: [0,0x64] |
| + | |
| + | ===== sharppen ===== |
| + | <code>./veye_mipi_i2c.sh -r -f sharppen</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f sharppen -p1 [val1] -p2 [value]</code> |
| + | {| class="wikitable" |
| + | !param1 value |
| + | !description |
| + | |- |
| + | |0x0 |
| + | |sharppen disable |
| + | |- |
| + | |0x1 |
| + | |sharppen enable |
| + | |} |
| + | default: 0x1 |
| + | |
| + | param2: sharppen strength, range [0x0-0xA] |
| + | |
| + | =====wdrtargetbr===== |
| + | <code>./veye_mipi_i2c.sh -r -f wdrtargetbr</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f wdrtargetbr -p1 0x80</code> |
| + | |
| + | 宽动态模式下的整体亮度目标值。 |
| + | |
| + | WDR模式生效,[0-0xFF]默认值0x80,WDR模式下,值越大,亮度越高。 |
| + | |
| + | =====wdrbtargetbr===== |
| + | <code>./veye_mipi_i2c.sh -r -f wdrbtargetbr</code> |
| + | |
| + | <code>./veye_mipi_i2c.sh -w -f wdrbtargetbr -p1 0x80</code> |
| + | |
| + | 宽动态模式下的亮区亮度目标值。 |
| + | |
| + | WDR模式生效,[0-0xFF],默认值为0x30,值越大,亮区越亮。 |
| + | |
| + | 此参数的效果与实际场景有关,会存在一个[0-X]的无效区,X与实际场景有关。 |
| + | |
| + | 并不是说调整为0,则亮区会变黑。 |
| + | |
| + | <br /> |