Difference between revisions of "VEYE-MIPI-290/327 i2c/"
Line 261: | Line 261: | ||
IR-CUT has two status: '''Block''' or '''Deliver''' the infrared. | IR-CUT has two status: '''Block''' or '''Deliver''' the infrared. | ||
− | * Color Mode | + | *Color Mode |
Image is Color Mode and IR_CUT status '''Bolck''' infrared. | Image is Color Mode and IR_CUT status '''Bolck''' infrared. | ||
− | * Black&White Mode | + | *Black&White Mode |
Image is Black&White Mode and IR_CUT status '''Deliver''' infrared. | Image is Black&White Mode and IR_CUT status '''Deliver''' infrared. | ||
− | * Trigger Mode | + | *Trigger Mode |
Trigger pin : [[VEYE-MIPI-290/327|J3 pin1]]. | Trigger pin : [[VEYE-MIPI-290/327|J3 pin1]]. | ||
Line 277: | Line 277: | ||
Trigger pin Low(GND),Image is Color Mode and IR-CUT status '''Bolck''' infrared. | Trigger pin Low(GND),Image is Color Mode and IR-CUT status '''Bolck''' infrared. | ||
− | ===== mshutter ===== | + | =====mshutter===== |
− | <br /> | + | 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 is exposure time(seconds) | ||
+ | |||
+ | If value is greater than or equal to 0x4B, it enters slow shutter mode. | ||
+ | {| class="wikitable" | ||
+ | |+ | ||
+ | !value | ||
+ | !description | ||
+ | |- | ||
+ | | | ||
+ | |NTSC(PAL) | ||
+ | |- | ||
+ | |0x40 | ||
+ | |auto mode | ||
+ | |- | ||
+ | |0x41 | ||
+ | |1/30 (25) | ||
+ | |- | ||
+ | |0x42 | ||
+ | |1/60(50) | ||
+ | |- | ||
+ | |0x43 | ||
+ | |1/100(120) | ||
+ | |- | ||
+ | |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 | ||
+ | |}<br /> |
Revision as of 17:10, 25 October 2019
veye_mipi_i2c.sh MANUAL
1 Overview
There are 4 files: camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。
Running
./enable_i2c_vc.sh
./camera_i2c_config
first,it will config IO pin.
Then you can run veye_mipi_i2c.sh.
2 camera_i2c_config USAGE
- for standard RPI, just run
./camera_i2c_config
- for RPI Computer Module
./camera_i2c_config [cameranum]
cameranum | description |
---|---|
0 | CAM0 |
1 | CAM1 |
3 veye_mipi_i2c.sh USAGE
./veye_mipi_i2c.sh
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
support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger,mshutter
Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G),we use i2c0
Compute Module/ CM3,we use i2c1,please add -b 1 option.
3.1 devid
./veye_mipi_i2c.sh -r -f devid
value | description |
---|---|
0x02 | MIPI, WDRDisable, 2Lane |
0x22 | MIPI, WDREnable, 2Lane |
0x13 | LVDS,WDRDisable,3Lane |
0x33 | LVDS,WDREnable,3Lane |
3.2 hdver
./veye_mipi_i2c.sh -r -f hdver
value | description |
---|---|
0xXX | Version |
3.3 wdrmode
./veye_mipi_i2c.sh -r -f wdrmode
./veye_mipi_i2c.sh -w -f wdrmode -p1 [value]
value | description |
---|---|
0x00 | Back Light Mode OFF |
0x01 | Back Light Mode ON, LOW |
0x02 | Back Light Mode ON, HIGH |
0x03 | WDR Enable |
3.4 videoformat
./veye_mipi_i2c.sh -r -f videoformat
./veye_mipi_i2c.sh -w -f videoformat -p1 [value]
WARNING:THIS FUNCTION MUST BE CALLED BEFORE ANY video applications
value | description |
---|---|
PAL | PAL(50Hz) |
NTSC | NTSC(60Hz) |
3.5 mirrormode
./veye_mipi_i2c.sh -r -f mirrormode
./veye_mipi_i2c.sh -w -f mirrormode -p1 [value]
value | description |
---|---|
0x00 | Normal |
0x01 | Mirror |
0x02 | V-Flip |
0x03 | Mirror And V-Flip(180 Degree Rotate) |
3.6 denoise
./veye_mipi_i2c.sh -r -f denoise
./veye_mipi_i2c.sh -w -f denoise -p1 [value]
value | description |
---|---|
0x00 | NR 2D Mode = OFF; NR 3D Mode = OFF |
0x01 | NR 2D Mode = OFF; NR 3D Mode = LOW |
0x02 | NR 2D Mode = OFF; NR 3D Mode = MIDDLE |
0x03 | NR 2D Mode = OFF; NR 3D Mode = HIGH |
0x04 | NR 2D Mode = LOW; NR 3D Mode = OFF |
0x05 | NR 2D Mode = LOW; NR 3D Mode = LOW |
0x06 | NR 2D Mode = LOW; NR 3D Mode = MIDDLE |
0x07 | NR 2D Mode = LOW; NR 3D Mode = HIGH |
0x08 | NR 2D Mode =MIDDLE; NR 3D Mode = OFF |
0x09 | NR 2D Mode =MIDDLE; NR 3D Mode = LOW |
0x0A | NR 2D Mode = MIDDLE; NR 3D Mode = MIDDLE |
0x0B | NR 2D Mode = MIDDLE; NR 3D Mode = HIGH |
0x0C | NR 2D Mode =HIGH; NR 3D Mode = OFF |
0x0D | NR 2D Mode =HIGH; NR 3D Mode = LOW |
0x0E | NR 2D Mode = HIGH; NR 3D Mode = MIDDLE |
0x0F | NR 2D Mode = HIGH; NR 3D Mode = HIGH |
3.7 agc
./veye_mipi_i2c.sh -r -f agc
./veye_mipi_i2c.sh -w -f agc -p1 [value]
value | description |
---|---|
0x00~0x0F | AGC intensity |
3.8 lowlight
./veye_mipi_i2c.sh -r -f lowlight
./veye_mipi_i2c.sh -w -f lowlight -p1 [value]
value | description |
---|---|
0x01 | 1/2*(FRAME RATE) |
0x03 | 1/4*(FRAME RATE) |
0x05 | 1/6*(FRAME RATE) |
0x07 | 1/8*(FRAME RATE) |
0x09 | 1/10*(FRAME RATE) |
0x0B | 1/15*(FRAME RATE) |
0x0D | 1/20*(FRAME RATE) |
0x0F | 1/25*(FRAME RATE) |
0x11 | 1/30*(FRAME RATE) |
0x00 | Fixed frame rate (25/30) |
3.9 daynightmode
./veye_mipi_i2c.sh -r -f daynightmode
./veye_mipi_i2c.sh -w -f daynightmode -p1 [value]
value | description |
---|---|
0xFF | Color Mode |
0xFE | Black&White Mode |
0xFC | 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 Bolck infrared.
- Black&White Mode
Image is Black&White Mode and IR_CUT status Deliver infrared.
- Trigger Mode
Trigger pin : 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.
3.10 mshutter
close AE, use manual shutter
./veye_mipi_i2c.sh -r -f mshutter
./veye_mipi_i2c.sh -w -f mshutter -p1 [value]
value is exposure time(seconds)
If value is greater than or equal to 0x4B, it enters slow shutter mode.
value | description |
---|---|
NTSC(PAL) | |
0x40 | auto mode |
0x41 | 1/30 (25) |
0x42 | 1/60(50) |
0x43 | 1/100(120) |
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 |