Line 2: |
Line 2: |
| [[Mv mipi camera manual|English]] | | [[Mv mipi camera manual|English]] |
| | | |
− | '''<big>MV系列MIPI图像模组功能手册</big>''' | + | '''<big>MV系列和RAW系列MIPI摄像机模组功能手册</big>''' |
| | | |
| === 概述 === | | === 概述 === |
| MV系列是专门为机器视觉设计的系列相机模块。它性能优异,结构紧凑,价格实惠。除了视频流模式外,还提供了触发模式和一系列与触发相关的功能。 | | MV系列是专门为机器视觉设计的系列相机模块。它性能优异,结构紧凑,价格实惠。除了视频流模式外,还提供了触发模式和一系列与触发相关的功能。 |
| + | |
| + | RAW系列相机只有一个mcu作为辅助控制芯片,并不包含ISP模块。因此,其功能是MV系列的子集。在后文中每个功能的描述中会列出该功能是否适用于RAW系列相机。 |
| + | |
| + | 此外,RAW系列相机支持SDA(Sensor direct access)模式,会在本文最后章节详述。 |
| | | |
| 为方便客户快速开发,我们提供了软硬件说明,寄存器手册以及嵌入式平台下的驱动,demo。 | | 为方便客户快速开发,我们提供了软硬件说明,寄存器手册以及嵌入式平台下的驱动,demo。 |
Line 13: |
Line 17: |
| 本文中,每个功能后[相关命令]一栏列出了[[Mv mipi i2c.sh user guide|mv_mipi_i2c.sh]]脚本中于此功能有关的命令'''。''' | | 本文中,每个功能后[相关命令]一栏列出了[[Mv mipi i2c.sh user guide|mv_mipi_i2c.sh]]脚本中于此功能有关的命令'''。''' |
| | | |
− | === 图像采集 === | + | ==== 摄像机型号列表 ==== |
| + | {| class="wikitable" |
| + | !Series |
| + | !Model |
| + | !Max Resolution |
| + | !Shutter Mode |
| + | |- |
| + | | rowspan="6" |MV series |
| + | |MV-MIPI-IMX178M |
| + | |3088×2064@22.3 fps |
| + | |Rolling |
| + | |- |
| + | |MV-MIPI-IMX287M |
| + | |720×544 @ 530fps RAW8 |
| + | 720×544 @ 437fps RAW10 |
| | | |
| + | 720×544 @ 320fps RAW12 |
| + | |Global |
| + | |- |
| + | | MV-MIPI-SC130M |
| + | |1280×1024@214fps RAW8 |
| + | 1280×1024@177fps RAW10 |
| + | |Global |
| + | |- |
| + | |MV-MIPI-IMX296M |
| + | |1456×1088@60.3fps |
| + | |Global |
| + | |- |
| + | |MV-MIPI-IMX265M |
| + | |2064×1544@55fps |
| + | |Global |
| + | |- |
| + | |MV-MIPI-IMX264M |
| + | |2464×2056@35fps |
| + | |Global |
| + | |- |
| + | | rowspan="3" |RAW series |
| + | |RAW-MIPI-SC132M |
| + | |1080×1280@120fps |
| + | |Global |
| + | |- |
| + | |RAW-MIPI-IMX462M |
| + | |4lane mode@RAW10:1944 x 1096 @120fps |
| + | 2lane mode@RAW10/RAW12:1944 x 1096 @60fps |
| + | |Rolling |
| + | |- |
| + | |RAW-MIPI-AR0234M |
| + | |4lane mode:1920 x 1200 @120fps |
| + | 2lane mode:1920 x 1200 @60fps |
| + | |Global |
| + | |} |
| + | ===图像采集=== |
| ==== 卷帘式曝光和全局曝光 ==== | | ==== 卷帘式曝光和全局曝光 ==== |
| | | |
Line 41: |
Line 95: |
| | | |
| ===== Rolling shutter(卷帘式曝光) ===== | | ===== Rolling shutter(卷帘式曝光) ===== |
| + | 本节适用型号:MV-MIPI-IMX178M。 |
| + | |
| 对于rolling shutter的sensor,如IMX178,一个完整的图像帧需要两帧图像周期才可以完成从曝光到输出的过程。所以最大帧率为视频流模式的一半。 | | 对于rolling shutter的sensor,如IMX178,一个完整的图像帧需要两帧图像周期才可以完成从曝光到输出的过程。所以最大帧率为视频流模式的一半。 |
| | | |
Line 50: |
Line 106: |
| [[File:Rolling shutter Normal trigger mode new2.png|alt=|center|thumb|799x799px|Normal trigger mode( Rolling shutter)]] | | [[File:Rolling shutter Normal trigger mode new2.png|alt=|center|thumb|799x799px|Normal trigger mode( Rolling shutter)]] |
| | | |
− | ===== Global shutter(全局曝光) ===== | + | ===== Smartsens's Global shutter(全局曝光) ===== |
− | 对于global shutter的sensor,如SC130GS,一个完整的图像帧,需要经过曝光周期(exp time)和读出周期(read out)才可以完成。读出完成后才可以进行第二帧的曝光。
| + | 本节适用于: MV-MIPI-SC130M,RAW-MIPI-SC132M。 |
| + | |
| + | 对于斯特威的global shutter sensor,如SC130GS,一个完整的图像帧,需要经过曝光周期(exp time)和读出周期(read out)才可以完成。读出完成后才可以进行第二帧的曝光。 |
| | | |
| 在普通触发模式下,针对global shutter的sensor,我们将一个曝光周期(exp time)和读出周期(read out)称为一个'''''触发周期'''''。 | | 在普通触发模式下,针对global shutter的sensor,我们将一个曝光周期(exp time)和读出周期(read out)称为一个'''''触发周期'''''。 |
| | | |
− | 因此触发模式下最大帧率受曝光时间长度的影响。
| + | 因此触发模式下最大帧率受曝光时间长度的影响,而且无法达到与视频流模式同样高的帧率。 |
| | | |
| 下图以触发触发帧数设置为2为例: | | 下图以触发触发帧数设置为2为例: |
− | [[File:Normal trigger mode (Global shutter).png|center|thumb|800x800px|Normal trigger mode (Global shutter)]] | + | [[File:Normal trigger mode (Global shutter).png|center|thumb|800x800px|Smartsens's Normal trigger mode (Global shutter)]] |
| + | <br />对于RAW系列模组,不支持Exposure Delay和Trigger interval,触发帧数只支持1帧。 |
| + | |
| + | ===== Sony's Global shutter(全局曝光) ===== |
| + | 本节适用于: MV-MIPI-IMX296M,MV-MIPI-IMX265M,MV-MIPI-IMX264M,MV-MIPI-IMX287M。 |
| + | |
| + | 对于Sony的global shutter sensor,在外触发模式下,上一帧的读出和下一帧的曝光可以同步进行。因此,可以达到几乎与视频流模式一样的外触发帧率。 |
| + | |
| + | 下图以触发触发帧数设置为2为例: |
| + | [[File:Sony's Normal trigger mode (Global shutter).png.png|center|thumb|800x800px|Sony's Normal trigger mode (Global shutter)]] |
| <br /> | | <br /> |
− |
| |
| ==== 高速触发模式 ==== | | ==== 高速触发模式 ==== |
| | | |
| ===== Rolling shutter(卷帘式曝光) ===== | | ===== Rolling shutter(卷帘式曝光) ===== |
| + | 本节适用型号:MV-MIPI-IMX178M。 |
| + | |
| 在高速触发模式下,假设一次触发帧数设置为N,那么第2到N帧都紧跟着前一帧输出,不再有触发间隔。这样可以达到与视频流模式一样的最高帧率。<br />下图以触发触发帧数设置为3为例: | | 在高速触发模式下,假设一次触发帧数设置为N,那么第2到N帧都紧跟着前一帧输出,不再有触发间隔。这样可以达到与视频流模式一样的最高帧率。<br />下图以触发触发帧数设置为3为例: |
| [[File:Rolling shutter High-speed trigger mode.png|center|thumb|800x800px|High-speed trigger mode(Rolling shutter)]] | | [[File:Rolling shutter High-speed trigger mode.png|center|thumb|800x800px|High-speed trigger mode(Rolling shutter)]] |
Line 108: |
Line 176: |
| |MV-MIPI-IMX178M | | |MV-MIPI-IMX178M |
| |Mono8,Mono10,Mono12 | | |Mono8,Mono10,Mono12 |
− | |sensor的输出都是12bit-depth | + | |sensor的AD是12bit-depth |
| |- | | |- |
| |MV-MIPI-SC130M | | |MV-MIPI-SC130M |
| |Mono8,Mono10 | | |Mono8,Mono10 |
− | |sensor的输出都是10bit-depth | + | |sensor的AD是10bit-depth |
| + | |- |
| + | |MV-MIPI-IMX287M |
| + | |Mono8,Mono10,Mono12 |
| + | |sensor的AD是8,10,12bit-depth |
| + | |- |
| + | |MV-MIPI-IMX296M |
| + | |Mono8,Mono10 |
| + | |sensor的AD是10bit-depth |
| + | |- |
| + | |MV-MIPI-IMX265M |
| + | |Mono8,Mono10,Mono12 |
| + | |sensor的AD是12bit-depth |
| + | |- |
| + | |MV-MIPI-IMX264M |
| + | |Mono8,Mono10,Mono12 |
| + | |sensor的AD是12bit-depth |
| + | |- |
| + | |RAW-MIPI-SC132M |
| + | |Mono8,Mono10 |
| + | |sensor的AD是10bit-depth |
| + | |- |
| + | |RAW-MIPI-IMX462M |
| + | |Mono10,Mono12 |
| + | |sensor的AD是10,12bit-depth |
| + | |- |
| + | |RAW-MIPI-AR0234M |
| + | |Mono8,Mono10 |
| + | |sensor的AD是10bit-depth |
| |} | | |} |
| 相关命令:fmtcap,pixelformat。 | | 相关命令:fmtcap,pixelformat。 |
Line 149: |
Line 245: |
| | rowspan="3" |MV-MIPI-SC130M | | | rowspan="3" |MV-MIPI-SC130M |
| |1280 × 1024 | | |1280 × 1024 |
− | |108 | + | |214 |
| + | |最大尺寸,RAW8 |
| + | |- |
| + | |1280 x 720 |
| + | |249 |
| + | |RAW8 |
| + | |- |
| + | |640 x 480 |
| + | |367 |
| + | |RAW8 |
| + | |- |
| + | | rowspan="2" |MV-MIPI-IMX296M |
| + | |1456×1088 |
| + | |60.3 |
| |最大尺寸 | | |最大尺寸 |
| |- | | |- |
| |1280 x 720 | | |1280 x 720 |
− | |152 | + | |90 |
| + | | |
| + | |- |
| + | | rowspan="3" |MV-MIPI-IMX287M |
| + | | rowspan="3" |720x544 |
| + | |530 |
| + | |RAW8 |
| + | |- |
| + | |437 |
| + | |RAW10 |
| + | |- |
| + | |320 |
| + | |RAW12 |
| + | |- |
| + | |MV-MIPI-IMX265M |
| + | |2064×1544 |
| + | |55 |
| + | |最大尺寸 |
| + | |- |
| + | | rowspan="2" |MV-MIPI-IMX264M |
| + | |2464×2056 |
| + | |35 |
| + | |最大尺寸 |
| + | |- |
| + | |1920 x 1080 |
| + | |67 |
| + | | |
| + | |- |
| + | |RAW-MIPI-SC132M |
| + | |1080×1280 |
| + | |120 |
| + | |最大尺寸 |
| + | |- |
| + | | rowspan="2" |RAW-MIPI-IMX462M |
| + | |1920x1088@4lane raw10 |
| + | |120 |
| + | | |
| + | |- |
| + | |1920x1088@2lane raw10/12 |
| + | |60 |
| + | | |
| + | |- |
| + | | rowspan="2" |RAW-MIPI-AR0234M |
| + | |1920x1200@4lane |
| + | |120 |
| | | | | |
| |- | | |- |
− | |640 x 480 | + | |1920x1200@2lane |
− | |223 | + | |60 |
| | | | | |
| |} | | |} |
− |
| |
| | | |
| 实际帧率可以小于最高帧率,而且可以设置为小数。为了保证相机帧率,我们规定了最大曝光时间不能大于[1/fps]秒。 | | 实际帧率可以小于最高帧率,而且可以设置为小数。为了保证相机帧率,我们规定了最大曝光时间不能大于[1/fps]秒。 |
Line 186: |
Line 338: |
| |MV-MIPI-SC130M | | |MV-MIPI-SC130M |
| |64 x 64 | | |64 x 64 |
| + | | |
| + | |- |
| + | |MV-MIPI-IMX296M |
| + | |80x4 |
| + | | |
| + | |- |
| + | |MV-MIPI-IMX287M |
| + | |264x4 |
| + | | |
| + | |- |
| + | |MV-MIPI-IMX265M |
| + | |264x4 |
| + | | |
| + | |- |
| + | |MV-MIPI-IMX264M |
| + | |264x4 |
| + | | |
| + | |- |
| + | |RAW-MIPI-SC132M |
| + | |64x64 |
| + | | |
| + | |- |
| + | |RAW-MIPI-IMX462M |
| + | |368x304 |
| + | | |
| + | |- |
| + | |RAW-MIPI-AR0234M |
| + | |64x64 |
| | | | | |
| |}摄像机将对用户参数进行必要的调整以满足参数要求。所以建议写完ROI参数之后,重新读出以确认真正生效的ROI区域。 | | |}摄像机将对用户参数进行必要的调整以满足参数要求。所以建议写完ROI参数之后,重新读出以确认真正生效的ROI区域。 |
Line 192: |
Line 372: |
| | | |
| ==== 镜像翻转 ==== | | ==== 镜像翻转 ==== |
− | 此功能比较容易理解。需要特别说明的是,同时开启ROI和镜像翻转功能,图像首先镜像或者翻转,然后ROI裁剪。
| + | 此功能比较容易理解。需要特别说明的是,同时开启ROI和镜像翻转功能,图像首先ROI裁剪,然后镜像或者翻转。 |
− | [[File:Roi region and MF.jpg|center|thumb|800x800px|ROI and Mirror/Flip]] | + | [[File:ROI Mirror Flip.jpg|alt=|center|thumb|799x799px|ROI and Mirror/Flip]] |
| <br />相关命令:imgdir。 | | <br />相关命令:imgdir。 |
| ==== 黑电平 ==== | | ==== 黑电平 ==== |
Line 213: |
Line 393: |
| [[File:Test pattern2 enlarged.png|center|thumb|800x800px|Test pattern2 (enlarged)]] | | [[File:Test pattern2 enlarged.png|center|thumb|800x800px|Test pattern2 (enlarged)]] |
| | | |
− | ===== MV-MIPI-SC130M ===== | + | ===== MV-MIPI-SC130M RAW-MIPI-SC132M ===== |
| | | |
| ====== 模式1:灰度渐变测试图 ====== | | ====== 模式1:灰度渐变测试图 ====== |
| [[File:Test-pattern1 sc130m.png|alt=Test-pattern1 sc130m|center|thumb|800x800px|Test-pattern1 sc130m]] | | [[File:Test-pattern1 sc130m.png|alt=Test-pattern1 sc130m|center|thumb|800x800px|Test-pattern1 sc130m]] |
| + | <br /> |
| + | |
| + | ===== RAW-MIPI-AR0234M ===== |
| + | 模式1:固定亮度灰度图 |
| + | |
| + | 固定亮度为最大亮度的一半。 |
| + | [[File:Test pattern1 of 0234m.jpg|center|thumb|800x800px|Test pattern1 of 0234m]] |
| + | |
| + | |
| + | 模式2:color bar |
| + | [[File:Test pattern2 of ar0234m.jpg|center|thumb|800x800px|Test pattern2 of ar0234m]] |
| + | |
| 相关命令:testimg。 | | 相关命令:testimg。 |
| | | |
| === ISP功能 === | | === ISP功能 === |
| + | 通常情况下,RAW系列相机在这个部分仅支持手动曝光和手动增益。然而,RAW-MIPI-AR0234M支持AEC控制。 |
| + | |
| + | RAW-MIPI-AR0234M支持的功能包括: |
| + | |
| + | AAROI、手动曝光、自动曝光、手动增益、自动增益。 |
| | | |
| ==== 曝光和增益控制 ==== | | ==== 曝光和增益控制 ==== |
Line 268: |
Line 465: |
| |- | | |- |
| |MV-MIPI-SC130M | | |MV-MIPI-SC130M |
| + | |0-40dB |
| + | |0.1dB |
| + | |- |
| + | |MV-MIPI-IMX287M |
| + | |0-48dB |
| + | |0.1dB |
| + | |- |
| + | |MV-MIPI-IMX296M |
| + | |0-48dB |
| + | |0.1dB |
| + | |- |
| + | |MV-MIPI-IMX265M |
| + | |0-48dB |
| + | |0.1dB |
| + | |- |
| + | |MV-MIPI-IMX264M |
| + | |0-48dB |
| + | |0.1dB |
| + | |- |
| + | |RAW-MIPI-SC132M |
| |0-40dB | | |0-40dB |
| |0.1dB | | |0.1dB |
Line 325: |
Line 542: |
| | | |
| === IO控制 === | | === IO控制 === |
| + | 对于RAW系列摄像头,输入IO支持触发边沿和触发延迟,不支持触发滤波功能。输出IO是直接引出的sensor的strobe out接口。 |
| | | |
| ==== 输入引脚配置 ==== | | ==== 输入引脚配置 ==== |
Line 344: |
Line 562: |
| | | |
| 相关命令:trgfilter_enable,trgfilter_time。 | | 相关命令:trgfilter_enable,trgfilter_time。 |
| + | |
| + | RAW系列摄像机模组不支持触发滤波功能。 |
| | | |
| ===== 触发延迟 ===== | | ===== 触发延迟 ===== |
Line 374: |
Line 594: |
| [[File:Normal trigger mode details (Global shutter).png|center|thumb|800x800px|Normal trigger mode details (Global shutter)]] | | [[File:Normal trigger mode details (Global shutter).png|center|thumb|800x800px|Normal trigger mode details (Global shutter)]] |
| <br /> | | <br /> |
− | ====== 普通触发模式(rolling shutter) ====== | + | ====== Smartsens's 普通触发模式(rolling shutter) ====== |
| + | 下图以触发触发帧数设置为2为例,列出Strobe信号和TriggerWait信号: |
| + | [[File:Rolling shutter Normal trigger mode full-new.png|alt=|center|thumb|800x800px|Smartsens's Normal trigger mode; Strobe and TriggerWait]]<br /> |
| + | ====== Sony's 普通触发模式(rolling shutter) ====== |
| 下图以触发触发帧数设置为2为例,列出Strobe信号和TriggerWait信号: | | 下图以触发触发帧数设置为2为例,列出Strobe信号和TriggerWait信号: |
− | [[File:Rolling shutter Normal trigger mode full-new.png|alt=|center|thumb|800x800px|Normal trigger mode; Strobe and TriggerWait]] | + | [[File:Sony Normal trigger mode detail(Global shutter).png.png|center|thumb|800x800px|Sony's Normal trigger mode, Strobe and TriggerWait]] |
− | | + | <br /> |
| ====== 高速触发模式(rolling shutter) ====== | | ====== 高速触发模式(rolling shutter) ====== |
| 下图以触发触发帧数设置为3为例,列出Strobe信号和TriggerWait信号: | | 下图以触发触发帧数设置为3为例,列出Strobe信号和TriggerWait信号: |
Line 397: |
Line 620: |
| | | |
| 相关命令 :gpios_status. | | 相关命令 :gpios_status. |
| + | |
| + | === RAW series camera的特别说明 === |
| + | RAW系列相机只有一个MCU作为辅助控制芯片。普通模式和SDA模式可以通过[[Mv mipi i2c.sh user guide#mcubypass|mcubypass]]命令进行切换。 |
| + | |
| + | ==== 普通模式 ==== |
| + | 普通模式下,主板不能直接访问sensor。MCU提供了对sensor的初始化配置以及各种功能的配置。对不同的嵌入式平台,我们都提供了对应的驱动、脚本、demo。 |
| + | |
| + | 其功能的介绍参考本文上面的描述。 |
| + | |
| + | ==== SDA 模式 ==== |
| + | SDA模式是Sensor Direct Access的缩写,此时MCU不再对sensor的i2c做任何控制,而是直接由用户控制sensor。 |
| + | |
| + | 同时,为了提供必要的系统信息、模式切换、触发信号配置,MCU本身依旧对外提供i2c接口。 |
| + | |
| + | 比如,RAW系列摄像头在SDA模式下,具备两个i2c地址:0x30是sensor的地址,0x3b是MCU的地址。 |
| + | |
| + | SDA模式下,我们提供的驱动和demo均不再适用,只有部分[[Mv mipi i2c.sh user guide|mv_mipi_i2c.sh]]指令和[[MV Series MIPI Camera Register Map/zh|寄存器]]可用。 |
| + | |
| + | ==== 触发延迟 ==== |
| + | 对于RAW系列摄像头,触发信号需要经过MCU的转发而传递给sensor。这个转发有一个固定的850ns左右的延迟。<br /> |