Image Sensor的曝光(又叫积分时间)设置是图像处理过程中一个比较重要的参数(通常用行为单位进行表示)不同的曝光方式,寄存器的配置是不一样的,各厂商的曝光设置也会有所不同。以常用Image Sensor知名厂商OV和Sony的为例,简单介绍下曝光是如何设置的。
1.OV Image Sensor
1)曝光设置
以OV2740为例,其采用卷帘曝光(rolling shutter)方式,卷帘曝光的主要原理是,有一个reset信号负责一行像素清零,一个read信号负责读取一行像素数据,reset信号在前,read信号在后,reset信号和read信号之间的行数对应的时间即为曝光时间。清楚其原理,计算曝光时间就简单了。
a)计算一行时间
line_time=HTS/pixel_clock
这里的HTS是一行总的像素,包含blanking时间
pixel_clock为pixel clock,像素时钟
CSI接口的pixel clock计算:
pixel_clk_hz = sensor data rate per lane (Mbps) * number of lanes / bits per pixel
For example:
Sensor data rate = 891 Mbps (per lane)
Number of lanes = 4
Bits per pixel = 10
pixel_clk_hz = 891 Mbps * 4 / 10 Hz = 356400000 Hz
b)寄存器设置
通常Image sensor与曝光设置相关的寄存