[go: up one dir, main page]

CN110602420A - Camera, black level adjusting method and device - Google Patents

Camera, black level adjusting method and device Download PDF

Info

Publication number
CN110602420A
CN110602420A CN201910944822.8A CN201910944822A CN110602420A CN 110602420 A CN110602420 A CN 110602420A CN 201910944822 A CN201910944822 A CN 201910944822A CN 110602420 A CN110602420 A CN 110602420A
Authority
CN
China
Prior art keywords
image signal
black level
adjustment
current frame
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910944822.8A
Other languages
Chinese (zh)
Other versions
CN110602420B (en
Inventor
於敏杰
聂鑫鑫
罗丽红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910944822.8A priority Critical patent/CN110602420B/en
Publication of CN110602420A publication Critical patent/CN110602420A/en
Application granted granted Critical
Publication of CN110602420B publication Critical patent/CN110602420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/63Noise processing, e.g. detecting, correcting, reducing or removing noise applied to dark current

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Solid State Image Pick-Up Elements (AREA)
  • Studio Devices (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

本申请实施例提供一种相机、黑电平调整方法及装置,该相机包括单个的图像传感器和处理芯片,图像传感器用于在第一工作模式下根据第一曝光参数生成并向处理芯片输出第一图像信号;处理芯片用于根据第一调整方式对第一图像信号进行黑电平调整,得到第一调整信号;图像传感器还用于在第二工作模式下通过多次曝光交替生成并向处理芯片输出第二图像信号和第三图像信号;处理芯片还用于根据第二调整方式对第二图像信号进行黑电平调整,得到第二调整信号;根据第三调整方式对第三图像信号进行黑电平调整,得到第三调整信号。本申请实施例能够解决在对多帧图像数据进行黑电平调整时出现图像画面跳跃严重的问题。

Embodiments of the present application provide a camera, a black level adjustment method, and a device. The camera includes a single image sensor and a processing chip, and the image sensor is used to generate and output the first exposure parameter to the processing chip in the first working mode. An image signal; the processing chip is used to adjust the black level of the first image signal according to the first adjustment method to obtain the first adjustment signal; the image sensor is also used to alternately generate and process the signal through multiple exposures in the second working mode The chip outputs the second image signal and the third image signal; the processing chip is also used to adjust the black level of the second image signal according to the second adjustment method to obtain the second adjustment signal; according to the third adjustment method, the third image signal is adjusted The black level is adjusted to obtain a third adjustment signal. The embodiment of the present application can solve the problem that the image frame jumps seriously when adjusting the black level of multiple frames of image data.

Description

相机、黑电平调整方法及装置Camera, method and device for adjusting black level

技术领域technical field

本申请涉及图像处理技术领域,尤其涉及一种相机、黑电平调整方法及装置。The present application relates to the technical field of image processing, and in particular to a camera, a method and a device for adjusting a black level.

背景技术Background technique

图像传感器是一种将光信号转换为电子信号的设备,图像传感器获得的图像数据在生成数字图像之前,通常需要进行黑电平校准,来确定图像传感器的黑电平,从而获得阴影区域具有全对比和细微细节的数字图像。An image sensor is a device that converts light signals into electronic signals. Before the image data obtained by the image sensor is generated into a digital image, black level calibration is usually required to determine the black level of the image sensor, so that the shadow area has full Digital images of contrast and fine detail.

现有的黑电平调整方法,对于每一帧图像传感器采集的图像数据,通常是在图像传感器内部进行黑电平调整,例如会将图像数据中的黑像素区域的黑电平求取平均值,得到图像数据的黑电平偏移值,然后根据该黑电平偏移值来对图像数据的有效像素区域进行黑电平调整。但是,现有的黑电平调整方法,在针对同一图像传感器采集的多路图像信号时,当多路图像信号的曝光条件不同的情况下,容易造成图像的黑电平调整不稳定的问题。In the existing black level adjustment method, for each frame of image data collected by the image sensor, the black level adjustment is usually performed inside the image sensor, for example, the black level of the black pixel area in the image data is averaged , to obtain the black level offset value of the image data, and then adjust the black level of the effective pixel area of the image data according to the black level offset value. However, when the existing black level adjustment method is aimed at multiple image signals collected by the same image sensor, when the exposure conditions of the multiple image signals are different, it is easy to cause the problem of unstable black level adjustment of the image.

发明内容Contents of the invention

本申请实施例提供一种相机、黑电平调整方法及装置,以解决现有技术在对多帧图像数据进行黑电平调整时容易出现黑电平调整不稳定的问题。Embodiments of the present application provide a camera, a method and a device for adjusting a black level, so as to solve the problem in the prior art that the black level adjustment is prone to be unstable when adjusting the black level of multi-frame image data.

第一方面,本申请实施例提供一种相机,包括单个的图像传感器和处理芯片,所述图像传感器的输出端与所述处理芯片连接,其中:In the first aspect, an embodiment of the present application provides a camera, including a single image sensor and a processing chip, the output end of the image sensor is connected to the processing chip, wherein:

所述图像传感器用于,在第一工作模式下根据第一曝光参数生成并向所述处理芯片输出第一图像信号;The image sensor is used to generate and output a first image signal to the processing chip according to a first exposure parameter in a first working mode;

所述处理芯片用于,在接收到所述第一图像信号时,根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The processing chip is configured to, when receiving the first image signal, adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal;

所述图像传感器还用于,在第二工作模式下通过多次曝光交替生成并向所述处理芯片输出第二图像信号和第三图像信号,其中,所述第二图像信号根据第二曝光参数生成,所述第三图像信号根据第三曝光参数生成;The image sensor is also used to alternately generate and output a second image signal and a third image signal to the processing chip through multiple exposures in the second working mode, wherein the second image signal is based on the second exposure parameter generating, the third image signal is generated according to a third exposure parameter;

所述处理芯片还用于,在接收到所述第二图像信号时,根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;在接收到所述第三图像信号时,根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;交替输出所述第二调整信号和第三调整信号。The processing chip is further configured to, when receiving the second image signal, adjust the black level of the second image signal according to a second adjustment method to obtain a second adjustment signal; For an image signal, adjust the black level of the third image signal according to a third adjustment method to obtain a third adjustment signal; alternately output the second adjustment signal and the third adjustment signal.

在一种可能的实现方式中,还包括曝光参数控制单元,其中:In a possible implementation manner, an exposure parameter control unit is also included, wherein:

所述曝光参数控制单元用于,在所述第二工作模式下向所述图像传感器交替输出所述第二曝光参数和所述第三曝光参数。The exposure parameter control unit is configured to alternately output the second exposure parameter and the third exposure parameter to the image sensor in the second working mode.

在一种可能的实现方式中,所述第二曝光参数与所述第三曝光参数中至少一个曝光参数不同,所述至少一个曝光参数为曝光时间、曝光增益、光圈大小中的一种或多种,所述曝光增益包括模拟增益,和/或,数字增益。In a possible implementation manner, the second exposure parameter is different from at least one of the third exposure parameters, and the at least one exposure parameter is one or more of exposure time, exposure gain, and aperture size. One, the exposure gain includes analog gain, and/or, digital gain.

在一种可能的实现方式中,所述第一调整方式具体为:In a possible implementation manner, the first adjustment manner is specifically:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame.

在一种可能的实现方式中,所述第二调整方式具体为:In a possible implementation manner, the second adjustment manner is specifically:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level information of the second image signal of the historical frame, wherein, The second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

在一种可能的实现方式中,所述第三调整方式具体为:In a possible implementation manner, the third adjustment manner is specifically:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

在一种可能的实现方式中,所述处理芯片还用于:In a possible implementation manner, the processing chip is also used for:

在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Processing the first adjustment signal in the first working mode to obtain and output a first processed image;

在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。In the second working mode, the second adjustment signal is processed to obtain and output a second processed image, and the third adjustment signal is processed to obtain and output a third processed image; or, in the In the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

第二方面,本申请实施例提供一种黑电平调整方法,应用于相机,所述相机包括单个的图像传感器和处理芯片,所述图像传感器的输出端与所述处理芯片连接,所述方法包括:In the second aspect, the embodiment of the present application provides a black level adjustment method, which is applied to a camera, the camera includes a single image sensor and a processing chip, and the output terminal of the image sensor is connected to the processing chip, the method include:

通过所述图像传感器在第一工作模式下根据第一曝光参数生成第一图像信号,并通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The first image signal is generated by the image sensor according to the first exposure parameter in the first working mode, and the black level of the first image signal is adjusted by the processing chip according to the first adjustment method to obtain the first adjustment Signal;

通过所述图像传感器在第二工作模式下通过多次曝光交替生成第二图像信号和第三图像信号,其中,第二图像信号根据第二曝光参数生成,第三图像信号根据第三曝光参数生成;通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;通过所述处理芯片交替输出所述第二调整信号和所述第三调整信号。The second image signal and the third image signal are alternately generated by the image sensor through multiple exposures in the second working mode, wherein the second image signal is generated according to the second exposure parameter, and the third image signal is generated according to the third exposure parameter ; adjust the black level of the second image signal by the processing chip according to the second adjustment method to obtain a second adjustment signal; perform black level adjustment on the third image signal by the processing chip according to the third adjustment method level adjustment to obtain a third adjustment signal; and alternately output the second adjustment signal and the third adjustment signal through the processing chip.

在一种可能的实现方式中,所述相机还包括曝光参数控制单元,所述方法还包括:In a possible implementation manner, the camera further includes an exposure parameter control unit, and the method further includes:

在所述第二工作模式下通过所述曝光参数控制单元向所述图像传感器交替输出所述第二曝光参数和所述第三曝光参数;Alternately outputting the second exposure parameter and the third exposure parameter to the image sensor by the exposure parameter control unit in the second working mode;

在一种可能的实现方式中,所述通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号,包括:In a possible implementation manner, the black level adjustment of the first image signal by the processing chip according to the first adjustment method to obtain the first adjustment signal includes:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame

在一种可能的实现方式中,所述通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,包括:In a possible implementation manner, the black level adjustment of the second image signal by the processing chip according to the second adjustment method to obtain the second adjustment signal includes:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

在一种可能的实现方式中,所述通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号,包括:In a possible implementation manner, the black level adjustment of the third image signal by the processing chip according to a third adjustment method to obtain a third adjustment signal includes:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

通过所述处理芯片在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Process the first adjustment signal by the processing chip in the first working mode to obtain and output a first processed image;

通过所述处理芯片在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。Processing the second adjustment signal by the processing chip in the second working mode to obtain and output a second processed image, and processing the third adjustment signal to obtain and output a third processed image; Alternatively, in the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

第三方面,本申请实施例提供一种黑电平调整装置,包括:In a third aspect, an embodiment of the present application provides a black level adjustment device, including:

第一处理模块,用于在图像传感器处于第一工作模式下时,接收第一图像信号,并根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The first processing module is configured to receive a first image signal when the image sensor is in the first working mode, and adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal;

第二处理模块,用于在所述图像传感器处于第二工作模式下时,交替接收第二图像信号和第三图像信号,在接收到所述第二图像信号时根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,在接收到所述第三图像信号时根据第三调整方式对所述第三调整信号进行黑电平调整,得到第三调整信号,并交替输出所述第二调整信号和第三调整信号。The second processing module is configured to alternately receive the second image signal and the third image signal when the image sensor is in the second working mode, and adjust the performing black level adjustment on the second image signal to obtain a second adjustment signal, and performing black level adjustment on the third adjustment signal according to a third adjustment method when receiving the third image signal to obtain a third adjustment signal, And alternately output the second adjustment signal and the third adjustment signal.

在一种可能的实现方式中,所述第一处理模块具体用于:In a possible implementation manner, the first processing module is specifically configured to:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame.

在一种可能的实现方式中,所述第二处理模块具体用于:In a possible implementation manner, the second processing module is specifically configured to:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

在一种可能的实现方式中,所述第二处理模块具体用于:In a possible implementation manner, the second processing module is specifically configured to:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

在一种可能的实现方式中,还包括第三处理模块,所述第三处理模块用于:In a possible implementation manner, a third processing module is also included, and the third processing module is configured to:

在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Processing the first adjustment signal in the first working mode to obtain and output a first processed image;

在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。In the second working mode, the second adjustment signal is processed to obtain and output a second processed image, and the third adjustment signal is processed to obtain and output a third processed image; or, in the In the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

本申请实施例提供的相机、黑电平调整方法及装置,其中相机包括单个的图像传感器和处理芯片,图像传感器的输出端与处理芯片连接,相机包括两种工作模式,在第一工作模式下,图像传感器根据第一曝光参数生成并向处理芯片输出第一图像信号,处理芯片在接收到所述第一图像信号时,根据第一调整方式对第一图像信号进行黑电平调整,得到第一调整信号;在第二工作模式下,图像传感器根据第二曝光参数生成并向处理芯片输出第二图像信号,根据第三曝光参数生成并向处理芯片输出第三图像信号;处理芯片在接收到第二图像信号时,根据第二调整方式对第二图像信号进行黑电平调整,得到第二调整信号;在接收到第三图像信号时,根据第三调整方式对第三图像信号进行黑电平调整,得到第三调整信号。本申请实施例提供的相机,在不同的条件下可相应调整相机所处的工作模式,当相机处于第二工作模式时,针对图像传感器产生的多帧第二图像信号和第三图像信号,在进行黑电平调整时,首先将第二图像信号和第三图像信号区分开,然后分别针对第二图像信号和第三图像信号根据不同的调整方式来进行黑电平调整处理,避免了现有方案将黑电平调整处理设置在图像传感器中进行,在对图像信号进行黑电平调整时,针对不同曝光参数下的图像信号,分别根据相应的调整方式进行黑电平调整处理,使得多路图像信号分开进行调整,使得图像的黑电平调整更加稳定。The camera, black level adjustment method and device provided by the embodiments of the present application, wherein the camera includes a single image sensor and a processing chip, the output end of the image sensor is connected to the processing chip, the camera includes two working modes, in the first working mode , the image sensor generates and outputs the first image signal to the processing chip according to the first exposure parameter, and when the processing chip receives the first image signal, it adjusts the black level of the first image signal according to the first adjustment method to obtain the first image signal An adjustment signal; in the second working mode, the image sensor generates and outputs a second image signal to the processing chip according to the second exposure parameter, and generates and outputs a third image signal to the processing chip according to the third exposure parameter; the processing chip receives the For the second image signal, adjust the black level of the second image signal according to the second adjustment method to obtain the second adjustment signal; when receiving the third image signal, perform black level adjustment on the third image signal according to the third adjustment method Leveling adjustment, get the third adjustment signal. The camera provided in the embodiment of the present application can adjust the working mode of the camera correspondingly under different conditions. When the camera is in the second working mode, for the multi-frame second image signal and the third image signal generated by the image sensor, When performing black level adjustment, the second image signal and the third image signal are firstly distinguished, and then the black level adjustment processing is performed on the second image signal and the third image signal according to different adjustment methods, avoiding the existing The scheme sets the black level adjustment process in the image sensor. When adjusting the black level of the image signal, the black level adjustment process is carried out according to the corresponding adjustment method for the image signal under different exposure parameters, so that the multi-channel The image signal is adjusted separately, which makes the black level adjustment of the image more stable.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.

图1为本申请实施例提供的一种相机的结构示意图;FIG. 1 is a schematic structural diagram of a camera provided in an embodiment of the present application;

图2为本申请实施例提供的图像传感器的靶面示意图;FIG. 2 is a schematic diagram of a target surface of an image sensor provided in an embodiment of the present application;

图3为本申请实施例提供的相机工作原理示意图;FIG. 3 is a schematic diagram of the working principle of the camera provided in the embodiment of the present application;

图4为本申请实施例提供的RGBW传感器的感光通道分布方式示意图;Fig. 4 is a schematic diagram of the photosensitive channel distribution mode of the RGBW sensor provided by the embodiment of the present application;

图5为本申请实施例提供的Bayer传感器的感光通道分布方式示意图;Fig. 5 is a schematic diagram of the photosensitive channel distribution mode of the Bayer sensor provided by the embodiment of the present application;

图6为本申请实施例提供的RGB-IR传感器的感光通道分布方式示意图;Fig. 6 is a schematic diagram of the photosensitive channel distribution mode of the RGB-IR sensor provided by the embodiment of the present application;

图7为本申请实施例提供的RGBW传感器的感应曲线示意图;Fig. 7 is a schematic diagram of the induction curve of the RGBW sensor provided by the embodiment of the present application;

图8为本申请又一实施例提供的相机的结构示意图;FIG. 8 is a schematic structural diagram of a camera provided in another embodiment of the present application;

图9为本申请实施例提供的第一工作模式下图像传感器的曝光顺序示意图;FIG. 9 is a schematic diagram of the exposure sequence of the image sensor in the first working mode provided by the embodiment of the present application;

图10为本申请实施例提供的第二工作模式下图像传感器的曝光顺序示意图一;FIG. 10 is a first schematic diagram of the exposure sequence of the image sensor in the second working mode provided by the embodiment of the present application;

图11为本申请实施例提供的第二工作模式下图像传感器的曝光顺序示意图二;FIG. 11 is a second schematic diagram of the exposure sequence of the image sensor in the second working mode provided by the embodiment of the present application;

图12为本申请实施例提供的第一工作模式下的黑电平调整处理示意图;FIG. 12 is a schematic diagram of black level adjustment processing in the first working mode provided by the embodiment of the present application;

图13为本申请实施例提供的多个第一图像信号的区分示意图;FIG. 13 is a schematic diagram of distinguishing multiple first image signals provided by the embodiment of the present application;

图14为本申请实施例提供的第二工作模式下的黑电平调整处理示意图一;FIG. 14 is a first schematic diagram of black level adjustment processing in the second working mode provided by the embodiment of the present application;

图15为本申请实施例提供的第二工作模式下的黑电平调整处理示意图二;FIG. 15 is a second schematic diagram of black level adjustment processing in the second working mode provided by the embodiment of the present application;

图16为本申请实施例提供的相机处理示意图一;FIG. 16 is a first schematic diagram of camera processing provided by the embodiment of the present application;

图17为本申请实施例提供的相机处理示意图二;Fig. 17 is the second schematic diagram of camera processing provided by the embodiment of the present application;

图18为本申请实施例提供的相机处理示意图三;Fig. 18 is the third schematic diagram of camera processing provided by the embodiment of the present application;

图19为本申请实施例提供的相机处理示意图四;FIG. 19 is a fourth schematic diagram of camera processing provided by the embodiment of the present application;

图20为本申请实施例提供的黑电平调整方法的流程示意图;FIG. 20 is a schematic flowchart of a method for adjusting a black level provided by an embodiment of the present application;

图21为本申请实施例提供的黑电平调整装置的结构示意图。FIG. 21 is a schematic structural diagram of a black level adjustment device provided by an embodiment of the present application.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

首先对本申请中涉及到的部分名词概念进行解释说明。First, some noun concepts involved in this application are explained.

黑像素区域:图像传感器中,通常存在一些遮黑的像素,这些像素无法接收到外界光的能量,通常用于黑电平统计。黑像素区域通常也称为暗像元(Optical Black,OB)区域、光学黑体区域、黑行、遮光区域、黑电平区域、黑电平基准像素等。Black pixel area: In the image sensor, there are usually some blacked-out pixels, which cannot receive the energy of external light, and are usually used for black level statistics. The black pixel area is also commonly referred to as an optical black (OB) area, an optical blackbody area, a black line, a light-shielding area, a black level area, a black level reference pixel, and the like.

有效像素区域:图像传感器中,用于正常响应外界光能量的区域。Effective pixel area: In the image sensor, the area used to normally respond to external light energy.

图1为本申请实施例提供的一种相机的结构示意图,如图1所示,相机10包括图像传感器11和处理芯片12,其中,FIG. 1 is a schematic structural diagram of a camera provided in an embodiment of the present application. As shown in FIG. 1 , the camera 10 includes an image sensor 11 and a processing chip 12, wherein,

所述图像传感器11用于,在第一工作模式下根据第一曝光参数生成并向所述处理芯片输出第一图像信号;The image sensor 11 is configured to generate and output a first image signal to the processing chip according to a first exposure parameter in a first working mode;

所述处理芯片12用于,在接收到所述第一图像信号时,根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The processing chip 12 is configured to, when receiving the first image signal, adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal;

所述图像传感器11还用于,在第二工作模式下通过多次曝光交替生成并向所述处理芯片输出第二图像信号和第三图像信号,其中,所述第二图像信号根据第二曝光参数生成,所述第三图像信号根据第三曝光参数生成;The image sensor 11 is also used to alternately generate and output a second image signal and a third image signal to the processing chip through multiple exposures in the second working mode, wherein the second image signal is based on the second exposure parameter generation, the third image signal is generated according to a third exposure parameter;

所述处理芯片12还用于,在接收到所述第二图像信号时,根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;在接收到所述第三图像信号时,根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;交替输出所述第二调整信号和所述第三调整信号。The processing chip 12 is further configured to, when receiving the second image signal, adjust the black level of the second image signal according to a second adjustment method to obtain a second adjustment signal; When there are three image signals, adjust the black level of the third image signal according to a third adjustment method to obtain a third adjustment signal; alternately output the second adjustment signal and the third adjustment signal.

图像传感器11是一种感光设备,利用靶面进行感光。在图像传感器11的靶面上,一般包括黑像素区域和有效像素区域,且黑像素区域数据和有效像素区域数据能够输出。The image sensor 11 is a photosensitive device that uses a target surface for photosensitive. The target surface of the image sensor 11 generally includes a black pixel area and an effective pixel area, and the data of the black pixel area and the effective pixel area can be output.

图像传感器,支持两种工作模式,能够在两种工作模式间切换。在第一工作模式时,根据第一曝光参数,采集并输出第一图像信号。在第二工作模式时,能够通过多次曝光在一段时间内同时采集并输出第二图像信号和第三图像信号,其中第二图像信号根据第二曝光参数产生,第三图像信号根据第三曝光参数产生。The image sensor supports two working modes and can switch between the two working modes. In the first working mode, according to the first exposure parameter, the first image signal is collected and output. In the second working mode, the second image signal and the third image signal can be simultaneously collected and output within a period of time through multiple exposures, wherein the second image signal is generated according to the second exposure parameters, and the third image signal is generated according to the third exposure parameter generated.

上述第一图像信号、第二图像信号和第三图像信号中既包含黑像素区域数据,也包含有效像素区域数据。The first image signal, the second image signal and the third image signal include both black pixel area data and valid pixel area data.

第二曝光参数和第三曝光参数可以采用相同的曝光参数,也可以采用不同的曝光参数。曝光参数包括且不限于曝光时间、模拟增益、数字增益等。当第二曝光参数与第三曝光参数采用不同曝光参数时,通常是指增益以及曝光时间不同。The second exposure parameter and the third exposure parameter may use the same exposure parameter, or may use different exposure parameters. Exposure parameters include, but are not limited to, exposure time, analog gain, digital gain, and the like. When the second exposure parameter and the third exposure parameter adopt different exposure parameters, it usually means that the gain and the exposure time are different.

图2为本申请实施例提供的图像传感器的靶面示意图,如图2示出了两种较为常见的图像传感器11的靶面上黑像素区域和有效像素区域的分布。FIG. 2 is a schematic diagram of a target surface of an image sensor provided in an embodiment of the present application. FIG. 2 shows distributions of black pixel areas and effective pixel areas on target surfaces of two common image sensors 11 .

在靶面21上,包括黑像素区域211和有效像素区域212,且靶面21上的黑像素区域211分布在有效像素区域212的四周。在靶面22上,包括黑像素区域221和有效像素区域222,且靶面22上的黑像素区域221分布在有效像素区域222上方。The target surface 21 includes a black pixel area 211 and an effective pixel area 212 , and the black pixel area 211 on the target surface 21 is distributed around the effective pixel area 212 . The target surface 22 includes a black pixel area 221 and an effective pixel area 222 , and the black pixel area 221 on the target surface 22 is distributed above the effective pixel area 222 .

在本申请实施例中,可通过不同的方法来防止光到达图像传感器11的靶面,使得图像传感器11的对应区域无法感应到光线来实现,而该区域即为图像传感器11的黑像素区域。具体的,可使用不透光的材料,例如金属、挡板等,挡住图像传感器11的靶面中的一行或多行、一列或多列的像素,使得靶面中的一行或多行、一列或多列的像素区域无光线通过,该区域即为黑像素区域,而除去黑像素区域以外的区域即为有效像素区域,有效像素区域可正常感光。In the embodiment of the present application, different methods can be used to prevent light from reaching the target surface of the image sensor 11 so that the corresponding area of the image sensor 11 cannot sense light, and this area is the black pixel area of the image sensor 11 . Specifically, opaque materials can be used, such as metals, baffles, etc., to block one or more rows and one or more columns of pixels in the target surface of the image sensor 11, so that one or more rows and one column of pixels in the target surface If no light passes through the pixel area of one or more rows, this area is the black pixel area, and the area except the black pixel area is the effective pixel area, and the effective pixel area can normally receive light.

可以理解的是,上述设置黑像素区域的方法仅仅是一种举例,其他可设置图像传感器11靶面的部分区域不感光从而使得图像传感器11形成黑像素区域的方法也能够达到类似的效果。同时,图2中示出的黑像素区域的分布仅仅是一种示意,具体的分布可根据实际需要设定,可设定任意形状大小和任意区域的黑像素区域。It can be understood that the above-mentioned method of setting black pixel areas is just an example, and other methods of setting part of the target surface of the image sensor 11 to be insensitive to light so that the image sensor 11 forms black pixel areas can also achieve similar effects. Meanwhile, the distribution of the black pixel areas shown in FIG. 2 is only a schematic, and the specific distribution can be set according to actual needs, and black pixel areas of any shape and size and any area can be set.

当图像传感器11的靶面上的黑像素区域上没有光线通过时,理论上黑像素区域的像素值应当是0,但是由于部分因素,会导致黑像素区域的黑电平值不为0,此时需要进行黑电平校正。When no light passes through the black pixel area on the target surface of the image sensor 11, the pixel value of the black pixel area should be 0 in theory, but due to some factors, the black level value of the black pixel area will not be 0. black level correction is required.

本申请实施例中的相机,包括两种工作模式,分别是第一工作模式和第二工作模式。图3为本申请实施例提供的相机工作原理示意图,如图3所示,主要包括图像采集单元和黑电平调整单元,其中图像采集单元用于进行图像采集,生成图像信号,图像采集单元除了包括图像传感器外,还可以包括镜头。黑电平调整单元为处理芯片的一部分,用于对图像信号进行黑电平调整。黑电平调整单元是一个包含信号处理算法或程序的逻辑平台,该平台可以是基于X86或ARM架构的计算机,也可以是现场可编程门阵列(Field-ProgrammableGate Array,简称FPGA)逻辑电路。The camera in the embodiment of the present application includes two working modes, namely a first working mode and a second working mode. Figure 3 is a schematic diagram of the working principle of the camera provided by the embodiment of the present application. As shown in Figure 3, it mainly includes an image acquisition unit and a black level adjustment unit, wherein the image acquisition unit is used to perform image acquisition and generate image signals. In addition to the image sensor, it can also include the lens. The black level adjustment unit is a part of the processing chip, and is used for adjusting the black level of the image signal. The black level adjustment unit is a logic platform containing signal processing algorithms or programs, which can be a computer based on X86 or ARM architecture, or a field-programmable gate array (Field-Programmable Gate Array, FPGA for short) logic circuit.

本申请实施例提供的方案,包括两种工作模式,且支持两种模式的相互和联动切换,其中联动切换是指当图像采集单元处于第一工作模式时,黑电平调整单元切换至相应的第一工作模式;当图像采集单元处于第二工作模式时,黑电平调整单元切换至相应的第二工作模式,即,在工作模式切换时,图像采集单元和黑电平调整单元能够同时切换到相应的工作模式,以协同工作。The solution provided by the embodiment of the present application includes two working modes, and supports the mutual and linkage switching of the two modes, wherein the linkage switching means that when the image acquisition unit is in the first working mode, the black level adjustment unit switches to the corresponding The first working mode; when the image acquisition unit is in the second working mode, the black level adjustment unit switches to the corresponding second working mode, that is, when the working mode is switched, the image acquisition unit and the black level adjustment unit can be switched simultaneously to the corresponding working mode to work together.

图像采集单元在第一工作模式时,能够在某一曝光条件下多次曝光并输出第一图像信号;在第二工作模式时,能够通过分时多次曝光采集并输出两种图像信号。When the image acquisition unit is in the first working mode, it can take multiple exposures under a certain exposure condition and output the first image signal; in the second working mode, it can collect and output two kinds of image signals by time-sharing multiple exposures.

黑电平调整单元,在第一工作模式时,能够对第一图像信号进行黑电平调整,并输出第一调整信号;在第二工作模式时,黑电平调整单元能够对第二图像信号和第三图像信号分别进行黑电平调整,并输出第二调整信号和第三调整信号。黑电平调整单元通过统计黑像素区域并计算获得图像的黑电平偏移值,从而调整有效像素区域的黑电平,保证图像亮度、色彩等能够真实反映环境状况。The black level adjustment unit can adjust the black level of the first image signal in the first working mode and output the first adjustment signal; in the second working mode, the black level adjusting unit can adjust the black level of the second image signal and the third image signal to adjust the black level respectively, and output the second adjustment signal and the third adjustment signal. The black level adjustment unit obtains the black level offset value of the image by counting the black pixel area and calculating the black level offset value, thereby adjusting the black level of the effective pixel area to ensure that the brightness and color of the image can truly reflect the environmental conditions.

第一工作模式时,图像采集单元采集到第一图像信号,传输给黑电平调整单元进行处理,黑电平调整单元对第一图像信号进行处理,输出第一调整信号;第二工作模式时,图像采集单元采集到第二图像信号和第三图像信号,传输给黑电平调整单元进行处理,黑电平调整单元对第二图像信号和第三图像信号进行处理,输出第二调整信号和第三调整信号。In the first working mode, the image acquisition unit collects the first image signal and transmits it to the black level adjustment unit for processing, and the black level adjustment unit processes the first image signal and outputs the first adjustment signal; in the second working mode , the image acquisition unit collects the second image signal and the third image signal, and transmits them to the black level adjustment unit for processing, and the black level adjustment unit processes the second image signal and the third image signal, and outputs the second adjustment signal and A third adjustment signal.

图像采集单元,主要是指图像传感器,在第二工作模式时,通过多次曝光采集到第二图像信号和第三图像信号。其中,所述第二图像信号根据第二曝光条件产生,所述第三图像信号根据第三曝光条件产生。黑电平调整单元在第一工作模式时,能够对第一图像信号进行黑电平调整处理,黑电平调整单元在第二工作模式时,能够分别对第二图像信号和第三图像信号进行黑电平调整处理。The image acquisition unit mainly refers to the image sensor, which acquires the second image signal and the third image signal through multiple exposures in the second working mode. Wherein, the second image signal is generated according to the second exposure condition, and the third image signal is generated according to the third exposure condition. When the black level adjustment unit is in the first working mode, it can perform black level adjustment processing on the first image signal; Black level adjustment processing.

在第一工作模式下,图像采集单元根据第一曝光参数生成第一图像信号,并发送给处理芯片12中的黑电平调整单元,黑电平调整单元根据第一调整方式对第一图像信号进行黑电平调整,得到第一调整信号。由于图像传感器11的靶面包括黑像素区域和有效像素区域,因此第一图像信号中包括第一图像信号对应的黑像素区域和第一图像信号对应的有效像素区域。第一图像信号可以是一个视频序列中的多个图像信号中的一个,该视频序列中的多个图像信号是在同一曝光条件下由图像传感器11产生的,即对应的曝光参数为第一曝光参数。In the first working mode, the image acquisition unit generates the first image signal according to the first exposure parameter, and sends it to the black level adjustment unit in the processing chip 12, and the black level adjustment unit adjusts the first image signal according to the first adjustment method. Black level adjustment is performed to obtain a first adjustment signal. Since the target surface of the image sensor 11 includes a black pixel area and an effective pixel area, the first image signal includes a black pixel area corresponding to the first image signal and an effective pixel area corresponding to the first image signal. The first image signal may be one of a plurality of image signals in a video sequence, and the plurality of image signals in the video sequence are generated by the image sensor 11 under the same exposure condition, that is, the corresponding exposure parameter is the first exposure parameter.

在第二工作模式下,图像采集单元根据第二曝光参数生成第二图像信号并发送给处理芯片12中的黑电平调整单元,还根据第三曝光参数生成第三图像信号并发送给处理芯片12中的黑电平调整单元,黑电平调整单元根据第二调整方式对第二图像信号进行黑电平调整,得到第二调整信号,并根据第三调整方式对第三图像信号进行黑电平调整,得到第三调整信号。其中第二图像信号可以属于第二视频序列中的多个图像信号中的一个,第三图像信号可以属于第三视频序列中的多个图像信号中的一个。In the second working mode, the image acquisition unit generates a second image signal according to the second exposure parameter and sends it to the black level adjustment unit in the processing chip 12, and generates a third image signal according to the third exposure parameter and sends it to the processing chip The black level adjustment unit in 12, the black level adjustment unit adjusts the black level of the second image signal according to the second adjustment method to obtain the second adjustment signal, and performs black level adjustment on the third image signal according to the third adjustment method Leveling adjustment, get the third adjustment signal. The second image signal may belong to one of the plurality of image signals in the second video sequence, and the third image signal may belong to one of the plurality of image signals in the third video sequence.

黑电平调整通常是设置一个偏移值,然后根据该偏移值来对图像信号进行调整。处理芯片12在收到第一图像信号后,针对每个当前帧第一图像信号,获取当前帧第一图像信号对应的黑像素区域的黑电平和历史帧第一图像信号对应的黑像素区域的黑电平信息。其中,当前帧第一图像信号对应的黑像素区域的黑电平即为当前帧第一图像信号上对应的黑像素区域的每个像素点的黑电平,若第一图像信号有多个感光通道,则需要获取每个感光通道上的黑电平。历史帧第一图像信号是当前帧第一图像信号的前一帧第一图像信号,与当前帧第一图像信号有一定的关联性,例如当前帧第一图像信号与历史帧第一图像信号可以是同一个视频序列中的两帧图像信号。而历史帧第一图像信号对应的黑像素区域的黑电平信息可以是历史帧第一图像信号对应的黑像素区域的黑电平,也可以是历史帧第一图像信号的黑电平偏移量。Black level adjustment is usually to set an offset value, and then adjust the image signal according to the offset value. After the processing chip 12 receives the first image signal, for each first image signal of the current frame, obtain the black level of the black pixel area corresponding to the first image signal of the current frame and the black level of the black pixel area corresponding to the first image signal of the historical frame. Black level information. Wherein, the black level of the black pixel area corresponding to the first image signal of the current frame is the black level of each pixel in the black pixel area corresponding to the first image signal of the current frame. channel, you need to obtain the black level on each photosensitive channel. The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame, and has a certain correlation with the first image signal of the current frame. For example, the first image signal of the current frame and the first image signal of the historical frame can be are two frames of image signals in the same video sequence. The black level information of the black pixel area corresponding to the first image signal of the historical frame may be the black level of the black pixel area corresponding to the first image signal of the historical frame, or the black level offset of the first image signal of the historical frame quantity.

然后,在第一工作模式下,第一调整方式可以为,处理芯片12根据当前帧第一图像信号对应的黑像素区域的黑电平和历史帧第一图像信号对应的黑像素区域的黑电平信息,得到当前帧第一图像信号的黑电平偏移量,根据当前帧第一图像信号的黑电平偏移量来对当前帧第一图像信号的有效像素区域进行黑电平调整处理,得到第一调整信号。Then, in the first working mode, the first adjustment method may be that the processing chip 12 is based on the black level of the black pixel area corresponding to the first image signal of the current frame and the black level of the black pixel area corresponding to the first image signal of the historical frame. Information, obtain the black level offset of the first image signal of the current frame, and perform black level adjustment processing on the effective pixel area of the first image signal of the current frame according to the black level offset of the first image signal of the current frame, A first adjustment signal is obtained.

在第二工作模式下,处理芯片12会将第二图像信号和第三图像信号分开进行处理。在对第二图像信号处理时,第二调整方式可以为,采用当前帧第二图像信号对应的黑像素区域的黑电平和历史帧第二图像信号对应的黑像素区域的黑电平信息对当前帧第二图像信号进行黑电平调整处理,同样的,在对第三图像信号处理时,第三调整方式可以为,采用当前帧第三图像信号对应的黑像素区域的黑电平和历史帧第三图像信号对应的黑像素区域的黑电平信息对当前帧第三图像信号进行黑电平调整处理。In the second working mode, the processing chip 12 processes the second image signal and the third image signal separately. When processing the second image signal, the second adjustment method may be to use the black level information of the black pixel area corresponding to the second image signal of the current frame and the black level information of the black pixel area corresponding to the second image signal of the historical frame to adjust the current The black level adjustment process is performed on the second image signal of the frame. Similarly, when processing the third image signal, the third adjustment method may be to use the black level of the black pixel area corresponding to the third image signal of the current frame and the first black level of the historical frame. The black level information of the black pixel area corresponding to the three image signals performs black level adjustment processing on the third image signal of the current frame.

本申请实施例提供的相机,包括单个的图像传感器和处理芯片,图像传感器的输出端与处理芯片连接,相机包括两种工作模式,在第一工作模式下,图像传感器根据第一曝光参数生成并向处理芯片输出第一图像信号,处理芯片在接收到所述第一图像信号时,根据第一调整方式对第一图像信号进行黑电平调整,得到第一调整信号;在第二工作模式下,图像传感器根据第二曝光参数生成并向处理芯片输出第二图像信号,根据第三曝光参数生成并向处理芯片输出第三图像信号;处理芯片在接收到第二图像信号时,根据第二调整方式对第二图像信号进行黑电平调整,得到第二调整信号;在接收到第三图像信号时,根据第三调整方式对第三图像信号进行黑电平调整,得到第三调整信号。本申请实施例提供的相机,在不同的条件下可相应调整相机所处的工作模式,当相机处于第二工作模式时,针对图像传感器产生的多帧第二图像信号和第三图像信号,在进行黑电平调整时,首先将第二图像信号和第三图像信号区分开,然后分别针对第二图像信号和第三图像信号根据不同的调整方式来进行黑电平调整处理,避免了现有方案将黑电平调整处理设置在图像传感器中进行,在对图像信号进行黑电平调整时,针对不同曝光参数下的图像信号,分别根据相应的调整方式进行黑电平调整处理,使得多路图像信号分开进行调整,使得图像的黑电平调整更加稳定。The camera provided by the embodiment of the present application includes a single image sensor and a processing chip, the output terminal of the image sensor is connected to the processing chip, and the camera includes two working modes. output the first image signal to the processing chip, and when the processing chip receives the first image signal, adjust the black level of the first image signal according to the first adjustment method to obtain the first adjustment signal; in the second working mode , the image sensor generates and outputs the second image signal to the processing chip according to the second exposure parameter, generates and outputs the third image signal to the processing chip according to the third exposure parameter; when the processing chip receives the second image signal, adjusts the signal according to the second adjust the black level of the second image signal to obtain the second adjustment signal; when receiving the third image signal, adjust the black level of the third image signal according to the third adjustment method to obtain the third adjustment signal. The camera provided in the embodiment of the present application can adjust the working mode of the camera correspondingly under different conditions. When the camera is in the second working mode, for the multi-frame second image signal and the third image signal generated by the image sensor, When performing black level adjustment, the second image signal and the third image signal are firstly distinguished, and then the black level adjustment processing is performed on the second image signal and the third image signal according to different adjustment methods, avoiding the existing The scheme sets the black level adjustment process in the image sensor. When adjusting the black level of the image signal, the black level adjustment process is carried out according to the corresponding adjustment method for the image signal under different exposure parameters, so that the multi-channel The image signal is adjusted separately, which makes the black level adjustment of the image more stable.

下面结合图4,并采用具体的实施例,对该相机的原理和使用方案进行详细说明。The principle and usage scheme of the camera will be described in detail below with reference to FIG. 4 and specific embodiments.

首先对图像传感器进行解释说明。本申请中的图像传感器包括多个感光通道,每个感光通道用于感应可见光波段的光,和/或,感应近红外波段的光。也即是,每个感光通道能感应可见光波段的光,又能感应近红外波段的光,这样,可以保证第一图像信号中具有完整的分辨率,不缺失像素值。First, the image sensor is explained. The image sensor in the present application includes a plurality of photosensitive channels, and each photosensitive channel is used for sensing light in the visible light band, and/or, sensing light in the near infrared band. That is, each photosensitive channel can sense light in the visible light band and light in the near-infrared band, so that the first image signal can be guaranteed to have a complete resolution without missing pixel values.

示例性地,图像传感器可以为RGBW传感器、Bayer传感器或RGB-IR传感器,也可以采用其他排列方式的传感器。图4为本申请实施例提供的RGBW传感器的感光通道分布方式示意图,图5为本申请实施例提供的Bayer传感器的感光通道分布方式示意图,图6为本申请实施例提供的RGB-IR传感器的感光通道分布方式示意图,如图4和图5所示,RGBW传感器中的R感光通道、G感光通道、B感光通道和W感光通道的分布方式可以参见图4,Bayer传感器中的R感光通道、G感光通道、B感光通道的分布方式可以参见图5。示例地,图像传感器可以为RGB-IR传感器,其中,RGB-IR传感器中的每个IR感光通道都可以感应近红外波段的光,而不感应可见光波段的光。RGB-IR传感器中的R感光通道、G感光通道、B感光通道和W感光通道的分布方式可以参见图6。Exemplarily, the image sensor may be an RGBW sensor, a Bayer sensor or an RGB-IR sensor, and sensors in other arrangements may also be used. Figure 4 is a schematic diagram of the photosensitive channel distribution of the RGBW sensor provided by the embodiment of the present application, Figure 5 is a schematic diagram of the photosensitive channel distribution of the Bayer sensor provided by the embodiment of the present application, and Figure 6 is a schematic diagram of the RGB-IR sensor provided by the embodiment of the present application Schematic diagram of the distribution of photosensitive channels, as shown in Figure 4 and Figure 5, the distribution of the R photosensitive channel, G photosensitive channel, B photosensitive channel and W photosensitive channel in the RGBW sensor can be seen in Figure 4, the R photosensitive channel in the Bayer sensor, The distribution of G photosensitive channel and B photosensitive channel can be seen in Figure 5. For example, the image sensor may be an RGB-IR sensor, wherein each IR photosensitive channel in the RGB-IR sensor can sense light in a near-infrared band, but not light in a visible light band. The distribution of the R photosensitive channel, G photosensitive channel, B photosensitive channel and W photosensitive channel in the RGB-IR sensor can be seen in Figure 6.

在另一些实施例中,有些感光通道也可以仅感应近红外波段的光,而不感应可见光波段的光,这样,可以保证第一图像信号中具有完整的分辨率,不缺失像素值。作为一种示例,该多个感光通道可以包括R感光通道、G感光通道、B感光通道、IR感光通道中的至少两种。其中,R感光通道用于感应红光波段和近红外波段的光,G感光通道用于感应绿光波段和近红外波段的光,B感光通道用于感应蓝光波段和近红外波段的光,IR感光通道用于感应近红外波段的光。In some other embodiments, some photosensitive channels can only sense light in the near-infrared band, but not light in the visible light band. In this way, it can ensure that the first image signal has a complete resolution without missing pixel values. As an example, the plurality of light-sensing channels may include at least two of R light-sensing channels, G light-sensing channels, B light-sensing channels, and IR light-sensing channels. Among them, the R photosensitive channel is used to sense the light in the red and near-infrared bands, the G photosensitive channel is used to sense the light in the green and near-infrared bands, the B photosensitive channel is used to sense the light in the blue and near-infrared bands, and the IR photosensitive channel is used to sense the light in the blue and near-infrared bands. The photosensitive channel is used to sense light in the near-infrared band.

进一步的,图像传感器还可以为RGB传感器,其中,当图像传感器为RGB传感器时,相比于其他图像传感器,如RGB-IR传感器等,RGB传感器采集的RGB信息更完整,RGB-IR传感器有一部分的感光通道采集不到可见光,所以RGB传感器采集的图像的色彩细节更准确。Further, the image sensor can also be an RGB sensor, wherein, when the image sensor is an RGB sensor, compared with other image sensors, such as RGB-IR sensors, the RGB information collected by the RGB sensor is more complete, and the RGB-IR sensor has a part The photosensitive channel of the RGB sensor cannot collect visible light, so the color details of the image collected by the RGB sensor are more accurate.

值得注意的是,图像传感器包括的多个感光通道可以对应多条感应曲线。图7为本申请实施例提供的RGBW传感器的感应曲线示意图,示例性地,参见图7,以图像传感器为RGBW传感器为例,图7中的R曲线代表图像传感器对红光波段的光的感应曲线,G曲线代表图像传感器对绿光波段的光的感应曲线,B曲线代表图像传感器对蓝光波段的光的感应曲线,W曲线代表图像传感器感应全波段的光的感应曲线。It is worth noting that the multiple photosensitive channels included in the image sensor can correspond to multiple sensing curves. Figure 7 is a schematic diagram of the sensing curve of the RGBW sensor provided by the embodiment of the present application. For example, refer to Figure 7, taking the image sensor as an RGBW sensor as an example, the R curve in Figure 7 represents the image sensor's sensitivity to light in the red band The G curve represents the image sensor's response curve to the light in the green band, the B curve represents the image sensor's response curve to the blue light band, and the W curve represents the image sensor's response curve to the full-band light.

图像传感器在不同的曝光参数下产生不同的图像信号。示例性的,该相机的工作模式可包括两种,分别为第一工作模式和第二工作模式。在第一工作模式下,图像传感器根据第一曝光参数生成多帧第一图像信号,依次发送给处理芯片。在第二工作模式下,图像传感器根据第二曝光参数生成多帧第二图像信号,根据第三曝光参数生成第三图像信号,其中,图像传感器在第二工作模式下,通过多次曝光交替产生第二图像信号和第三图像信号,并向处理芯片交替输出第二图像信号和第三图像信号。处理芯片对第二图像信号和第三图像信号分别进行黑电平调整,交替输出第二调整信号和第三调整信号。Image sensors generate different image signals under different exposure parameters. Exemplarily, the camera may have two working modes, namely the first working mode and the second working mode. In the first working mode, the image sensor generates multiple frames of first image signals according to the first exposure parameters, and sends them to the processing chip in sequence. In the second working mode, the image sensor generates multiple frames of second image signals according to the second exposure parameters, and generates a third image signal according to the third exposure parameters, wherein, in the second working mode, the image sensor alternately generates the second image signal and the third image signal, and alternately output the second image signal and the third image signal to the processing chip. The processing chip adjusts the black level of the second image signal and the third image signal respectively, and alternately outputs the second adjustment signal and the third adjustment signal.

图8为本申请又一实施例提供的相机的结构示意图,如图8所示,相机80包括图像传感器81、处理芯片82、曝光参数控制单元83和补光器84,其中,曝光参数控制单元83用于在第二工作模式下向图像传感器81交替输出第二曝光参数和第三曝光参数,补光器84用于在图像传感器81处于第二工作模式时进行补光。Fig. 8 is a schematic structural diagram of a camera provided in another embodiment of the present application. As shown in Fig. 8, a camera 80 includes an image sensor 81, a processing chip 82, an exposure parameter control unit 83 and a light fill device 84, wherein the exposure parameter control unit 83 is used for alternately outputting the second exposure parameter and the third exposure parameter to the image sensor 81 in the second working mode, and the supplementary light device 84 is used for supplementing light when the image sensor 81 is in the second working mode.

进一步的,本申请实施例提供的相机还可以包括滤光组件86,滤光组件86包括第一滤光片、第二滤光片和切换部件,第一滤光片使可见光和部分近红外光通过,第一滤光片和所述第二滤光片均与切换部件连接,切换部件用于将第二滤光片切换到图像传感器81的入光侧。Further, the camera provided in the embodiment of the present application may also include a filter assembly 86, the filter assembly 86 includes a first filter, a second filter and a switching component, the first filter makes visible light and part of near-infrared light Through, both the first optical filter and the second optical filter are connected to the switching component, and the switching component is used to switch the second optical filter to the light-incident side of the image sensor 81 .

在第二滤光片切换到图像传感器81的入光侧之后,第二滤光片使可见光波段的光通过,阻挡近红外光波段的光,图像传感器81用于通过曝光产生并输出第三图像信号。After the second optical filter is switched to the light-incident side of the image sensor 81, the second optical filter allows light in the visible light band to pass through and blocks light in the near-infrared light band, and the image sensor 81 is used to generate and output a third image through exposure Signal.

在图像传感器81之前,还包括镜头85,在补光器84进行补光时,通过镜头85的光线包括环境光和补光,补光包括可见光补光和近红外补光。Before the image sensor 81, a lens 85 is also included. When the supplementary light device 84 performs supplementary light, the light passing through the lens 85 includes ambient light and supplementary light, and the supplementary light includes visible light supplementary light and near-infrared supplementary light.

在一些实施例中,补光器84具体用于进行近红外补光,具体的,至少在图像传感器81根据第三曝光参数进行曝光的部分时间段内进行近红外补光。In some embodiments, the light fill device 84 is specifically used to perform near-infrared supplementary light, specifically, to perform near-infrared supplementary light at least during a part of the time period when the image sensor 81 performs exposure according to the third exposure parameter.

在另一些实施例中,补光器84具体用于进行可见光补光,具体的,至少在图像传感器81根据第二曝光参数进行曝光的部分时间段内进行可见光补光。In some other embodiments, the supplementary light device 84 is specifically used for supplementary light with visible light, specifically, supplementary light with visible light at least during a part of the time period when the image sensor 81 performs exposure according to the second exposure parameter.

图像传感器81位于滤光组件86的出光侧。在第二工作模式下,图像传感器81用于通过多次曝光产生并输出第二图像信号和第三图像信号。其中,第二图像信号是根据第二曝光参数产生的图像信号,第三图像信号是根据第三曝光参数产生的图像信号。补光器84包括第一补光装置841,第一补光装置841用于进行近红外补光,其中,至少在图像传感器81根据第三曝光参数进行曝光的部分时间段内进行近红外补光。滤光组件86包括第一滤光片,第一滤光片使可见光波段的光和近红外光波段的光通过,其中,第一补光装置841进行近红外光补光时通过第一滤光片的近红外光的强度高于第一补光装置841未进行近红外补光时通过第一滤光片的近红外光的强度。The image sensor 81 is located on the light emitting side of the filter assembly 86 . In the second working mode, the image sensor 81 is used to generate and output the second image signal and the third image signal through multiple exposures. Wherein, the second image signal is an image signal generated according to the second exposure parameter, and the third image signal is an image signal generated according to the third exposure parameter. The light supplement 84 includes a first supplementary light device 841, and the first supplementary light device 841 is used for performing near-infrared supplementary light, wherein at least part of the time period during which the image sensor 81 performs exposure according to the third exposure parameter is to perform near-infrared supplementary light . The filter assembly 86 includes a first filter, and the first filter allows the light in the visible light band and the light in the near-infrared band to pass through, wherein the first light supplement device 841 passes through the first filter light when supplementing the near-infrared light. The intensity of the near-infrared light of the filter is higher than the intensity of the near-infrared light passing through the first filter when the first light supplement device 841 is not performing near-infrared supplementary light.

在本申请实施例中,还可以包括镜头85,此时,滤光组件86可以位于镜头85和图像传感器81之间,且图像传感器81位于滤光组件86的出光侧。或者,镜头85位于滤光组件86与图像传感器81之间,且图像传感器81位于镜头85的出光侧。作为一种示例,第一滤光片可以是滤光薄膜,这样,当滤光组件86位于镜头85和图像传感器81之间时,第一滤光片可以贴在镜头85的出光侧的表面,或者,当镜头85位于滤光组件86与图像传感器81之间时,第一滤光片可以贴在镜头85的入光侧的表面。In the embodiment of the present application, a lens 85 may also be included. In this case, the filter assembly 86 may be located between the lens 85 and the image sensor 81 , and the image sensor 81 is located at the light output side of the filter assembly 86 . Alternatively, the lens 85 is located between the filter assembly 86 and the image sensor 81 , and the image sensor 81 is located at the light emitting side of the lens 85 . As an example, the first optical filter can be a filter film, and like this, when the optical filter assembly 86 is located between the lens 85 and the image sensor 81, the first optical filter can be attached to the surface of the light exit side of the lens 85, Alternatively, when the lens 85 is located between the filter assembly 86 and the image sensor 81 , the first filter can be attached to the surface of the lens 85 on the light incident side.

需要说明的一点是,补光器84可以位于图像采集单元内,也可以位于图像采集单元的外部。补光器84可以为图像采集单元的一部分,也可以为独立于图像采集单元的一个器件。当补光器84位于图像采集单元的外部时,补光器84可以与图像采集单元进行通信连接,从而可以保证图像采集单元中的图像传感器81的曝光时序与补光器84包括的第一补光装置841的近红外补光时序存在一定的关系,如至少在第三曝光参数的部分曝光时间段内进行近红外补光,在第二曝光参数的曝光时间段内不进行近红外补光。It should be noted that the light fill device 84 can be located inside the image acquisition unit or outside the image acquisition unit. The light fill device 84 can be a part of the image acquisition unit, or a device independent of the image acquisition unit. When the light fill device 84 is located outside the image acquisition unit, the light fill device 84 can communicate with the image acquisition unit, thereby ensuring that the exposure timing of the image sensor 81 in the image acquisition unit is consistent with the first supplementary light included in the light fill device 84. There is a certain relationship between the near-infrared fill-in light timing of the light device 841 , for example, near-infrared fill-in light is performed at least in a part of the exposure time period of the third exposure parameter, and no near-infrared fill-in light is performed in the exposure time period of the second exposure parameter.

另外,第一补光装置841为可以发出近红外光的装置,例如近红外补光灯等,第一补光装置841可以以频闪方式进行近红外补光,也可以以类似频闪的其他方式进行近红外补光,本申请实施例对此不做限定。在一些示例中,当第一补光装置841以频闪方式进行近红外补光时,可以通过手动方式来控制第一补光装置841以频闪方式进行近红外补光,也可以通过软件程序或特定设备来控制第一补光装置841以频闪方式进行近红外补光,本申请实施例对此不做限定。其中,第一补光装置841进行近红外补光的时间段可以与第三曝光参数的曝光时间段重合,也可以大于第三曝光参数的曝光时间段或者小于第三曝光参数的曝光时间段,只要在第三曝光参数的整个曝光时间段或者部分曝光时间段内进行近红外补光,而在第二曝光参数的曝光时间段内不进行近红外补光即可。In addition, the first supplementary light device 841 is a device that can emit near-infrared light, such as a near-infrared supplementary light lamp. The near-infrared supplementary light is performed in a manner, which is not limited in this embodiment of the present application. In some examples, when the first supplementary light device 841 performs near-infrared supplementary light in a stroboscopic manner, the first supplementary light device 841 can be manually controlled to perform near-infrared supplementary light in a stroboscopic manner, or can be controlled by a software program. Or specific equipment is used to control the first supplementary light device 841 to perform near-infrared supplementary light in a stroboscopic manner, which is not limited in this embodiment of the present application. Wherein, the time period of the near-infrared supplementary light by the first supplementary light device 841 may coincide with the exposure time period of the third exposure parameter, or may be greater than the exposure time period of the third exposure parameter or less than the exposure time period of the third exposure parameter, It only needs to perform near-infrared supplementary light in the whole exposure time period or part of the exposure time period of the third exposure parameter, and not perform near-infrared supplementary light in the exposure time period of the second exposure parameter.

需要说明的是,第二曝光参数的曝光时间段内不进行近红外补光,对于全局曝光方式来说,第二曝光参数的曝光时间段可以是开始曝光时刻和结束曝光时刻之间的时间段,对于卷帘曝光方式来说,第二曝光参数的曝光时间段可以是第二图像信号第一行有效图像的开始曝光时刻与最后一行有效图像的结束曝光时刻之间的时间段,但并不局限于此。例如,第二曝光参数的曝光时间段也可以是第二图像信号中目标图像对应的曝光时间段,目标图像为第二图像信号中与目标对象或目标区域所对应的若干行有效图像,这若干行有效图像的开始曝光时刻与结束曝光时刻之间的时间段可以看作第二曝光参数的曝光时间段。It should be noted that no near-infrared supplementary light is used within the exposure time period of the second exposure parameter. For the global exposure method, the exposure time period of the second exposure parameter can be the time period between the start exposure time and the end exposure time. , for the rolling shutter exposure method, the exposure time period of the second exposure parameter may be the time period between the start exposure moment of the first line of effective image of the second image signal and the end exposure moment of the last line of effective image, but it does not limited to this. For example, the exposure time period of the second exposure parameter may also be the exposure time period corresponding to the target image in the second image signal. The time period between the start exposure moment and the end exposure moment of the effective line image can be regarded as the exposure time period of the second exposure parameter.

需要说明的另一点是,由于第一补光装置841在对外部场景进行近红外补光时,入射到物体表面的近红外光可能会被物体反射,从而进入到第一滤光片031中。并且由于通常情况下,环境光可以包括可见光和近红外光,且环境光中的近红外光入射到物体表面时也会被物体反射,从而进入到第一滤光片031中。因此,在进行近红外补光时通过第一滤光片031的近红外光可以包括第一补光装置841进行近红外补光时经物体反射进入第一滤光片031的近红外光,在不进行近红外补光时通过第一滤光片031的近红外光可以包括第一补光装置841未进行近红外补光时经物体反射进入第一滤光片031的近红外光。也即是,在进行近红外补光时通过第一滤光片031的近红外光包括第一补光装置841发出的且经物体反射后的近红外光,以及环境光中经物体反射后的近红外光,在不进行近红外补光时通过第一滤光片031的近红外光包括环境光中经物体反射后的近红外光。Another point that needs to be explained is that when the first supplementary light device 841 performs near-infrared supplementary light on the external scene, the near-infrared light incident on the surface of the object may be reflected by the object and enter the first filter 031 . And because generally, the ambient light may include visible light and near-infrared light, and the near-infrared light in the ambient light will be reflected by the object when incident on the surface of the object, and thus enter the first filter 031 . Therefore, the near-infrared light passing through the first optical filter 031 when performing near-infrared supplementary light may include the near-infrared light reflected by objects into the first optical filter 031 when the first supplementary light device 841 performs near-infrared supplementary light. The near-infrared light passing through the first optical filter 031 when the near-infrared supplementary light is not performed may include the near-infrared light reflected by objects and entering the first optical filter 031 when the first supplementary light device 841 is not performing near-infrared supplementary light. That is to say, the near-infrared light passing through the first optical filter 031 during the near-infrared supplementary light includes the near-infrared light emitted by the first supplementary light device 841 and reflected by the object, and the near-infrared light reflected by the object in the ambient light. The near-infrared light, the near-infrared light passing through the first filter 031 when the near-infrared supplementary light is not performed includes the near-infrared light reflected by objects in the ambient light.

在一种可能的实现方式中,参见图6,补光器84还可以包括第二补光装置842,第二补光装置842用于进行可见光补光。在一些实施例中,第二补光装置842可以用于以常亮方式进行可见光补光;或者,第二补光装置842可以用于以频闪方式进行可见光补光,其中,至少在第二曝光参数的部分曝光时间段内存在可见光补光,或者,第二补光装置842可以用于以频闪方式进行可见光补光,其中,在第二曝光参数的部分曝光时间段内存在可见光补光。In a possible implementation manner, referring to FIG. 6 , the supplementary light device 84 may further include a second supplementary light device 842 , and the second supplementary light device 842 is used for supplementary light with visible light. In some embodiments, the second supplementary light device 842 can be used to perform visible light supplementary light in a constant light mode; or, the second supplementary light device 842 can be used to perform visible light supplementary light in a strobe mode, wherein, at least in the second There is visible light supplementary light in part of the exposure time period of the exposure parameters, or the second supplementary light device 842 can be used to perform visible light supplementary light in a stroboscopic manner, wherein there is visible light supplementary light in part of the exposure time period of the second exposure parameter .

在一些实施例中,上述多次曝光是指一个帧周期内的多次曝光,也即是,图像传感器81在一个帧周期内进行多次曝光,从而产生并输出至少一帧第二图像信号和至少一帧第三图像信号。例如,1秒内包括25个帧周期,图像传感器81在每个帧周期内进行多次曝光,从而产生至少一帧第二图像信号和至少一帧第三图像信号,将一个帧周期内产生的第二图像信号和第三图像信号称为一组图像信号,这样,25个帧周期内就会产生25组图像信号。其中,第二曝光参数和第三曝光参数可以是一个帧周期内相邻的两次曝光的曝光参数,也可以是一个帧周期内多次曝光中不相邻的两次曝光的曝光参数,本申请实施例对此不做限定。In some embodiments, the aforementioned multiple exposures refer to multiple exposures within one frame period, that is, the image sensor 81 performs multiple exposures within one frame period, thereby generating and outputting at least one frame of second image signals and At least one frame of the third image signal. For example, 1 second includes 25 frame periods, and the image sensor 81 performs multiple exposures in each frame period, thereby generating at least one frame of second image signals and at least one frame of third image signals, and combining the images generated in one frame period The second image signal and the third image signal are called a group of image signals, so 25 groups of image signals will be generated within 25 frame periods. Wherein, the second exposure parameter and the third exposure parameter may be the exposure parameters of two adjacent exposures within one frame period, or may be the exposure parameters of two non-adjacent exposures among multiple exposures within one frame period. The embodiment of the application does not limit this.

通过上述设置,在处于白天或光照强度较好的情况下,相机80可处于第一工作模式下,图像传感器81在第一曝光参数下生成第一图像信号,由处理芯片82对第一图像信号进行黑电平调整,得到第一调整信号。Through the above settings, in the daytime or when the light intensity is good, the camera 80 can be in the first working mode, the image sensor 81 generates the first image signal under the first exposure parameter, and the processing chip 82 processes the first image signal. Black level adjustment is performed to obtain a first adjustment signal.

在处于黑夜或其他光照强度较差的情况下,相机80可处于第二工作模式下,图像传感器81在第二曝光参数下生成第二图像信号,在第三曝光参数下生成第三图像信号,其中在第二曝光参数下的部分时间段通过补光器84进行可见光补光,在第三曝光参数下的部分时间段通过补光器84进行近红外补光,来提高极低照度下的成像质量。其中,图像传感器81在第二工作模式下通过多次曝光交替产生并向处理芯片82输出第二图像信号和第三图像信号,处理芯片82在第二工作模式下对第二图像信号和第三图像信号分别进行黑电平调整,交替产生并输出第二调整信号和第三调整信号。In the case of dark night or other poor light intensity, the camera 80 can be in the second working mode, the image sensor 81 generates the second image signal under the second exposure parameter, and generates the third image signal under the third exposure parameter, In the part of the time period under the second exposure parameter, the visible light is supplemented by the light supplement 84, and in the part of the time period under the third exposure parameter, the near-infrared supplement is performed by the light supplement 84, so as to improve the imaging under extremely low illuminance quality. Wherein, the image sensor 81 alternately generates and outputs the second image signal and the third image signal to the processing chip 82 through multiple exposures in the second operation mode, and the processing chip 82 performs the second image signal and the third image signal in the second operation mode. The black levels of the image signals are respectively adjusted, and the second adjustment signal and the third adjustment signal are alternately generated and output.

图9为本申请实施例提供的第一工作模式下图像传感器的曝光顺序示意图,如图9所示,在第一工作模式下,图像传感器采用第一曝光参数,产生多帧第一图像信号,然后将多帧第一图像信号发送给处理芯片,处理芯片依次对多帧第一图像信号进行处理。在对多帧第一图像信号进行处理时,对于每一当前帧第一图像信号,处理芯片会根据当前帧第一图像信号对应的黑像素区域的黑电平,和当前帧第一图像信号的前一帧第一图像信号对应的黑像素区域的黑电平信息,来对当前帧第一图像信号的黑电平进行调整处理。9 is a schematic diagram of the exposure sequence of the image sensor in the first working mode provided by the embodiment of the present application. As shown in FIG. 9 , in the first working mode, the image sensor adopts the first exposure parameters to generate multiple frames of the first image signal, Then the multiple frames of first image signals are sent to the processing chip, and the processing chip sequentially processes the multiple frames of first image signals. When processing the first image signal of multiple frames, for each first image signal of the current frame, the processing chip will, according to the black level of the black pixel area corresponding to the first image signal of the current frame, and the first image signal of the current frame The black level information of the black pixel area corresponding to the first image signal of the previous frame is used to adjust the black level of the first image signal of the current frame.

图10为本申请实施例提供的第二工作模式下图像传感器的曝光顺序示意图一,图11为本申请实施例提供的第二工作模式下图像传感器的曝光顺序示意图二,如图10和11所示,在第二工作模式下,图像传感器采用第二曝光参数产生多帧第二图像信号,采用第三曝光参数产生多帧第三图像信号。在图10中,图像传感器在第二曝光参数和第三曝光参数下,交错进行曝光,并交错输出第二图像信号和第三图像信号。在图11中,图像传感器根据第二曝光参数曝光两次,输出两帧第二图像信号,而后根据第三曝光参数曝光,输出一帧第三图像信号,并重复这一曝光过程。FIG. 10 is a first schematic diagram of the exposure sequence of the image sensor in the second working mode provided by the embodiment of the present application, and FIG. 11 is a second schematic diagram of the exposure sequence of the image sensor in the second working mode provided by the embodiment of the present application, as shown in FIGS. 10 and 11 As shown, in the second working mode, the image sensor generates multiple frames of second image signals by using the second exposure parameters, and generates multiple frames of third image signals by using the third exposure parameters. In FIG. 10 , the image sensor performs exposure alternately under the second exposure parameter and the third exposure parameter, and outputs the second image signal and the third image signal alternately. In FIG. 11 , the image sensor is exposed twice according to the second exposure parameters to output two frames of second image signals, and then exposed according to the third exposure parameters to output one frame of third image signals, and this exposure process is repeated.

图10和图11中的两种曝光方式仅仅为一种举例,图像传感器也可以采用其他组合方式进行曝光。例如,多次曝光可以包括奇数次曝光和偶数次曝光,这样,第二曝光参数和第三曝光参数对应的曝光可以包括但不限于如下几种方式:The two exposure methods in FIG. 10 and FIG. 11 are just examples, and the image sensor may also adopt other combination methods for exposure. For example, multiple exposures may include odd-numbered exposures and even-numbered exposures. In this way, exposures corresponding to the second exposure parameter and the third exposure parameter may include but are not limited to the following methods:

第一种可能的实现方式,第二曝光参数对应的曝光为奇数次曝光中的一次曝光,第三曝光参数对应的曝光为偶数次曝光中的一次曝光。这样,多次曝光可以包括按照奇偶次序排列的第二曝光参数对应的曝光和第三曝光参数对应的曝光。例如,多次曝光中的第1次曝光、第3个曝光、第5次曝光等奇数次曝光均为第二曝光参数对应的曝光,第2次曝光、第4次曝光、第6次曝光等偶数次曝光均为第三曝光参数对应的曝光。In a first possible implementation manner, the exposure corresponding to the second exposure parameter is one exposure in the odd number of exposures, and the exposure corresponding to the third exposure parameter is one exposure in the even number of exposures. In this way, multiple exposures may include exposures corresponding to the second exposure parameters and exposures corresponding to the third exposure parameters arranged in odd-even order. For example, odd-numbered exposures such as the first exposure, the third exposure, and the fifth exposure in the multiple exposures are the exposures corresponding to the second exposure parameters, and the second exposure, the fourth exposure, the sixth exposure, etc. Even exposures are exposures corresponding to the third exposure parameter.

第二种可能的实现方式,第二曝光参数对应的曝光为偶数次曝光中的一次曝光,第三曝光参数对应的曝光为奇数次曝光中的一次曝光,这样,多次曝光可以包括按照奇偶次序排列的第二曝光参数对应的曝光和第三曝光参数对应的曝光。例如,多次曝光中的第1次曝光、第3个曝光、第5次曝光等奇数次曝光均为第三曝光参数对应的曝光,第2次曝光、第4次曝光、第6次曝光等偶数次曝光均为第二曝光参数对应的曝光。In the second possible implementation, the exposure corresponding to the second exposure parameter is one of the even-numbered exposures, and the exposure corresponding to the third exposure parameter is one of the odd-numbered exposures. In this way, multiple exposures can include The exposure corresponding to the second exposure parameter and the exposure corresponding to the third exposure parameter are arranged. For example, the odd-numbered exposures such as the first exposure, the third exposure, and the fifth exposure in the multiple exposures are the exposures corresponding to the third exposure parameters, and the second exposure, the fourth exposure, the sixth exposure, etc. Even exposures are exposures corresponding to the second exposure parameter.

第三种可能的实现方式,第二曝光参数对应的曝光为指定的奇数次曝光中的一次曝光,第三曝光参数对应的曝光为除指定的奇数次曝光之外的其他曝光中的一次曝光,也即是,第三曝光参数对应的曝光可以为多次曝光中的奇数次曝光,也可以为多次曝光中的偶数次曝光。In a third possible implementation, the exposure corresponding to the second exposure parameter is one of the specified odd-numbered exposures, and the exposure corresponding to the third exposure parameter is one of the exposures other than the specified odd-numbered exposures, That is, the exposure corresponding to the third exposure parameter may be an odd-numbered exposure in the multiple exposures, or may be an even-numbered exposure in the multiple exposures.

第四种可能的实现方式,第二曝光参数对应的曝光为指定的偶数次曝光中的一次曝光,第三曝光参数对应的曝光为除指定的偶数次曝光之外的其他曝光中的一次曝光,也即是,第三曝光参数对应的曝光可以为多次曝光中的奇数次曝光,也可以为多次曝光中的偶数次曝光。In a fourth possible implementation, the exposure corresponding to the second exposure parameter is one of the specified even-numbered exposures, and the exposure corresponding to the third exposure parameter is one of the exposures other than the specified even-numbered exposures, That is, the exposure corresponding to the third exposure parameter may be an odd-numbered exposure in the multiple exposures, or may be an even-numbered exposure in the multiple exposures.

第五种可能的实现方式,第二曝光参数对应的曝光为第一曝光序列中的一次曝光,第三曝光参数对应的曝光为第二曝光序列中的一次曝光。In a fifth possible implementation manner, the exposure corresponding to the second exposure parameter is one exposure in the first exposure sequence, and the exposure corresponding to the third exposure parameter is one exposure in the second exposure sequence.

第六种可能的实现方式,第二曝光参数对应的曝光为第二曝光序列中的一次曝光,第三曝光参数对应的曝光为第一曝光序列中的一次曝光。In a sixth possible implementation manner, the exposure corresponding to the second exposure parameter is one exposure in the second exposure sequence, and the exposure corresponding to the third exposure parameter is one exposure in the first exposure sequence.

其中,上述多次曝光包括多个曝光序列,第一曝光序列和第二曝光序列为该多个曝光序列中的同一个曝光序列或者两个不同的曝光序列,每个曝光序列包括N次曝光,该N次曝光包括1次第二曝光参数对应的曝光和N-1次第三曝光参数对应的曝光,或者,该N次曝光包括1次第三曝光参数对应的曝光和N-1次第二曝光参数对应的曝光,N为大于2的正整数。Wherein, the above multiple exposures include multiple exposure sequences, the first exposure sequence and the second exposure sequence are the same exposure sequence or two different exposure sequences in the multiple exposure sequences, each exposure sequence includes N exposures, The N exposures include 1 exposure corresponding to the second exposure parameter and N-1 exposures corresponding to the third exposure parameter, or, the N exposures include 1 exposure corresponding to the third exposure parameter and N-1 exposures corresponding to the second exposure parameter The exposure corresponding to the exposure parameter, N is a positive integer greater than 2.

例如,每个曝光序列包括3次曝光,这3次曝光可以包括1次第二曝光参数对应的曝光和2次第三曝光参数对应的曝光,这样,每个曝光序列的第1次曝光可以为第二曝光参数对应的曝光,第2次和第3次曝光为第三曝光参数对应的曝光。也即是,每个曝光序列可以表示为:第二曝光参数对应的曝光、第三曝光参数对应的曝光、第三曝光参数对应的曝光。或者,这3次曝光可以包括1次第三曝光参数对应的曝光和2次第二曝光参数对应的曝光,这样,每个曝光序列的第1次曝光可以为第三曝光参数对应的曝光,第2次和第3次曝光为第二曝光参数对应的曝光。也即是,每个曝光序列可以表示为:第三曝光参数对应的曝光、第二曝光参数对应的曝光、第二曝光参数对应的曝光。For example, each exposure sequence includes 3 exposures, and these 3 exposures may include 1 exposure corresponding to the second exposure parameter and 2 exposures corresponding to the third exposure parameter, so that the first exposure of each exposure sequence can be The exposure corresponding to the second exposure parameter, and the second and third exposures are exposures corresponding to the third exposure parameter. That is, each exposure sequence may be expressed as: exposure corresponding to the second exposure parameter, exposure corresponding to the third exposure parameter, and exposure corresponding to the third exposure parameter. Alternatively, the three exposures may include one exposure corresponding to the third exposure parameter and two exposures corresponding to the second exposure parameter. In this way, the first exposure of each exposure sequence may be the exposure corresponding to the third exposure parameter, and the second exposure corresponding to the third exposure parameter. The second exposure and the third exposure are exposures corresponding to the second exposure parameter. That is, each exposure sequence may be expressed as: exposure corresponding to the third exposure parameter, exposure corresponding to the second exposure parameter, and exposure corresponding to the second exposure parameter.

上述仅提供了六种第二曝光参数对应的曝光和第三曝光参数对应的曝光的可能的实现方式,实际应用中,不限于上述六种可能的实现方式,本申请实施例对此不做限定。The above only provides six possible implementations of the exposure corresponding to the second exposure parameter and the exposure corresponding to the third exposure parameter. In practical applications, it is not limited to the above six possible implementations, which are not limited in the embodiment of the present application. .

曝光参数指的是采集图像时采用的曝光参数,在图像传感器处于第二工作模式时,第二曝光参数与第三曝光参数中的至少一个曝光参数不同,其中,至少一个曝光参数为曝光时间、曝光增益、光圈大小中的一种或多种,曝光增益包括模拟增益,和/或,数字增益。曝光时间是指图像传感器的各个像素点的感光时间,例如,若图像传感器为相机,则曝光时间指的是相机的快门打开到关闭的时间间隔。曝光时间的长短影响进光量的大小,当光线较强时,曝光时间可设置较短,当光线较暗时,可适当延长曝光时间,提高进光量。The exposure parameter refers to the exposure parameter used when capturing the image. When the image sensor is in the second working mode, the second exposure parameter is different from at least one of the third exposure parameters, wherein at least one of the exposure parameters is exposure time, One or more of exposure gain and aperture size, the exposure gain includes analog gain, and/or digital gain. The exposure time refers to the photosensitive time of each pixel of the image sensor. For example, if the image sensor is a camera, the exposure time refers to the time interval from opening to closing of the shutter of the camera. The length of exposure time affects the amount of incoming light. When the light is strong, the exposure time can be set shorter. When the light is dark, the exposure time can be appropriately extended to increase the amount of incoming light.

增益分为模拟增益和数字增益,模拟增益是指将图像传感器输出的电信号进行放大,数字增益是指完成模数转换后,将得到的数字信号放大。调节增益时,能够调整输出的图像的亮度,增益越大,则图像亮度越高,但同时噪声也会越大,造成颗粒增加,输出画面较模糊。光圈大小也能够控制进光量的大小,光圈较大时进光量较多,反之则进光量较少。The gain is divided into analog gain and digital gain. The analog gain refers to amplifying the electrical signal output by the image sensor, and the digital gain refers to amplifying the obtained digital signal after the analog-to-digital conversion is completed. When adjusting the gain, you can adjust the brightness of the output image. The larger the gain, the higher the brightness of the image, but at the same time, the noise will increase, resulting in increased particles and blurred output images. The size of the aperture can also control the amount of light entering. When the aperture is larger, the amount of light entering is more, and vice versa, the amount of light entering is less.

第二曝光参数和第三曝光参数条件中的曝光参数至少有一个不同,其中也可以有一个或多个曝光参数相同。第一曝光参数条件与第二曝光参数条件可以相同也可以不同,第一曝光参数与第三曝光参数可以相同也可以不同。At least one of the exposure parameters in the second exposure parameter and the third exposure parameter condition is different, and one or more exposure parameters may also be the same. The first exposure parameter condition and the second exposure parameter condition may be the same or different, and the first exposure parameter and the third exposure parameter may be the same or different.

得到第一图像信号、第二图像信号和第三图像信号后,需要对其进行黑电平调整处理,下面将结合图12-图15对该过程进行说明。After the first image signal, the second image signal, and the third image signal are obtained, black level adjustment processing needs to be performed on them, and the process will be described below with reference to FIGS. 12-15 .

当相机处于第一工作模式时,第一调整方式具体为:When the camera is in the first working mode, the first adjustment method is specifically:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平值信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level value information of the first image signal of the historical frame, wherein , the first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame.

下面将以图像传感器为RGBW传感器为例、以第一调整方式为例,进行黑电平调整处理的说明,其中,RGBW传感器包括四个感光通道,分别是R感光通道、G感光通道、B感光通道和W感光通道。The following will take the image sensor as an RGBW sensor as an example, and take the first adjustment method as an example to describe the black level adjustment process. The RGBW sensor includes four light-sensitive channels, which are R light-sensitive channel, G light-sensitive channel, and B light-sensitive channel. channel and W photosensitive channel.

图12为本申请实施例提供的第一工作模式下的黑电平调整处理示意图,如图12所示,具体步骤为:Figure 12 is a schematic diagram of black level adjustment processing in the first working mode provided by the embodiment of the present application, as shown in Figure 12, the specific steps are:

S1:对于输入的当前帧第一图像信号,分别统计各个感光通道对应的黑像素区域的黑电平,获得当前帧第一图像信号的各个感光通道的黑电平统计值。S1: For the input first image signal of the current frame, respectively count the black level of the black pixel area corresponding to each photosensitive channel, and obtain the black level statistical value of each photosensitive channel of the first image signal of the current frame.

其中,统计可以采用求平均、求中值、加权平均或类似处理中的一种或多种组合。Among them, the statistics may use one or more combinations of average, median, weighted average or similar processing.

S2:从存储器中取出历史帧第一图像信号的各个感光通道的黑电平值,若当前帧第一图像信号为第一帧,则存储器中存放预先设置的黑电平值,其中,历史帧第一图像信号为当前帧第一图像信号的前一帧第一图像信号,当前帧第一图像信号为处理芯片正在处理的第一图像信号。S2: Take out the black level value of each photosensitive channel of the first image signal of the historical frame from the memory. If the first image signal of the current frame is the first frame, store the preset black level value in the memory. Among them, the historical frame The first image signal is the first image signal of the previous frame of the first image signal of the current frame, and the first image signal of the current frame is the first image signal being processed by the processing chip.

S3:根据预设条件对当前帧第一图像信号的各个感光通道的黑电平统计值和历史帧第一图像信号的各个感光通道的黑电平值进行混合处理,获得当前帧第一图像信号的各个感光通道的黑电平值,并放入存储器中,供下一帧第一图像信号使用。S3: According to the preset conditions, the black level statistical value of each photosensitive channel of the first image signal of the current frame is mixed with the black level value of each photosensitive channel of the first image signal of the historical frame to obtain the first image signal of the current frame The black level value of each photosensitive channel of the camera is stored in the memory for use by the first image signal of the next frame.

其中,预设条件可以是加权系数、选择信号、传感器模拟增益、数字增益、曝光时间、温度、与上一帧的偏差等中的一种或多种组合,混合处理可以是加权平均或选择。Among them, the preset condition can be one or more combinations of weighting coefficient, selection signal, sensor analog gain, digital gain, exposure time, temperature, deviation from the previous frame, etc., and the mixing process can be weighted average or selection.

S4:根据第一目标黑电平值和当前帧第一图像信号的各个感光通道的黑电平值,计算当前帧第一图像信号的各个感光通道的黑电平偏移量。S4: Calculate the black level offset of each photosensitive channel of the first image signal of the current frame according to the first target black level value and the black level value of each photosensitive channel of the first image signal of the current frame.

其中,第一目标黑电平值为预设的参数,不小于0,是用于将整体图像信号的黑电平调整至这一目标值,计算当前帧第一图像信号的各个感光通道的黑电平偏移量,可以是用当前帧第一图像信号的各个感光通道的黑电平值与第一目标黑电平值相减。Wherein, the first target black level value is a preset parameter, not less than 0, which is used to adjust the black level of the overall image signal to this target value, and calculate the black level of each photosensitive channel of the first image signal of the current frame. The level offset may be subtracted from the first target black level value by the black level value of each photosensitive channel of the first image signal of the current frame.

S5:将当前帧第一图像信号的各个感光通道的黑电平偏移量作用于当前帧第一图像信号,达到修正黑电平偏移的作用。S5: applying the black level offset of each photosensitive channel of the first image signal of the current frame to the first image signal of the current frame, so as to correct the black level offset.

将当前帧第一图像信号的各个感光通道的黑电平偏移量作用于当前帧第一图像信号,是指将当前帧第一图像信号的黑电平值加上或减去黑电平偏移量。Applying the black level offset of each photosensitive channel of the first image signal of the current frame to the first image signal of the current frame refers to adding or subtracting the black level offset to the black level value of the first image signal of the current frame displacement.

下面以一个实例进行说明。Let's take an example to illustrate.

首先,对于输入的第一图像信号中的黑像素区域,对RGBW四个通道数据值分别求取均值(也可以先对黑像素区域进行中值滤波等去噪处理后再求均值),获得当前帧第一图像信号的各个感光通道对应的黑电平统计值,其中,当前帧第一图像信号的R感光通道的黑电平统计值为hist_R,当前帧第一图像信号的G感光通道的黑电平统计值为hist_G,当前帧第一图像信号的B感光通道的黑电平统计值为hist_B,当前帧第一图像信号的W感光通道的黑电平统计值为hist_W。First, for the black pixel area in the input first image signal, the average value is calculated for the data values of the four RGBW channels respectively (you can also perform median filtering and other denoising processing on the black pixel area before calculating the average value), to obtain the current The black level statistical value corresponding to each photosensitive channel of the first image signal of the frame, wherein, the black level statistical value of the R photosensitive channel of the first image signal of the current frame is hist_R, and the black level of the G photosensitive channel of the first image signal of the current frame is hist_R. The level statistical value is hist_G, the black level statistical value of the B photosensitive channel of the first image signal of the current frame is hist_B, and the black level statistical value of the W photosensitive channel of the first image signal of the current frame is hist_W.

其次,从存储器中取出历史帧第一图像信号的各个感光通道的黑电平值,其中,历史帧第一图像信号的R感光通道的黑电平值为blc_pre_R,历史帧第一图像信号的G感光通道的黑电平值为blc_pre_G,历史帧第一图像信号的B感光通道的黑电平值为blc_pre_B,历史帧第一图像信号的W感光通道的黑电平值为blc_pre_W,若当前帧第一图像信号为第一帧,则存储器中预先设置一组黑电平值。Secondly, the black level value of each photosensitive channel of the first image signal of the historical frame is taken out from the memory, wherein, the black level value of the R photosensitive channel of the first image signal of the historical frame is blc_pre_R, and the G value of the first image signal of the historical frame is blc_pre_R. The black level value of the photosensitive channel is blc_pre_G, the black level value of the photosensitive channel B of the first image signal of the historical frame is blc_pre_B, and the black level value of the W photosensitive channel of the first image signal of the historical frame is blc_pre_W, if the current frame No. An image signal is the first frame, and a set of black level values is preset in the memory.

再次,根据预先配置的权重值weight对当前帧第一图像信号的各个感光通道对应的黑电平统计值和历史帧第一图像信号的各个感光通道的黑电平值进行加权,获得当前帧第一图像信号的各个感光通道的黑电平值,并将当前帧第一图像信号的各个感光通道的黑电平值存入存储器中。Again, according to the preconfigured weight value weight, the black level statistical value corresponding to each photosensitive channel of the first image signal of the current frame and the black level value of each photosensitive channel of the first image signal of the historical frame are weighted to obtain the current frame No. The black level value of each photosensitive channel of an image signal, and store the black level value of each photosensitive channel of the first image signal of the current frame into the memory.

blc_cur_R=(1-weight)*blc_pre_R+weight*hist_R,blc_cur_R=(1-weight)*blc_pre_R+weight*hist_R,

blc_cur_G=(1-weight)*blc_pre_G+weight*hist_G,blc_cur_G=(1-weight)*blc_pre_G+weight*hist_G,

blc_cur_B=(1-weight)*blc_pre_W+weight*hist_B,blc_cur_B=(1-weight)*blc_pre_W+weight*hist_B,

blc_cur_W=(1-weight)*blc_pre_W+weight*hist_W,blc_cur_W=(1-weight)*blc_pre_W+weight*hist_W,

其中,blc_cur_R为当前帧第一图像信号的R感光通道的黑电平,blc_cur_G为当前帧第一图像信号的G感光通道的黑电平,blc_cur_B为当前帧第一图像信号的B感光通道的黑电平,blc_cur_W为当前帧第一图像信号的W感光通道的黑电平。Among them, blc_cur_R is the black level of the R photosensitive channel of the first image signal of the current frame, blc_cur_G is the black level of the G photosensitive channel of the first image signal of the current frame, blc_cur_B is the black level of the B photosensitive channel of the first image signal of the current frame Level, blc_cur_W is the black level of the W photosensitive channel of the first image signal of the current frame.

再次,根据第一目标黑电平值dst_R、dst_G、dst_B、dst_W和当前帧第一图像信号的各个感光通道的黑电平值计算当前帧第一图像信号的各个感光通道的黑电平偏移量。Again, calculate the black level offset of each photosensitive channel of the first image signal of the current frame according to the first target black level value dst_R, dst_G, dst_B, dst_W and the black level value of each photosensitive channel of the first image signal of the current frame quantity.

blc_offset_cur_R=blc_cur_R-dst_R,blc_offset_cur_R=blc_cur_R-dst_R,

blc_offset_cur_G=blc_cur_G-dst_G,blc_offset_cur_G=blc_cur_G-dst_G,

blc_offset_cur_B=blc_cur_B-dst_B,blc_offset_cur_B=blc_cur_B-dst_B,

blc_offset_cur_W=blc_cur_W-dst_W,blc_offset_cur_W=blc_cur_W-dst_W,

其中,blc_offset_cur_R为当前帧第一图像信号的R感光通道的黑电平偏移量;Among them, blc_offset_cur_R is the black level offset of the R photosensitive channel of the first image signal of the current frame;

blc_offset_cur_G为当前帧第一图像信号的G感光通道的黑电平偏移量;blc_offset_cur_G is the black level offset of the G photosensitive channel of the first image signal of the current frame;

blc_offset_cur_B为当前帧第一图像信号的B感光通道的黑电平偏移量;blc_offset_cur_B is the black level offset of the B photosensitive channel of the first image signal of the current frame;

blc_offset_cur_W为当前帧第一图像信号的W感光通道的黑电平偏移量。blc_offset_cur_W is the black level offset of the W photosensitive channel of the first image signal of the current frame.

最后,将计算得到的当前帧第一图像信号的各个感光通道的黑电平偏移量作用于当前帧第一图像信号的有效像素区域数据值上,具体方式为用有效像素区域的各个感光通道数据值减去对应感光通道的黑电平偏移量,当结果小于0时,则置为0,得到当前帧第一图像信号对应的第一调整信号。Finally, the calculated black level offset of each photosensitive channel of the first image signal of the current frame is applied to the data value of the effective pixel area of the first image signal of the current frame. The specific method is to use each photosensitive channel of the effective pixel area The data value is subtracted from the black level offset of the corresponding photosensitive channel, and when the result is less than 0, it is set to 0 to obtain the first adjustment signal corresponding to the first image signal of the current frame.

若相机处于第二工作模式下,则处理芯片需要对第二图像信号和第三图像信号分别进行处理。If the camera is in the second working mode, the processing chip needs to process the second image signal and the third image signal respectively.

首先处理芯片需要将二图像信号和第三图像信号进行区分,图13为本申请实施例提供的第二图像信号和第三图像信号的区分示意图,如图13所示,图像传感器根据第二曝光参数和第三曝光参数下的交替曝光交替产生第二图像信号和第三图像信号,然后处理芯片将图像传感器产生的图像序列进行逻辑区分,得到第二图像序列和第三图像序列,其中,第二图像序列中包括多帧第二图像信号,第三图像序列中包括多帧第三图像信号,然后处理芯片对于第二图像信号和第三图像信号分别进行处理。其中,第二调整方式具体为:First, the processing chip needs to distinguish the second image signal from the third image signal. Figure 13 is a schematic diagram of the distinction between the second image signal and the third image signal provided by the embodiment of the present application. As shown in Figure 13, the image sensor according to the second exposure The alternate exposure under the parameter and the third exposure parameter alternately generates the second image signal and the third image signal, and then the processing chip logically distinguishes the image sequence generated by the image sensor to obtain the second image sequence and the third image sequence, wherein, the first The second image sequence includes multiple frames of the second image signal, and the third image sequence includes multiple frames of the third image signal, and then the processing chip processes the second image signal and the third image signal respectively. Among them, the second adjustment method is specifically:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

第三调整方式具体为:The third adjustment method is specifically:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

其中历史帧第二图像信号的黑电平信息可以为历史帧第二图像信号的黑电平值,也可以为历史帧第二图像信号的黑电平偏移量,下面将针对这两种情况举例说明。The black level information of the second image signal of the historical frame can be the black level value of the second image signal of the historical frame, or the black level offset of the second image signal of the historical frame. The following two cases will be addressed for example.

图14为本申请实施例提供的第二工作模式下的黑电平调整处理示意图一,如图14所示,处理芯片对于第二图像信号和第三图像信号的处理过程类似。FIG. 14 is a first schematic diagram of black level adjustment processing in the second working mode provided by the embodiment of the present application. As shown in FIG. 14 , the processing chip processes the second image signal and the third image signal similarly.

例如,对于第二图像信号,首先分别统计当前帧第二图像信号各个感光通道对应的黑像素区域的黑电平,获得当前帧第二图像信号的各个感光通道的黑电平统计值。For example, for the second image signal, the black level of the black pixel area corresponding to each photosensitive channel of the second image signal of the current frame is firstly counted to obtain the statistical value of the black level of each photosensitive channel of the second image signal of the current frame.

其中,统计可以采用求平均、求中值、加权平均或类似处理中的一种或多种组合。Among them, the statistics may use one or more combinations of average, median, weighted average or similar processing.

然后,从存储器中取出历史帧第二图像信号的各个感光通道的黑电平值,若当前帧第二图像信号为第一帧,则存储器中存放预先设置的黑电平值。Then, the black level value of each photosensitive channel of the second image signal of the historical frame is fetched from the memory, and if the second image signal of the current frame is the first frame, the preset black level value is stored in the memory.

其次,根据预设条件对当前帧第二图像信号的各个感光通道的黑电平统计值和历史帧第二图像信号的各个感光通道的黑电平值进行混合处理,获得当前帧第二图像信号的各个感光通道的黑电平值,并放入存储器中,供下一帧第二图像信号使用。Secondly, according to the preset conditions, the black level statistical value of each photosensitive channel of the second image signal of the current frame is mixed with the black level value of each photosensitive channel of the second image signal of the historical frame to obtain the second image signal of the current frame The black level value of each photosensitive channel of the camera is stored in the memory for use by the second image signal of the next frame.

其中,预设条件可以是加权系数、选择信号、传感器模拟增益、数字增益、曝光时间、温度、与上一帧的偏差等中的一种或多种组合,混合处理可以是加权平均或选择。Among them, the preset condition can be one or more combinations of weighting coefficient, selection signal, sensor analog gain, digital gain, exposure time, temperature, deviation from the previous frame, etc., and the mixing process can be weighted average or selection.

再次,根据第二目标黑电平值和当前帧第二图像信号的各个感光通道的黑电平值,计算当前帧第二图像信号的各个感光通道的黑电平偏移量,第二目标黑电平值为预设的参数,不小于0,是用于将整体图像信号的黑电平调整至这一目标值,计算当前帧第二图像信号的各个感光通道的黑电平偏移量,可以是用当前帧第二图像信号的各个感光通道的黑电平值与第二目标黑电平值相减。Again, according to the second target black level value and the black level value of each photosensitive channel of the second image signal of the current frame, calculate the black level offset of each photosensitive channel of the second image signal of the current frame, the second target black The level value is a preset parameter, not less than 0, which is used to adjust the black level of the overall image signal to this target value, and calculate the black level offset of each photosensitive channel of the second image signal of the current frame, It may be that the black level value of each photosensitive channel of the second image signal of the current frame is subtracted from the second target black level value.

最后,将当前帧第二图像信号的各个感光通道的黑电平偏移量作用于当前帧第二图像信号,达到修正黑电平偏移的作用。Finally, the black level offset of each photosensitive channel of the second image signal of the current frame is applied to the second image signal of the current frame to achieve the effect of correcting the offset of the black level.

对于第三图像信号的处理过程与此类似,此处不再赘述。需要说明的是,对第二图像信号进行处理时,结合的是当前帧第二图像信号的上一帧第二图像信号对应的黑像素区域的黑电平值以及第二目标黑电平值,对第三图像信号进行处理时,结合的是当前帧第三图像信号的上一帧第三图像信号对应的黑像素区域的黑电平值以及第三目标黑电平值。The processing process for the third image signal is similar and will not be repeated here. It should be noted that when the second image signal is processed, the black level value of the black pixel area corresponding to the second image signal of the previous frame of the second image signal of the current frame and the second target black level value are combined, When processing the third image signal, the black level value of the black pixel region corresponding to the third image signal of the previous frame of the current frame of the third image signal and the third target black level value are combined.

第二图像信号对应的黑像素区域的黑电平信息除了可以为第二图像信号的各个感光通道的黑电平值外,还可以是第二图像信号的各个感光通道的黑电平偏移量,对应的,处理芯片的处理过程也会相应的发生改变。The black level information of the black pixel area corresponding to the second image signal may not only be the black level value of each photosensitive channel of the second image signal, but also the black level offset of each photosensitive channel of the second image signal , correspondingly, the processing process of the processing chip will change accordingly.

图15为本申请实施例提供的第二工作模式下的黑电平调整处理示意图二,如图15所示,对于第二图像信号,历史帧第二图像信号的黑电平信息为历史帧第二图像信号的黑电平偏移量,处理过程具体包括如下步骤:FIG. 15 is a second schematic diagram of black level adjustment processing in the second working mode provided by the embodiment of the present application. As shown in FIG. 15 , for the second image signal, the black level information of the second image signal in the historical frame is The black level offset of the second image signal, the processing process specifically includes the following steps:

首先,对于输入的当前帧第二图像信号的各个感光通道对于的黑像素区域,对RGBW四个通道数据值分别求取中值,获得当前帧第二图像信号的各个感光通道对应的黑电平统计值,其中,当前帧第二图像信号的R感光通道的黑电平统计值为hist_R,当前帧第二图像信号的G感光通道的黑电平统计值为hist_G,当前帧第二图像信号的B感光通道的黑电平统计值为hist_B,当前帧第二图像信号的W感光通道的黑电平统计值为hist_W;First, for the black pixel area corresponding to each photosensitive channel of the second image signal of the current frame that is input, the median values of the RGBW four channel data values are respectively calculated to obtain the black level corresponding to each photosensitive channel of the second image signal of the current frame Statistical value, wherein, the black level statistical value of the R photosensitive channel of the second image signal of the current frame is hist_R, the black level statistical value of the G photosensitive channel of the second image signal of the current frame is hist_G, and the black level statistical value of the second image signal of the current frame is hist_G. The black level statistical value of the photosensitive channel B is hist_B, and the black level statistical value of the W photosensitive channel of the second image signal of the current frame is hist_W;

然后,根据第二目标黑电平值dst_R、dst_G、dst_B、dst_W和当前帧第二图像信号的各个感光通道对应的黑电平统计值计算当前帧第二图像信号的各个感光通道的黑电平偏移量;Then, calculate the black level of each photosensitive channel of the second image signal of the current frame according to the second target black level values dst_R, dst_G, dst_B, dst_W and the black level statistics corresponding to each photosensitive channel of the second image signal of the current frame Offset;

blc_offset_R=hist_R-dst_R,blc_offset_R=hist_R-dst_R,

blc_offset_G=hist_G-dst_G,blc_offset_G=hist_G-dst_G,

blc_offset_B=hist_B-dst_B,blc_offset_B=hist_B-dst_B,

blc_offset_W=hist_W-dst_W。blc_offset_W=hist_W−dst_W.

其次,从存储器中取出历史帧第二图像信号的各个感光通道的黑电平偏移量blc_offset_pre_R、blc_offset_pre_G、blc_offset_pre_B、blc_offset_pre_W,若当前帧第二图像信号为第一帧,则存储器中预先设置一组黑电平偏移量;Secondly, take out the black level offsets blc_offset_pre_R, blc_offset_pre_G, blc_offset_pre_B, blc_offset_pre_W of each photosensitive channel of the second image signal of the historical frame from the memory, if the second image signal of the current frame is the first frame, then a group is preset in the memory black level offset;

再次,计算当前帧第二图像信号的各个感光通道的黑电平偏移量与上一帧第二图像信号的各个感光通道的黑电平偏移量的差异,得到第二图像信号的各个感光通道的差异偏移量;Again, calculate the difference between the black level offset of each photosensitive channel of the second image signal of the current frame and the black level offset of each photosensitive channel of the second image signal of the previous frame, and obtain the photosensitive channels of the second image signal channel difference offset;

dif_offset_R=|blc_offset_R-blc_offset_pre_R|,dif_offset_R=|blc_offset_R-blc_offset_pre_R|,

dif_offset_G=|blc_offset_G-blc_offset_pre_G|,dif_offset_G=|blc_offset_G-blc_offset_pre_G|,

dif_offset_B=|blc_offset_B-blc_offset_pre_B|,dif_offset_B=|blc_offset_B-blc_offset_pre_B|,

dif_offset_W=|blc_offset_W-blc_offset_pre_W|,dif_offset_W=|blc_offset_W-blc_offset_pre_W|,

max_dif_offset=max(dif_offset_R,dif_offset_G,dif_offset_B,dif_offset_W)max_dif_offset=max(dif_offset_R, dif_offset_G, dif_offset_B, dif_offset_W)

其中,||表示求绝对值,max表示求最大值。Among them, || means to find the absolute value, and max means to find the maximum value.

然后,根据当前帧第二图像信号的各个感光通道的差异偏移量和预设差异偏移量阈值dif_thr对黑电平偏移量进行计算,获得当前帧第二图像信号的各个感光通道的黑电平偏移量;Then, the black level offset is calculated according to the difference offset of each photosensitive channel of the second image signal of the current frame and the preset difference offset threshold dif_thr, and the black level offset of each photosensitive channel of the second image signal of the current frame is obtained. level offset;

本步骤中,除了通过该方法获取当前帧第二图像信号的各个感光通道的黑电平偏移量,还可以按照模拟增益、数字增益、曝光时间、温度等作为条件进行加权或选择。In this step, in addition to obtaining the black level offset of each photosensitive channel of the second image signal of the current frame through this method, weighting or selection can also be performed according to conditions such as analog gain, digital gain, exposure time, and temperature.

最后,将计算得到的当前帧第二图像信号的各个感光通道的黑电平偏移量作用于当前帧第二图像信号的有效像素区域数据值上,具体方式为用当前帧第二图像信号的有效像素区域的各通道数据值减去对应通道的当前帧黑电平偏移量,当结果小于0时,则置为0,得到第二调整信号。Finally, the calculated black level offset of each photosensitive channel of the second image signal of the current frame is applied to the effective pixel area data value of the second image signal of the current frame. The current frame black level offset of the corresponding channel is subtracted from the data value of each channel in the effective pixel area, and when the result is less than 0, it is set to 0 to obtain the second adjustment signal.

对于第三图像信号可同样采用上述步骤进行处理,其中当前帧第三图像信号的上一帧图像信号为历史帧第三图像信号,在对第三图像信号进行黑电平调整时,相应的第二目标黑电平值需要替换为第三目标黑电平值,通过获取当前帧第三图像信号的各个感光通道对应的黑像素区域的黑电平以及当前帧第三图像信号的上一帧第三图像信号的各个感光通道的黑电平偏移量对当前帧第三图像信号进行黑电平调整处理,此处不再赘述。For the third image signal, the above-mentioned steps can also be used for processing, wherein the image signal of the previous frame of the third image signal of the current frame is the third image signal of the historical frame, and when the black level of the third image signal is adjusted, the corresponding first frame The second target black level value needs to be replaced with the third target black level value, by obtaining the black level of the black pixel area corresponding to each photosensitive channel of the third image signal of the current frame and the first frame of the previous frame of the third image signal of the current frame The black level offset of each photosensitive channel of the three image signals performs black level adjustment processing on the third image signal of the current frame, which will not be repeated here.

根据上述步骤进行黑电平调整后,在第一工作模式下得到第一调整信号,在第二工作模式下得到第二调整信号和第三调整信号。进一步的,处理芯片可以包括黑电平调整单元和第一图像处理单元,其中黑电平调整单元用于将图像信号进行黑电平调整,得到相应的调整信号,第一图像处理单元用于根据相应的调整信号得到相应的处理信号。After the black level is adjusted according to the above steps, the first adjustment signal is obtained in the first working mode, and the second adjustment signal and the third adjustment signal are obtained in the second working mode. Further, the processing chip may include a black level adjustment unit and a first image processing unit, wherein the black level adjustment unit is used to adjust the black level of the image signal to obtain a corresponding adjustment signal, and the first image processing unit is used to Correspondingly adjusted signals result in correspondingly processed signals.

图16为本申请实施例提供的相机处理示意图一,如图16所示,当相机处于第一工作模式时,图像传感器采集生成第一图像信号,并将第一图像信号发送给黑电平调整单元,黑电平调整单元对第一图像信号进行处理,生成第一调整信号,并将第一调整信号发送给第一图像处理单元,第一图像处理单元将第一调整信号进行处理,得到第一处理图像,第一图像处理单元对第一调整信号的处理包括但不限于降噪、增益、坏点校正、黑电平校正、色彩校正、亮度映射、锐化等的一个或多个。Figure 16 is a first schematic diagram of camera processing provided by the embodiment of the present application. As shown in Figure 16, when the camera is in the first working mode, the image sensor collects and generates the first image signal, and sends the first image signal to the black level adjustment unit, the black level adjustment unit processes the first image signal to generate a first adjustment signal, and sends the first adjustment signal to the first image processing unit, and the first image processing unit processes the first adjustment signal to obtain the first adjustment signal For image processing, the processing of the first adjustment signal by the first image processing unit includes but not limited to one or more of noise reduction, gain, dead point correction, black level correction, color correction, brightness mapping, sharpening, etc.

当相机处于第二工作模式时,图像传感器采集生成第二图像信号和第三图像信号,并将第二图像信号和第三图像信号发送给黑电平调整单元,黑电平调整单元对第二图像信号进行处理,生成第二调整信号,对第三图像信号进行处理,生成第三调整信号,并将第二调整信号和第三调整信号发送给第一图像处理单元,第一图像处理单元将第二调整信号进行处理,得到第二处理图像,将第三调整信号进行处理,得到第三处理图像,第一图像处理单元对第二和第三调整信号的处理包括但不限于降噪、增益、坏点校正、黑电平校正、色彩校正、亮度映射、锐化等的一个或多个。When the camera is in the second working mode, the image sensor collects and generates the second image signal and the third image signal, and sends the second image signal and the third image signal to the black level adjustment unit, and the black level adjustment unit controls the second The image signal is processed to generate a second adjustment signal, the third image signal is processed to generate a third adjustment signal, and the second adjustment signal and the third adjustment signal are sent to the first image processing unit, and the first image processing unit will The second adjustment signal is processed to obtain a second processed image, and the third adjustment signal is processed to obtain a third processed image. The processing of the second and third adjustment signals by the first image processing unit includes but is not limited to noise reduction, gain One or more of , dead pixel correction, black level correction, color correction, brightness mapping, sharpening, etc.

所述图像处理单元还用于:The image processing unit is also used for:

在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。In the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

图17为本申请实施例提供的相机处理示意图二,如图17所示,当相机处于第二工作模式时,第一图像处理单元还用于对第二处理图像和第三处理图像进行融合处理,得到处理图像。Figure 17 is the second schematic diagram of camera processing provided by the embodiment of the present application. As shown in Figure 17, when the camera is in the second working mode, the first image processing unit is also used to perform fusion processing on the second processed image and the third processed image , get the processed image.

图18为本申请实施例提供的相机处理示意图三,如图18所示,进一步的,处理芯片还可以包括第二图像处理单元,当相机处于第一工作模式时,第二图像处理单元用于对第一图像信号进行处理,得到第一处理信号,并将第一处理信号发送给黑电平调整单元,黑电平调整单元用于对第一处理信号进行黑电平调整处理,得到第一调整信号,并将第一调整信号发送给第一图像处理单元,第一图像处理单元用于将第一调整信号处理得到第一处理图像。Fig. 18 is a schematic diagram of the third camera processing provided by the embodiment of the present application. As shown in Fig. 18, further, the processing chip may further include a second image processing unit. When the camera is in the first working mode, the second image processing unit is used to Process the first image signal to obtain a first processed signal, and send the first processed signal to a black level adjustment unit, and the black level adjustment unit is used to perform black level adjustment processing on the first processed signal to obtain a first adjust the signal, and send the first adjusted signal to the first image processing unit, and the first image processing unit is used to process the first adjusted signal to obtain a first processed image.

当相机处于第二工作模式时,第二图像处理单元用于对第二图像信号进行处理,得到第二处理信号,对第三图像信号进行处理,得到第三处理信号,并将第二处理信号和第三处理信号发送给黑电平调整单元。黑电平调整单元用于对第二处理信号进行黑电平调整处理,得到第二调整信号,对第三处理信号进行黑电平调整处理,得到第三调整信号,并将第二调整信号和第三调整信号发送给第一图像处理单元。第一图像处理单元用于将第二调整信号处理得到第二处理图像,将第三调整信号处理得到第三处理图像。第二图像处理单元对图像信号的处理包括但不限于降噪、增益等的一个或多个。When the camera is in the second working mode, the second image processing unit is used to process the second image signal to obtain a second processed signal, process the third image signal to obtain a third processed signal, and convert the second processed signal to and the third processed signal are sent to the black level adjustment unit. The black level adjustment unit is used to perform black level adjustment processing on the second processed signal to obtain a second adjustment signal, perform black level adjustment processing on the third processed signal to obtain a third adjustment signal, and combine the second adjustment signal and The third adjustment signal is sent to the first image processing unit. The first image processing unit is configured to process the second adjustment signal to obtain a second processed image, and process the third adjustment signal to obtain a third processed image. The processing of the image signal by the second image processing unit includes, but is not limited to, one or more of noise reduction, gain, and the like.

图19为本申请实施例提供的相机处理示意图四,如图19所示,当相机处于第二工作模式时,第二图像处理单元对第二图像信号进行处理,得到第二处理信号,对第三图像信号进行处理,得到第三处理信号,然后经过黑电平调整单元分别得到第二调整信号和第三调整信号,第一图像处理单元还用于对第二调整信号和第三调整信号进行融合处理,得到处理图像。Fig. 19 is a fourth schematic diagram of camera processing provided by the embodiment of the present application. As shown in Fig. 19, when the camera is in the second working mode, the second image processing unit processes the second image signal to obtain the second processed signal, and the second image processing unit processes the second image signal. The three image signals are processed to obtain the third processed signal, and then the second adjusted signal and the third adjusted signal are respectively obtained through the black level adjustment unit, and the first image processing unit is also used to perform processing on the second adjusted signal and the third adjusted signal Fusion processing to obtain a processed image.

本申请实施例提供的相机,包括单个的图像传感器和处理芯片,图像传感器的输出端与处理芯片连接,相机包括两种工作模式,在第一工作模式下,图像传感器根据第一曝光参数生成并向处理芯片输出第一图像信号,处理芯片在接收到所述第一图像信号时,根据第一调整方式对第一图像信号进行黑电平调整,得到第一调整信号;在第二工作模式下,图像传感器根据第二曝光参数生成并向处理芯片输出第二图像信号,根据第三曝光参数生成并向处理芯片输出第三图像信号;处理芯片在接收到第二图像信号时,根据第二调整方式对第二图像信号进行黑电平调整,得到第二调整信号;在接收到第三图像信号时,根据第三调整方式对第三图像信号进行黑电平调整,得到第三调整信号。本申请实施例提供的相机,在不同的条件下可相应调整相机所处的工作模式,当相机处于第一工作模式时,能够根据历史帧第一图像信号的黑电平信息对当前帧第一图像信号进行黑电平调整,当相机处于第二工作模式时,在进行黑电平调整时,首先将第二图像信号和第三图像信号区分开,然后分别针对第二图像信号和第三图像信号根据不同的调整方式来进行黑电平调整处理,其中根据历史帧第二图像信号对当前帧第二图像信号进行黑电平调整,并根据历史帧第三图像信号对当前帧第三图像信号进行黑电平调整,对每一帧图像信号进行处理时,充分利用了前一帧图像信号的黑电平信息,多帧图像信号之间相互关联,从而使得帧与帧之间的图像信号的黑电平调整具备相关性,避免在对多帧图像信号进行黑电平调整时容易出现的图像画面跳跃严重的问题,解决了对多帧图像信号进行黑电平调整时的不稳定性。The camera provided by the embodiment of the present application includes a single image sensor and a processing chip, the output terminal of the image sensor is connected to the processing chip, and the camera includes two working modes. output the first image signal to the processing chip, and when the processing chip receives the first image signal, adjust the black level of the first image signal according to the first adjustment method to obtain the first adjustment signal; in the second working mode , the image sensor generates and outputs the second image signal to the processing chip according to the second exposure parameter, generates and outputs the third image signal to the processing chip according to the third exposure parameter; when the processing chip receives the second image signal, adjusts the signal according to the second adjust the black level of the second image signal to obtain the second adjustment signal; when receiving the third image signal, adjust the black level of the third image signal according to the third adjustment method to obtain the third adjustment signal. The camera provided by the embodiment of the present application can adjust the working mode of the camera accordingly under different conditions. The black level adjustment is performed on the image signal. When the camera is in the second working mode, when the black level adjustment is performed, the second image signal and the third image signal are firstly distinguished, and then the second image signal and the third image signal are respectively adjusted. The black level adjustment process is performed on the signal according to different adjustment methods, wherein the black level adjustment is performed on the second image signal of the current frame according to the second image signal of the historical frame, and the third image signal of the current frame is adjusted according to the third image signal of the historical frame To adjust the black level, when processing each frame of image signal, the black level information of the previous frame image signal is fully utilized, and the multi-frame image signals are related to each other, so that the image signal between frames The black level adjustment has correlation, which avoids the serious image jumping problem that is easy to occur when adjusting the black level of multi-frame image signals, and solves the instability when adjusting the black level of multi-frame image signals.

图20为本申请实施例提供的黑电平调整方法的流程示意图,该方法应用于相机,所述相机包括单个的图像传感器和处理芯片,所述图像传感器的输出端与所述处理芯片连接,如图20所示,所述方法包括:FIG. 20 is a schematic flowchart of a method for adjusting a black level provided by an embodiment of the present application. The method is applied to a camera, and the camera includes a single image sensor and a processing chip, and the output terminal of the image sensor is connected to the processing chip. As shown in Figure 20, the method includes:

S201,通过所述图像传感器在第一工作模式下根据第一曝光参数生成第一图像信号,并通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;S201. Using the image sensor to generate a first image signal according to a first exposure parameter in a first working mode, and using the processing chip to adjust the black level of the first image signal according to a first adjustment method, to obtain a second an adjustment signal;

S202,通过所述图像传感器在第二工作模式下通过多次曝光交替生成第二图像信号和第三图像信号,其中,第二图像信号根据第二曝光参数生成,第三图像信号根据第三曝光参数生成;通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;通过所述处理芯片交替输出所述第二调整信号和所述第三调整信号。S202. Using the image sensor to alternately generate a second image signal and a third image signal through multiple exposures in the second working mode, wherein the second image signal is generated according to the second exposure parameter, and the third image signal is generated according to the third exposure Parameter generation; adjust the black level of the second image signal by the processing chip according to the second adjustment method to obtain a second adjustment signal; adjusting the black level to obtain a third adjustment signal; and alternately outputting the second adjustment signal and the third adjustment signal through the processing chip.

在一种可能的实现方式中,所述相机还包括曝光参数控制单元,所述方法还包括:In a possible implementation manner, the camera further includes an exposure parameter control unit, and the method further includes:

在所述第二工作模式下通过所述曝光参数控制单元向所述图像传感器交替输出所述第二曝光参数和所述第三曝光参数。In the second working mode, the exposure parameter control unit alternately outputs the second exposure parameter and the third exposure parameter to the image sensor.

在一种可能的实现方式中,所述通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号,包括:In a possible implementation manner, the black level adjustment of the first image signal by the processing chip according to the first adjustment method to obtain the first adjustment signal includes:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame.

在一种可能的实现方式中,所述通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,包括:In a possible implementation manner, the black level adjustment of the second image signal by the processing chip according to the second adjustment method to obtain the second adjustment signal includes:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

在一种可能的实现方式中,所述通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号,包括:In a possible implementation manner, the black level adjustment of the third image signal by the processing chip according to a third adjustment method to obtain a third adjustment signal includes:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

通过所述处理芯片在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Process the first adjustment signal by the processing chip in the first working mode to obtain and output a first processed image;

通过所述处理芯片在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。Processing the second adjustment signal by the processing chip in the second working mode to obtain and output a second processed image, and processing the third adjustment signal to obtain and output a third processed image; Alternatively, in the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

图21为本申请实施例提供的黑电平调整装置的结构示意图,如图21所示,包括第一处理模块211和第二处理模块212,其中:FIG. 21 is a schematic structural diagram of a black level adjustment device provided in an embodiment of the present application. As shown in FIG. 21 , it includes a first processing module 211 and a second processing module 212, wherein:

第一处理模块211用于在图像传感器处于第一工作模式下时,接收第一图像信号,并根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The first processing module 211 is configured to receive a first image signal when the image sensor is in the first working mode, and adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal;

第二处理模块212用于在所述图像传感器处于第二工作模式下时,交替接收第二图像信号和第三图像信号,在接收到所述第二图像信号时根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,在接收到所述第三图像信号时根据第三调整方式对所述第三调整信号进行黑电平调整,得到第三调整信号,并交替输出所述第二调整信号和第三调整信号。The second processing module 212 is configured to alternately receive the second image signal and the third image signal when the image sensor is in the second working mode, and adjust the performing black level adjustment on the second image signal to obtain a second adjustment signal, and performing black level adjustment on the third adjustment signal according to a third adjustment method when receiving the third image signal to obtain a third adjustment signal, And alternately output the second adjustment signal and the third adjustment signal.

在一种可能的实现方式中,所述第一处理模块211具体用于:In a possible implementation manner, the first processing module 211 is specifically configured to:

根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame;

根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value;

根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame.

在一种可能的实现方式中,所述第二处理模块212具体用于:In a possible implementation manner, the second processing module 212 is specifically configured to:

根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame;

根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value;

根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame.

在一种可能的实现方式中,所述第二处理模块212具体用于:In a possible implementation manner, the second processing module 212 is specifically configured to:

根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame;

根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value;

根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame.

在一种可能的实现方式中,还包括第三处理模块,所述第三处理模块用于:In a possible implementation manner, a third processing module is also included, and the third processing module is configured to:

在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Processing the first adjustment signal in the first working mode to obtain and output a first processed image;

在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。In the second working mode, the second adjustment signal is processed to obtain and output a second processed image, and the third adjustment signal is processed to obtain and output a third processed image; or, in the In the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image.

本申请实施例提供的装置,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device provided in the embodiment of the present application can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.

最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.

Claims (14)

1.一种相机,其特征在于,包括单个的图像传感器和处理芯片,所述图像传感器的输出端与所述处理芯片连接,其中:1. A camera, characterized in that, comprises a single image sensor and a processing chip, the output end of the image sensor is connected with the processing chip, wherein: 所述图像传感器用于,在第一工作模式下根据第一曝光参数生成并向所述处理芯片输出第一图像信号;The image sensor is used to generate and output a first image signal to the processing chip according to a first exposure parameter in a first working mode; 所述处理芯片用于,在接收到所述第一图像信号时,根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The processing chip is configured to, when receiving the first image signal, adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal; 所述图像传感器还用于,在第二工作模式下通过多次曝光交替生成并向所述处理芯片输出第二图像信号和第三图像信号,其中,所述第二图像信号根据第二曝光参数生成,所述第三图像信号根据第三曝光参数生成;The image sensor is also used to alternately generate and output a second image signal and a third image signal to the processing chip through multiple exposures in the second working mode, wherein the second image signal is based on the second exposure parameter generating, the third image signal is generated according to a third exposure parameter; 所述处理芯片还用于,在接收到所述第二图像信号时,根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;在接收到所述第三图像信号时,根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;交替输出所述第二调整信号和所述第三调整信号。The processing chip is further configured to, when receiving the second image signal, adjust the black level of the second image signal according to a second adjustment method to obtain a second adjustment signal; For an image signal, adjust the black level of the third image signal according to a third adjustment method to obtain a third adjustment signal; alternately output the second adjustment signal and the third adjustment signal. 2.根据权利要求1所述的相机,其特征在于,还包括曝光参数控制单元,其中:2. The camera according to claim 1, further comprising an exposure parameter control unit, wherein: 所述曝光参数控制单元用于,在所述第二工作模式下向所述图像传感器交替输出所述第二曝光参数和所述第三曝光参数。The exposure parameter control unit is configured to alternately output the second exposure parameter and the third exposure parameter to the image sensor in the second working mode. 3.根据权利要求1所述的相机,其特征在于,所述第二曝光参数与所述第三曝光参数中至少一个曝光参数不同,所述至少一个曝光参数为曝光时间、曝光增益、光圈大小中的一种或多种,所述曝光增益包括模拟增益,和/或,数字增益。3. The camera according to claim 1, wherein the second exposure parameter is different from at least one exposure parameter in the third exposure parameter, and the at least one exposure parameter is exposure time, exposure gain, aperture size One or more of them, the exposure gain includes an analog gain, and/or a digital gain. 4.根据权利要求1-3任一项所述的相机,其特征在于,所述第一调整方式具体为:4. The camera according to any one of claims 1-3, wherein the first adjustment method is specifically: 根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame; 根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value; 根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame. 5.根据权利要求1-3任一项所述的相机,其特征在于,所述第二调整方式具体为:5. The camera according to any one of claims 1-3, wherein the second adjustment method is specifically: 根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level information of the second image signal of the historical frame, wherein, The second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame; 根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value; 根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame. 6.根据权利要求1-3任一项所述的相机,其特征在于,所述第三调整方式具体为:6. The camera according to any one of claims 1-3, wherein the third adjustment method is specifically: 根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame; 根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value; 根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame. 7.根据权利要求1所述的相机,其特征在于,所述处理芯片还用于:7. The camera according to claim 1, wherein the processing chip is further used for: 在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Processing the first adjustment signal in the first working mode to obtain and output a first processed image; 在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。In the second working mode, the second adjustment signal is processed to obtain and output a second processed image, and the third adjustment signal is processed to obtain and output a third processed image; or, in the In the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image. 8.一种黑电平调整方法,应用于相机,所述相机包括单个的图像传感器和处理芯片,所述图像传感器的输出端与所述处理芯片连接,其特征在于,所述方法包括:8. A black level adjustment method applied to a camera, the camera comprising a single image sensor and a processing chip, the output end of the image sensor is connected to the processing chip, it is characterized in that the method comprises: 通过所述图像传感器在第一工作模式下根据第一曝光参数生成第一图像信号,并通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The first image signal is generated by the image sensor according to the first exposure parameter in the first working mode, and the black level of the first image signal is adjusted by the processing chip according to the first adjustment method to obtain the first adjustment Signal; 通过所述图像传感器在第二工作模式下通过多次曝光交替生成第二图像信号和第三图像信号,其中,第二图像信号根据第二曝光参数生成,第三图像信号根据第三曝光参数生成;通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号;通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号;通过所述处理芯片交替输出所述第二调整信号和所述第三调整信号。The second image signal and the third image signal are alternately generated by the image sensor through multiple exposures in the second working mode, wherein the second image signal is generated according to the second exposure parameter, and the third image signal is generated according to the third exposure parameter ; adjust the black level of the second image signal by the processing chip according to the second adjustment method to obtain a second adjustment signal; perform black level adjustment on the third image signal by the processing chip according to the third adjustment method level adjustment to obtain a third adjustment signal; and alternately output the second adjustment signal and the third adjustment signal through the processing chip. 9.根据权利要求8所述的方法,其特征在于,所述相机还包括曝光参数控制单元,所述方法还包括:9. The method according to claim 8, wherein the camera further comprises an exposure parameter control unit, and the method further comprises: 在所述第二工作模式下通过所述曝光参数控制单元向所述图像传感器交替输出所述第二曝光参数和所述第三曝光参数。In the second working mode, the exposure parameter control unit alternately outputs the second exposure parameter and the third exposure parameter to the image sensor. 10.根据权利要求8或9所述的方法,其特征在于,所述通过所述处理芯片根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号,包括:10. The method according to claim 8 or 9, wherein the black level adjustment of the first image signal by the processing chip according to the first adjustment method to obtain the first adjustment signal comprises: 根据接收到的当前帧第一图像信号的黑电平统计值,以及接收到的历史帧第一图像信号的黑电平信息,确定所述当前帧第一图像信号的黑电平值,其中,所述历史帧第一图像信号为所述当前帧第一图像信号的上一帧第一图像信号;Determine the black level value of the first image signal of the current frame according to the received black level statistical value of the first image signal of the current frame and the received black level information of the first image signal of the historical frame, wherein, The first image signal of the historical frame is the first image signal of the previous frame of the first image signal of the current frame; 根据所述当前帧第一图像信号的黑电平值和第一目标黑电平值,确定所述当前帧第一图像信号的黑电平偏移量;determining the black level offset of the first image signal of the current frame according to the black level value of the first image signal of the current frame and the first target black level value; 根据所述当前帧第一图像信号的黑电平偏移量,对所述当前帧第一图像信号进行黑电平调整,得到所述当前帧第一图像信号对应的第一调整信号。Adjusting the black level of the first image signal of the current frame according to the black level offset of the first image signal of the current frame to obtain a first adjustment signal corresponding to the first image signal of the current frame. 11.根据权利要求8或9所述的方法,其特征在于,所述通过所述处理芯片根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,包括:11. The method according to claim 8 or 9, wherein the black level adjustment of the second image signal by the processing chip according to the second adjustment method to obtain the second adjustment signal comprises: 根据接收到的当前帧第二图像信号的黑电平统计值,以及接收到的历史帧第二图像信号的黑电平值信息,确定所述当前帧第二图像信号的黑电平值,其中,所述历史帧第二图像信号为所述当前帧第二图像信号的上一帧第二图像信号;Determine the black level value of the second image signal of the current frame according to the received black level statistical value of the second image signal of the current frame and the received black level value information of the second image signal of the historical frame, wherein , the second image signal of the historical frame is the second image signal of the previous frame of the second image signal of the current frame; 根据所述当前帧第二图像信号的黑电平值和第二目标黑电平值,确定所述当前帧第二图像信号的黑电平偏移量;determining the black level offset of the second image signal of the current frame according to the black level value of the second image signal of the current frame and the second target black level value; 根据所述当前帧第二图像信号的黑电平偏移量,对所述当前帧第二图像信号进行黑电平调整,得到所述当前帧第二图像信号对应的第二调整信号。Adjusting the black level of the second image signal of the current frame according to the black level offset of the second image signal of the current frame to obtain a second adjustment signal corresponding to the second image signal of the current frame. 12.根据权利要求8或9所述的方法,其特征在于,所述通过所述处理芯片根据第三调整方式对所述第三图像信号进行黑电平调整,得到第三调整信号,包括:12. The method according to claim 8 or 9, wherein the black level adjustment of the third image signal by the processing chip according to a third adjustment method to obtain a third adjustment signal comprises: 根据接收到的当前帧第三图像信号的黑电平统计值,以及接收到的历史帧第三图像信号的黑电平信息,确定所述当前帧第三图像信号的黑电平值,其中,所述历史帧第三图像信号为所述当前帧第三图像信号的上一帧第三图像信号;Determine the black level value of the third image signal of the current frame according to the received black level statistical value of the third image signal of the current frame and the received black level information of the third image signal of the historical frame, wherein, The third image signal of the historical frame is the third image signal of the previous frame of the third image signal of the current frame; 根据所述当前帧第三图像信号的黑电平值和第三目标黑电平值,确定所述当前帧第三图像信号的黑电平偏移量;determining the black level offset of the third image signal of the current frame according to the black level value of the third image signal of the current frame and the third target black level value; 根据所述当前帧第三图像信号的黑电平偏移量,对所述当前帧第三图像信号进行黑电平调整,得到所述当前帧第三图像信号对应的第三调整信号。Performing black level adjustment on the third image signal of the current frame according to the black level offset of the third image signal of the current frame to obtain a third adjustment signal corresponding to the third image signal of the current frame. 13.根据权利要求8所述的方法,其特征在于,所述方法还包括:13. The method of claim 8, further comprising: 通过所述处理芯片在所述第一工作模式下对所述第一调整信号进行处理,得到并输出第一处理图像;Process the first adjustment signal by the processing chip in the first working mode to obtain and output a first processed image; 通过所述处理芯片在所述第二工作模式下,对所述第二调整信号进行处理,得到并输出第二处理图像,对所述第三调整信号进行处理,得到并输出第三处理图像;或者,在所述第二工作模式下,对所述第二调整信号和所述第三调整信号进行融合处理,得到并输出处理图像。Processing the second adjustment signal by the processing chip in the second working mode to obtain and output a second processed image, and processing the third adjustment signal to obtain and output a third processed image; Alternatively, in the second working mode, fusion processing is performed on the second adjustment signal and the third adjustment signal to obtain and output a processed image. 14.一种黑电平调整装置,其特征在于,包括:14. A black level adjustment device, characterized in that it comprises: 第一处理模块,用于在图像传感器处于第一工作模式下时,接收第一图像信号,并根据第一调整方式对所述第一图像信号进行黑电平调整,得到第一调整信号;The first processing module is configured to receive a first image signal when the image sensor is in the first working mode, and adjust the black level of the first image signal according to a first adjustment method to obtain a first adjustment signal; 第二处理模块,用于在所述图像传感器处于第二工作模式下时,交替接收第二图像信号和第三图像信号,在接收到所述第二图像信号时根据第二调整方式对所述第二图像信号进行黑电平调整,得到第二调整信号,在接收到所述第三图像信号时根据第三调整方式对所述第三调整信号进行黑电平调整,得到第三调整信号,并交替输出所述第二调整信号和第三调整信号。The second processing module is configured to alternately receive the second image signal and the third image signal when the image sensor is in the second working mode, and adjust the performing black level adjustment on the second image signal to obtain a second adjustment signal, and performing black level adjustment on the third adjustment signal according to a third adjustment method when receiving the third image signal to obtain a third adjustment signal, And alternately output the second adjustment signal and the third adjustment signal.
CN201910944822.8A 2019-09-30 2019-09-30 Camera, black level adjusting method and device Active CN110602420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910944822.8A CN110602420B (en) 2019-09-30 2019-09-30 Camera, black level adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910944822.8A CN110602420B (en) 2019-09-30 2019-09-30 Camera, black level adjusting method and device

Publications (2)

Publication Number Publication Date
CN110602420A true CN110602420A (en) 2019-12-20
CN110602420B CN110602420B (en) 2022-02-15

Family

ID=68865433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910944822.8A Active CN110602420B (en) 2019-09-30 2019-09-30 Camera, black level adjusting method and device

Country Status (1)

Country Link
CN (1) CN110602420B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297268A (en) * 2020-01-22 2022-11-04 杭州海康威视数字技术股份有限公司 Imaging system and image processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702863A (en) * 2013-12-05 2015-06-10 株式会社东芝 Signal processing device and imaging system
CN107623827A (en) * 2017-08-15 2018-01-23 上海集成电路研发中心有限公司 A kind of intelligent CMOS image sensor chip and its manufacture method
CN109155052A (en) * 2016-05-18 2019-01-04 德州仪器公司 Image data processing for multiple exposure wide dynamic range image data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702863A (en) * 2013-12-05 2015-06-10 株式会社东芝 Signal processing device and imaging system
CN109155052A (en) * 2016-05-18 2019-01-04 德州仪器公司 Image data processing for multiple exposure wide dynamic range image data
CN107623827A (en) * 2017-08-15 2018-01-23 上海集成电路研发中心有限公司 A kind of intelligent CMOS image sensor chip and its manufacture method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297268A (en) * 2020-01-22 2022-11-04 杭州海康威视数字技术股份有限公司 Imaging system and image processing method
CN115297268B (en) * 2020-01-22 2024-01-05 杭州海康威视数字技术股份有限公司 Imaging system and image processing method

Also Published As

Publication number Publication date
CN110602420B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN213279832U (en) Image Sensors, Cameras and Terminals
US9531958B2 (en) Image processing device, imaging device, image processing method, and program having different exposure start times
TWI524709B (en) Image capture apparatus, method of controlling image capture apparatus, and electronic device
US6924841B2 (en) System and method for capturing color images that extends the dynamic range of an image sensor using first and second groups of pixels
KR101536060B1 (en) Solid-state imaging device and camera module
CN100370811C (en) Digital still camera apparatus, video camera apparatus, and information terminal apparatus
WO2021208593A1 (en) High dynamic range image processing system and method, electronic device, and storage medium
KR20200054320A (en) Imaging control method and imaging device
WO2021196554A1 (en) Image sensor, processing system and method, electronic device, and storage medium
US20040201731A1 (en) Electronic camera
US7508422B2 (en) Image sensing apparatus comprising a logarithmic characteristic area and a linear characteristic area
CN112118378A (en) Image acquisition method and device, terminal and computer-readable storage medium
KR20040057927A (en) Image synthesis method and image pickup apparatus
US7714928B2 (en) Image sensing apparatus and an image sensing method comprising a logarithmic characteristic area and a linear characteristic area
CN108632537A (en) Control method and device, imaging device, computer equipment and readable storage medium storing program for executing
TW201545556A (en) Exposing a group of pixels in generating a digital image
JP7336217B2 (en) Information processing device, imaging device, imaging device, and information processing method
JP3999321B2 (en) Electronic camera
CN109005346B (en) Control method, control device, electronic equipment and computer-readable storage medium
CN107154801A (en) Signal handling equipment and method, picture pick-up device and control device and method
US7643072B2 (en) Signal processing method for image capturing apparatus, and image capturing apparatus including calculating image transfer efficiency
JPH11113018A (en) Image pickup device
JP2004186879A (en) Solid-state imaging unit and digital camera
US20250056128A1 (en) Imaging apparatus, driving method of imaging apparatus, and program
CN110602420B (en) Camera, black level adjusting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant