[go: up one dir, main page]

WO2019119842A1 - Image fusion method and apparatus, electronic device, and computer readable storage medium - Google Patents

Image fusion method and apparatus, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2019119842A1
WO2019119842A1 PCT/CN2018/101859 CN2018101859W WO2019119842A1 WO 2019119842 A1 WO2019119842 A1 WO 2019119842A1 CN 2018101859 W CN2018101859 W CN 2018101859W WO 2019119842 A1 WO2019119842 A1 WO 2019119842A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
exposure
pixel
infrared
value
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.)
Ceased
Application number
PCT/CN2018/101859
Other languages
French (fr)
Chinese (zh)
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
Publication of WO2019119842A1 publication Critical patent/WO2019119842A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

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/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B13/00Optical objectives specially designed for the purposes specified below
    • G02B13/14Optical objectives specially designed for the purposes specified below for use with infrared or ultraviolet radiation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/11Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths for generating image signals from visible and infrared light wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/12Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with one sensor only
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/20Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from infrared radiation only
    • 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
    • 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
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems

Definitions

  • an embodiment of the present application provides an image fusion method, where the method includes:
  • the step of performing de-infrared processing on the remaining images in the image of each frame to obtain a visible light color image includes: performing an IR channel of the target image if the target image includes an IR channel Interpolating, generating the target image after the interpolation process, wherein the target image is the remaining image in each frame image; for each pixel in the target image after the interpolation process, updating is performed as follows Visible light color image: If the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has a G value, the G value of the pixel is updated: The difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated: a difference between the B value of the pixel and the IR parameter value of the pixel; wherein, the pixel The IR parameter value is the product of the IR value of the IR
  • the first preset exposure is the first exposure or the last exposure of the at least two exposures.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store program code, and the processor is configured to execute any of the foregoing when executing the program code stored on the memory. Method steps as described in the image fusion method.
  • FIG. 9 is a schematic structural diagram of an image fusion device according to another embodiment of the present disclosure.
  • each video image in the video can be regarded as a fused image in the present application file, that is, each frame of the video image is obtained by fusion of multi-frame original images obtained by image sensor imaging. Therefore, in the video technology field, the image capturing period may be: a start exposure time of the first frame original image corresponding to the previous frame video image, and a start exposure time of the first frame original image corresponding to the next frame video image. The time passed.
  • the infrared brightness image may be a brightness image that senses the infrared light signal. It should be noted that the infrared brightness image is not limited to a brightness image that only senses the infrared light signal, and may also be an infrared light signal. And brightness images of other band optical signals.
  • Step X Perform demosaic processing on one of the obtained frame images to generate an infrared illuminance image.
  • Step 2 The R channel value, the G channel value, the B channel value, and the IR (Infrared Spectroscopy) value in the target image obtained after the interpolation are averaged to obtain a sensed infrared brightness image after demosaic processing.
  • IR Infrared Spectroscopy
  • step 2 can obtain a sensible infrared brightness image that includes only the brightness signal, and the brightness value of each pixel in the infrared brightness image is: corresponding channel value after interpolation in the target image. average of.
  • the luminance values of each pixel in the image are: the R channel value after interpolation of the pixel, the G channel value after interpolation, the B channel value after interpolation, and the interpolation.
  • De-infrared processing is performed on the remaining images in the obtained frame images to obtain a visible light color image.
  • Step a3 performing color noise reduction processing on K1, K2, and K3 corresponding to all pixels in the visible light color image, for example, using Gaussian filtering processing to obtain K1', K2', K3' after the color noise reduction processing corresponding to each pixel.
  • Step b4 combining the processed UV component with the luminance signal of the infrared illuminating image to form a new YUV signal, and the image corresponding to the new YUV signal may be used as the final fused image;
  • the YUV signal is then converted into a new RGB signal, and the image corresponding to the new RGB signal is used as the final fused image.
  • the pre-processing unit performs wide dynamic synthesis processing on the images a and b to obtain a wide dynamic image, and performs de-infrared processing on the wide dynamic image to obtain a visible light color image.
  • the pre-processing unit also performs demosaic processing on the image c to obtain an infrared illuminance image.
  • the first preset exposure may be the first exposure or the last exposure of the at least two exposures.
  • the first determining module 120 may be specifically configured to: perform demosaic processing on one of the frames of the frames to generate an infrared brightness image.
  • the method is applied to an image fusion device, where each frame image is collected by the image fusion device; and the optical lens of the image fusion device is provided with a filter.
  • the spectral region filtered by the filter includes [T1, T2]; wherein, 600 nm ⁇ T1 ⁇ 800 nm, 750 nm ⁇ T2 ⁇ 1100 nm, and T1 ⁇ T2.
  • the step of performing infrared light filling in the exposure time corresponding to the preset exposure in the image collection period may include: following the following control manners;
  • the infrared fill light is performed in the exposure time corresponding to the preset exposure in the image acquisition period: the start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not late At the end of exposure of the first predetermined exposure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Studio Devices (AREA)
  • Color Television Image Signal Generators (AREA)
  • Image Processing (AREA)

Abstract

Embodiments of the present application provide an image fusion method and apparatus, an electronic device, and a computer readable storage medium. The method comprises: first obtaining each frame of image which is obtained by means of at least two exposures within an image collection period; determining an infrared-sensible brightness image based on one of the collected frames of image; performing infrared removal on an image to be processed in the collected frames of image to obtain a visible color image; and finally fusing the infrared-sensible brightness image and the visible color image to obtain a fused image. In the solution provided by the embodiments of the present application, the frames of image obtained by means of at least two exposures within an image collection period can be collected by an image sensor, and image collection and fusion can be completed as long as an image sensor exists in a device, so as to improve the image quality in the case of low illumination. Therefore, the device in the solution provided by the embodiments of the present application has good adaptability, and is convenient for application.

Description

图像融合方法、装置、电子设备及计算机可读存储介质Image fusion method, device, electronic device and computer readable storage medium

本申请要求于2017年12月20日提交中国专利局、申请号为201711381018.0发明名称为“图像融合方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Image Fusion Method, Apparatus, Electronic Device, and Computer Readable Storage Medium", filed on December 20, 2017, with the application number of 201711381018.0, the entire contents of which are hereby incorporated by reference. The citations are incorporated herein by reference.

技术领域Technical field

本申请涉及图像采集技术领域,特别是涉及图像融合方法、装置、电子设备及计算机可读存储介质。The present application relates to the field of image acquisition technologies, and in particular, to an image fusion method, apparatus, electronic device, and computer readable storage medium.

背景技术Background technique

图像融合技术中的融合可以理解为:将可见光图像与红外图像等非可见光图像进行融合,得到融合后的图像;其中,融合后的图像为双波段图像,相对于属于单波段的可见光图像和非可见光图像中的任一种图像而言,融合后的图像可体现出的图像信息更多。The fusion in the image fusion technology can be understood as: merging the visible light image with the non-visible image such as the infrared image to obtain the fused image; wherein the fused image is a dual-band image, relative to the visible light image and the non-single band In any of the visible light images, the fused image can reflect more image information.

现有技术中,图像融合技术主要指分光融合技术,该技术进行图像融合的基本流程为:通过分光棱镜等分光装置将入射光分为可见光信号和非可见光信号,然后由两个传感器分别基于可见光信号和非可见光信号分别生成可见光图像以及非可见光图像,最后将可见光图像和非可见光图像进行融合,得到融合图像。In the prior art, the image fusion technology mainly refers to a split-light fusion technology. The basic flow of image fusion is as follows: the incident light is divided into a visible light signal and a non-visible light signal by a light splitting device such as a beam splitting prism, and then the two sensors are respectively based on visible light. The signal and the non-visible signal respectively generate a visible light image and a non-visible light image, and finally the visible light image and the non-visible light image are fused to obtain a fused image.

可以理解,上述分光融合技术必须适配在具有两个图像传感器的设备中,如果设备中只有一个图像传感器,则无法完成上述分光融合的过程,故现有技术中分光融合技术的设备适应性差。It can be understood that the above-mentioned spectroscopic fusion technology must be adapted to a device having two image sensors. If there is only one image sensor in the device, the above-mentioned process of splitting and merging cannot be completed. Therefore, the device of the prior art split-light fusion technology has poor adaptability.

发明内容Summary of the invention

本申请实施例的目的在于提供一种图像融合方法、装置、电子设备及计算机可读存储介质,以提高图像融合技术的设备适应性。具体技术方案如下:An object of the embodiments of the present application is to provide an image fusion method, apparatus, electronic device, and computer readable storage medium to improve device adaptability of an image fusion technology. The specific technical solutions are as follows:

为达上述目的,第一方面,本申请实施例提供了一种图像融合方法,所述方法包括:To achieve the above objective, in a first aspect, an embodiment of the present application provides an image fusion method, where the method includes:

获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;基于所 述各帧图像中的其中一帧,确定感红外亮度图像;对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;将所述感红外亮度图像与所述可见光色彩图像融合,获得融合图像。Obtaining each frame image obtained by at least two exposures in one image acquisition period; determining an infrared illuminance image based on one of the frame images; and de-infrareding the image to be processed in each frame image Processing, obtaining a visible light color image; fusing the infrared illuminance image with the visible light color image to obtain a fused image.

可选的,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述方法还包括:在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:基于所述第预设次曝光所得到的图像,确定感红外亮度图像。Optionally, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; the method further includes: performing an exposure time corresponding to a preset exposure within the image collection period Performing infrared fill light; the step of determining an infrared illuminance image based on one of the frames of the frames, comprising: determining an infrared illuminance image based on the image obtained by the first preset exposure.

可选的,所述第预设次曝光所对应的曝光参数不大于目标最大值,其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。Optionally, the exposure parameter corresponding to the preset exposure is not greater than a target maximum, wherein the exposure parameter is an exposure duration and/or a gain, and the target maximum is a preset exposure The maximum value of the exposure parameters corresponding to each of the other exposures.

可选的,所述在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光的步骤,包括:按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。Optionally, the step of performing infrared fill light in the exposure time corresponding to the preset exposure within the image acquisition period comprises: performing a preset time in the image collection period according to the following control manner The infrared fill light is performed during the exposure time corresponding to the exposure: the start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not later than the exposure of the preset preset exposure End time.

可选的,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝光或最后一次曝光。Optionally, when the number of exposures in the image acquisition period is greater than two times, the first preset exposure is the first exposure or the last exposure of the at least two exposures.

可选的,所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Optionally, the step of determining an infrared illuminating image based on one of the frame images comprises: demosaicing one of the frame images to generate a sensible infrared brightness image.

可选的,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。Optionally, the image to be processed is the remaining image in the image of each frame, and the number of remaining images in each frame image is 1, and the image to be processed in the image of each frame is de-infrared. Processing, the step of obtaining a visible light color image, comprising: performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image.

可选的,所述对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像的步骤,包括:在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标 图像为所述各帧图像中的其余图像;针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。Optionally, the step of performing de-infrared processing on the remaining images in the image of each frame to obtain a visible light color image includes: performing an IR channel of the target image if the target image includes an IR channel Interpolating, generating the target image after the interpolation process, wherein the target image is the remaining image in each frame image; for each pixel in the target image after the interpolation process, updating is performed as follows Visible light color image: If the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has a G value, the G value of the pixel is updated: The difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated: a difference between the B value of the pixel and the IR parameter value of the pixel; wherein, the pixel The IR parameter value is the product of the IR value of the pixel and the preset correction value.

可选的,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;对所述宽动态图像进行去红外处理,获得可见光色彩图像。Optionally, the image to be processed is the remaining image in each frame image, the number of remaining images in each frame image is at least 2, and the exposures of the remaining images in the frame images respectively are correspondingly exposed. The durations are different; the step of performing de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image includes: performing wide dynamic synthesis processing on the remaining images in the image of each frame to obtain a wide dynamic An image; de-infrared processing the wide dynamic image to obtain a visible light color image.

可选的,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。Optionally, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; an optical lens of the image fusion device is provided with a filter, and the filter is filtered by the filter. The region includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

第二方面,本申请实施例提供了一种图像融合装置,所述装置包括:获得模块,用于获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;第一确定模块,用于基于所述各帧图像中的其中一帧,确定感红外亮度图像;第二确定模块,用于对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;融合模块,用于将所述感红外亮度图像与所述可见光色彩图像融合,获得融合图像。In a second aspect, an embodiment of the present application provides an image fusion device, where the device includes: an obtaining module, configured to obtain each frame image obtained by at least two exposures in one image acquisition period; The second determining module is configured to perform de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image; and a fusion module, to determine an infrared brightness image based on one of the frame images; And merging the infrared illuminance image with the visible light color image to obtain a fused image.

可选的,所述装置应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述装置还包括:红外补光模块,用于在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;所述第一确定模块,具体用于:基于所述第预设次曝光所得到的图像,确定感红外亮度图像。Optionally, the device is applied to an image fusion device, and the frame images are collected by the image fusion device; the device further includes: an infrared fill light module, configured to be preset in the image collection period The infrared light is added to the exposure time corresponding to the second exposure; the first determining module is specifically configured to: determine the infrared brightness image based on the image obtained by the preset exposure.

可选的,所述第预设次曝光所对应的曝光参数不大于目标最大值,其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。Optionally, the exposure parameter corresponding to the preset exposure is not greater than a target maximum, wherein the exposure parameter is an exposure duration and/or a gain, and the target maximum is a preset exposure The maximum value of the exposure parameters corresponding to each of the other exposures.

可选的,所述红外补光模块,具体用于:按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。Optionally, the infrared fill light module is specifically configured to: perform infrared fill light in an exposure time corresponding to the preset exposure time in the image acquisition period according to the following control manner: the start time of the infrared fill light is not The end time of the infrared fill light is earlier than the exposure end time of the first preset exposure, earlier than the exposure start time of the preset exposure.

可选的,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝光或最后一次曝光。Optionally, when the number of exposures in the image acquisition period is greater than two times, the first preset exposure is the first exposure or the last exposure of the at least two exposures.

可选的,所述第一确定模块,具体用于:对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Optionally, the first determining module is specifically configured to: perform demosaic processing on one of the frames of the frames to generate an infrared brightness image.

可选的,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,所述第二确定模块,具体用于:对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。Optionally, the image to be processed is the remaining image in the image of each frame, and the number of the remaining images in the frame image is 1. The second determining module is specifically configured to: The remaining images in the image are subjected to de-infrared processing to obtain a visible light color image.

可选的,所述第二确定模块,包括:插值子模块,用于在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;更新子模块,用于针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。Optionally, the second determining module includes: an interpolation submodule, configured to interpolate an IR channel of the target image, where the target image includes an IR channel, to generate the target image after the interpolation process The target image is the remaining image in the image of each frame; the update sub-module is configured to update each pixel in the target image after the interpolation process as follows to obtain a visible light color image: The pixel has an R value, and the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has a G value, the G value of the pixel is updated: the G value of the pixel The difference from the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated: the difference between the B value of the pixel and the IR parameter value of the pixel; wherein the IR parameter value of the pixel is The product of the IR value of the pixel and the preset correction value.

可选的,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;所述第二确定模块,包括:第一处理子模块,用于将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;第二处理子模块,用于对所述宽动态图像进行去红外处理,获得可见光色彩图像。Optionally, the image to be processed is the remaining image in each frame image, the number of remaining images in each frame image is at least 2, and the exposures of the remaining images in the frame images respectively are correspondingly exposed. The second determining module includes: a first processing submodule, configured to perform wide dynamic synthesis processing on the remaining images in the frame images to obtain a wide dynamic image; and a second processing submodule, configured to: The wide dynamic image is subjected to de-infrared processing to obtain a visible light color image.

可选的,所述装置应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm, T1<T2。Optionally, the device is applied to an image fusion device, where each frame image is collected by the image fusion device; an optical lens of the image fusion device is provided with a filter, and the filter is filtered by the filter. The region includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,其中,存储器,用于存放程序代码;处理器,用于执行存储器上所存放的程序代码时,实现上述任一图像融合方法所述的方法步骤。In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory is used to store program code, and the processor is configured to execute any of the foregoing when executing the program code stored on the memory. Method steps as described in the image fusion method.

第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一图像融合方法所述的方法步骤。In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program is executed by a processor to implement any of the image fusion methods described above. Method steps.

第五方面,本申请实施例提供了一种计算机程序,所述计算机程序用于在运行时执行上述任一图像融合方法所述的方法步骤。In a fifth aspect, an embodiment of the present application provides a computer program, where the computer program is configured to perform the method steps described in any of the image fusion methods described above at runtime.

由上可知,本申请实施例提供的方案中,首先获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;再基于所采集的各帧图像中的其中一帧,确定感红外亮度图像;并基于所采集的各帧图像中的其余图像,确定可见光色彩图像;最后将所确定的感红外亮度图像与可见光色彩图像融合,获得融合图像。与现有技术相比,本申请实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以由一个图像传感器所采集,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,故本申请实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本申请实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。It can be seen that, in the solution provided by the embodiment of the present application, each frame image obtained by at least two exposures in one image acquisition period is first obtained; and then one of the frames of each frame image is collected to determine the infrared brightness. And determining a visible light color image based on the remaining images in the acquired frame images; finally, the determined infrared brightness image is merged with the visible light color image to obtain a fused image. Compared with the prior art, in the solution provided by the embodiment of the present application, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so that only one image sensor exists in the device. The image collection and fusion can be completed to improve the image quality in the case of low illumination. Therefore, the device provided by the embodiment of the present application has good adaptability and is convenient to apply; from another perspective, for image acquisition and integration. For the device to which the solution provided by the embodiment of the present application is applied, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

附图说明DRAWINGS

为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.

图1为本申请一实施例提供的一种图像融合方法的流程示意图。FIG. 1 is a schematic flowchart diagram of an image fusion method according to an embodiment of the present application.

图2为本申请实施例涉及的RGBIR图像传感器的格式示意图。FIG. 2 is a schematic diagram of a format of an RGBIR image sensor according to an embodiment of the present application.

图3为本申请另一实施例提供的图像融合方法的流程示意图。FIG. 3 is a schematic flowchart diagram of an image fusion method according to another embodiment of the present application.

图4为本申请实施例涉及的光谱响应示意图。FIG. 4 is a schematic diagram of spectral response according to an embodiment of the present application.

图5为本申请实施例涉及的一种体现曝光与红外补光关系的示意图。FIG. 5 is a schematic diagram showing the relationship between exposure and infrared fill light according to an embodiment of the present application.

图6为本申请实施例涉及的另一种体现曝光与红外补光关系的示意图。FIG. 6 is a schematic diagram showing another relationship between exposure and infrared fill light according to an embodiment of the present application.

图7为本申请实施例涉及的图像融合设备的一种结构示意图。FIG. 7 is a schematic structural diagram of an image fusion device according to an embodiment of the present application.

图8为本申请一实施例提供的一种图像融合装置的结构示意图。FIG. 8 is a schematic structural diagram of an image fusion device according to an embodiment of the present application.

图9为本申请另一实施例提供的一种图像融合装置的结构示意图。FIG. 9 is a schematic structural diagram of an image fusion device according to another embodiment of the present disclosure.

图10为本申请实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.

下面首先对本申请文件涉及的技术术语进行简单介绍。The technical terms involved in this application are briefly introduced below.

图像采集周期,在本申请文件中,是指连续多次曝光得到的各帧图像所对应的时间段,该图像采集周期的时间通常不会太长,例如,一个图像采集周期为40ms(毫秒);以一个图像传感器为例,图像传感器可以利用每一次曝光得到的入射光信号生成图像,多次曝光后则可以得到多帧图像,若以此多帧图像获得一帧融合图像,则该多帧图像分别对应的曝光时间总和可以为上述图像采集周期。The image acquisition period, in this document, refers to the time period corresponding to each frame image obtained by successive multiple exposures. The time of the image acquisition period is usually not too long. For example, an image acquisition period is 40 ms (milliseconds). Taking an image sensor as an example, the image sensor can generate an image by using the incident light signal obtained by each exposure, and after multiple exposures, a multi-frame image can be obtained. If a multi-frame image is used to obtain a frame of the fused image, the multi-frame is obtained. The sum of the exposure times corresponding to the images may be the image acquisition period described above.

另外,对于视频的拍摄过程,视频中的每帧视频图像均可以看做是本申请文件中的融合图像,即每一帧视频图像都是基于图像传感器成像获得的多帧原始图像融合获得的,所以对于视频技术领域而言,上述图像采集周期可以为:上一帧视频图像所对应第一帧原始图像的开始曝光时刻,至下一帧视频图像所对应第一帧原始图像的开始曝光时刻所经过的时间。In addition, for the video shooting process, each video image in the video can be regarded as a fused image in the present application file, that is, each frame of the video image is obtained by fusion of multi-frame original images obtained by image sensor imaging. Therefore, in the video technology field, the image capturing period may be: a start exposure time of the first frame original image corresponding to the previous frame video image, and a start exposure time of the first frame original image corresponding to the next frame video image. The time passed.

可见光,是人眼可以感知的电磁波,可见光谱没有精确的范围,一般人的眼睛可以感知的电磁波的波长在400~760nm(纳米)之间。红外光为一种波长介于760nm~1mm(毫米)电磁波,其不为人眼所见。Visible light is an electromagnetic wave that can be perceived by the human eye. The visible spectrum has no precise range. The wavelength of electromagnetic waves that the human eye can perceive is between 400 and 760 nm (nanometer). Infrared light is an electromagnetic wave having a wavelength between 760 nm and 1 mm (mm), which is not visible to the human eye.

可见光色彩图像,可以是指仅感知了可见光信号的色彩图像,该色彩图像仅对可见光波段感光。A visible light color image may refer to a color image in which only a visible light signal is perceived, and the color image is only sensitive to a visible light band.

感红外亮度图像,可以是指感知了红外光信号的亮度图像,需要注意的是,感红外亮度图像并不限于其为仅感知了红外光信号的亮度图像,其还可以是感知了红外光信号以及其他波段光信号的亮度图像。The infrared brightness image may be a brightness image that senses the infrared light signal. It should be noted that the infrared brightness image is not limited to a brightness image that only senses the infrared light signal, and may also be an infrared light signal. And brightness images of other band optical signals.

为了解决上述背景技术所提及的问题,本申请实施例提供了一种图像融合方法、装置、电子设备及计算机可读存储介质,以提高图像融合技术的设备适应性。In order to solve the problems mentioned in the above background, the embodiments of the present application provide an image fusion method, apparatus, electronic device, and computer readable storage medium to improve device adaptability of an image fusion technology.

下面首先对本申请实施例提供的一种图像融合方法进行详细介绍。An image fusion method provided by the embodiment of the present application is described in detail below.

本申请实施例提供的一种图像融合方法可以应用于一图像融合设备,该图像融合设备可以为具有图像采集功能的设备,例如摄像机;另外,该图像融合设备还可以是不具备图像采集功能,但与图像采集设备相通信的设备,其可以接收图像采集设备所采集并发送的图像,这都是合理的,本申请实施例并不限定该图像融合设备的具体形式。The image fusion method provided by the embodiment of the present application may be applied to an image fusion device, and the image fusion device may be a device having an image collection function, such as a camera. In addition, the image fusion device may not have an image collection function. However, the device that is in communication with the image capturing device can receive the image that is collected and sent by the image capturing device, which is reasonable. The embodiment of the present application does not limit the specific form of the image fusion device.

本申请实施例提供的一种图像融合方法,如图1所示,上述方法包括:An image fusion method provided by the embodiment of the present application is as shown in FIG. 1 , and the foregoing method includes:

S101:获得在一个图像采集周期内通过至少两次曝光得到的各帧图像。S101: Obtain each frame image obtained by at least two exposures in one image acquisition period.

关于步骤S101中各帧图像的获得形式,如前所述,一种情况下,该图像融合设备可以为具有图像采集功能的设备,则步骤S101可以为:在一个图像采集周期内,通过至少两次曝光采集得到各帧图像,即步骤S101所得到的各帧图像为图像融合设备自身所采集的。其中,一次曝光得到一帧图像。例如,图像融合设备为一摄像机,该摄像机在一个图像采集周期内进行了3次曝光,则摄像机采集了3帧图像。With regard to the obtaining form of each frame image in step S101, as described above, in one case, the image fusion device may be a device having an image capturing function, and step S101 may be: at least two in an image capturing period. Each frame image is obtained by the sub-exposure acquisition, that is, each frame image obtained in step S101 is acquired by the image fusion device itself. Among them, one exposure gives one frame of image. For example, the image fusion device is a camera that performs 3 exposures in one image acquisition cycle, and the camera captures 3 frames of images.

需要说明的是,本申请实施例中图像融合设备在一个图像采集周期内所 采集的各帧图像可以不是由图像融合设备中的一个图像传感器所成像获得的,例如,具有双摄像头的摄像机。It should be noted that, in the embodiment of the present application, each frame image acquired by the image fusion device in one image acquisition period may not be obtained by imaging by one image sensor in the image fusion device, for example, a camera with dual cameras.

另外,另一种情况下,步骤S101也可以为:接收其他设备在一个图像采集周期内通过至少两次曝光采集得到的各帧图像。In addition, in another case, step S101 may also be: receiving images of each frame acquired by other devices through at least two exposures in one image acquisition period.

如前所述的另一种情况,该图像融合设备为不具备图像采集功能、但与其他图像采集设备相通信的设备,则步骤S101可以为:接收图像采集设备发送的在一个图像采集周期内通过至少两次曝光采集得到的各帧图像。例如,监控前端摄像机在一个图像采集周期内采集了3帧图像,并将该3帧图像发送给监控后端的图像融合设备,即监控后端的图像融合设备获得上述3帧图像。In another case, as described above, the image fusion device is a device that does not have an image acquisition function but communicates with other image acquisition devices, and step S101 may be: receiving the image collection device and transmitting within an image collection period. The resulting frame images are acquired by at least two exposures. For example, the monitoring front-end camera acquires three frames of images in one image acquisition period, and transmits the three-frame images to the image fusion device of the monitoring back end, that is, the image fusion device that monitors the back end obtains the above three frames of images.

上述所得到的各帧图像中的图像数量是与上述一个图像采集周期内的曝光次数相同的,每一次曝光都仅可以得到一帧曝光图像。一个图像采集周期对应的曝光次数可以是预设的,例如预设曝光次数为2次,则上述步骤S101可以具体为获得在一个图像采集周期内通过两次曝光得到的两帧图像。The number of images in each frame image obtained above is the same as the number of exposures in the above-described one image acquisition period, and only one frame of exposure image can be obtained for each exposure. The number of exposures corresponding to an image acquisition period may be preset. For example, the preset number of exposures is two, and the above step S101 may specifically obtain two frames of images obtained by two exposures in one image acquisition period.

需要说明的是,本申请实施例中,上述所得到的各帧图像是由图像传感器所成像获得的,该图像传感器可以是普通常见的图像传感器,但是为了保证上述所得到的各帧图像中包含有尽可能多的红外成分,上述图像传感器可以为RGBIR图像传感器,如美商半导体公司Ominivision所生产的型号为OV4682的RGBIR图像传感器。It should be noted that, in the embodiment of the present application, each of the obtained frame images is obtained by imaging by an image sensor, and the image sensor may be a common image sensor, but in order to ensure that each frame image obtained above is included. With as many infrared components as possible, the image sensor described above can be an RGBIR image sensor, such as the OVIR2 image sensor of the OV4682 produced by Ominivision.

示例性的,假设图像融合设备自身设置有一个图像采集部件,以采集上述所得到的各帧图像,则该图像采集部件中所采用的图像传感器为RGBIR图像传感器。Exemplarily, it is assumed that the image fusion device itself is provided with an image acquisition component for acquiring the obtained frame images, and the image sensor used in the image acquisition component is an RGBIR image sensor.

S102:基于所得到的各帧图像中的其中一帧,确定感红外亮度图像。S102: Determine an infrared brightness image based on one of the obtained frames of each frame image.

由于每次曝光得到的图像就是可以感知红外光信号的亮度图像,因此,作为本申请实施例的一种可选实现方式,可以在所得到的各帧图像中随机选择一帧图像,确定为感红外亮度图像,例如,一个图像采集周期内采集3帧图像,图像融合设备随机选择第二帧图像,并将该第二帧图像确定为感红外亮度图像;作为本申请实施例的另一种可选实现方式,还可以预设将某一帧图像确定为感红外亮度图像,例如,一个图像采集周期内采集3帧图像,预设将 所采集的最后一帧图像确定为感红外亮度图像。Since the image obtained by each exposure is a brightness image that can be perceived as an infrared light signal, as an alternative implementation of the embodiment of the present application, one frame of the image can be randomly selected in each frame image obtained, and the image is determined to be a sense. Infrared brightness image, for example, three frames of images are collected in one image acquisition period, and the image fusion device randomly selects the second frame image, and determines the second frame image as an infrared brightness image; as another embodiment of the present application, Alternatively, the image of a certain frame may be determined to be an infrared brightness image. For example, three frames of images are acquired in one image acquisition period, and the last frame image collected is determined to be an infrared brightness image.

由于图像传感器所采集的图像质量通常较差,因此,上述得到的各帧图像的质量较差;所以,为了提高感红外亮度图像的图像质量,作为本申请实施例的再一种可选实现方式,可以对所得到的各帧图像中的其中一帧进行图像处理,生成感红外亮度图像,当然,对该帧图像进行图像处理所采用的具体处理方法本申请实施例并不限定,只要是可以提高图像质量的图像处理方法都是合理的。Because the image quality of the image sensor is generally poor, the quality of each frame image obtained above is poor. Therefore, in order to improve the image quality of the infrared brightness image, another alternative implementation manner of the embodiment of the present application is provided. The image processing may be performed on one of the obtained frame images to generate an infrared illuminance image. Of course, the specific processing method used for image processing of the frame image is not limited, as long as it is Image processing methods that improve image quality are all reasonable.

作为本申请实施例的一种可选方式,为了得到清晰且具有真实图像细节的感红外亮度图像,上述的图像处理方式可以是去马赛克处理,即可以对上述所得到的各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。即,上述基于所得到的各帧图像中的其中一帧,确定感红外亮度图像(S102)的步骤,可以包括:As an alternative manner of the embodiment of the present application, in order to obtain a sensible infrared brightness image with clear and real image details, the image processing mode may be a demosaic process, that is, among the obtained frame images. One frame is subjected to demosaic processing to generate an infrared illuminance image. That is, the step of determining the infrared brightness image based on one of the obtained frames of the frame (S102) may include:

步骤X:对所得到的各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Step X: Perform demosaic processing on one of the obtained frame images to generate an infrared illuminance image.

本领域技术人员可以理解的是,在图像传感器直接成像得到的图像中,各通道信号交错分布,以RGBIR图像传感器为例,如图2所示,R(red,红色)、G(green,绿色)、B(blue,蓝色)以及IR(Infrared Spectroscopy,红外)通道信号交错分布,直接放大观看图像传感器成像得到的图像时,会发现图像中具有马赛克现象,清晰度不佳,因此需要进行去马赛克处理,生成真实细节的图像。It can be understood by those skilled in the art that in the image directly imaged by the image sensor, the signals of each channel are staggered, and the RGBIR image sensor is taken as an example, as shown in FIG. 2, R (red, red), G (green, green). ), B (blue, blue) and IR (Infrared Spectroscopy (infrared) channel signals are staggered, and when you directly zoom in and view the image obtained by the image sensor, you will find mosaic in the image, and the resolution is not good, so you need to go Mosaic processing to generate images with real details.

为了便于说明,将此处所得到的各帧图像中的其中一帧称为目标图像,则上述对目标图像进行去马赛克处理,生成感红外亮度图像包括步骤1和步骤2:For convenience of description, one of the frames of the image obtained here is referred to as a target image, and then the above-described demosaic processing of the target image to generate the infrared brightness image includes steps 1 and 2:

步骤1:对目标图像的R、G、B以及IR通道分别进行插值,获得目标图像中每个像素分别对应的R值(R通道值)、G值(G通道值)、B值(B通道值)以及IR值(IR通道值)。Step 1: Interpolate the R, G, B, and IR channels of the target image respectively to obtain the R value (R channel value), G value (G channel value), and B value (B channel) corresponding to each pixel in the target image. Value) and IR value (IR channel value).

具体的,步骤1中进行插值所采用的插值方法可以为双线性插值算法、双三次插值算法等,本申请实施例并不对此所采用的插值算法进行限定。Specifically, the interpolation method used in the interpolation in step 1 may be a bilinear interpolation algorithm, a bicubic interpolation algorithm, etc., and the interpolation algorithm used in this embodiment is not limited in this embodiment.

步骤2:对插值后得到的目标图像中的R通道值、G通道值、B通道值以及IR(Infrared Spectroscopy,红外)通道值求取平均值,得到去马赛克处理后的感红外亮度图像。Step 2: The R channel value, the G channel value, the B channel value, and the IR (Infrared Spectroscopy) value in the target image obtained after the interpolation are averaged to obtain a sensed infrared brightness image after demosaic processing.

即步骤2可以得到一个与输入分辨率相同的、仅包括亮度信号的感红外亮度图像,该感红外亮度图像中,每个像素的亮度值为:目标图像中对应的进行插值后的各通道值的平均值。以RGBIR图像传感器所对应的图像为例,图像中每个像素的亮度值为:像素的进行插值后的R通道值、进行插值后的G通道值、进行插值后的B通道值以及进行插值后的IR通道值的平均值;例如,感红外亮度图像中像素坐标为(x,y)的亮度值等于目标图像中像素坐标为(x,y)的进行插值后的R通道值、进行插值后的G通道值、进行插值后的B通道值以及进行插值后的IR通道值的平均值。That is, step 2 can obtain a sensible infrared brightness image that includes only the brightness signal, and the brightness value of each pixel in the infrared brightness image is: corresponding channel value after interpolation in the target image. average of. Taking the image corresponding to the RGBIR image sensor as an example, the luminance values of each pixel in the image are: the R channel value after interpolation of the pixel, the G channel value after interpolation, the B channel value after interpolation, and the interpolation. The average value of the IR channel value; for example, the luminance value of the pixel coordinate (x, y) in the infrared illuminance image is equal to the interpolated R channel value of the pixel coordinate (x, y) in the target image, and the interpolation is performed. The G channel value, the interpolated B channel value, and the average of the interpolated IR channel values.

当然,上述步骤1和步骤2仅是对步骤X的示例性说明,并不构成对本申请实施例的具体限定,本领域技术人员可以基于其他具体技术手段完成步骤X。Of course, the above steps 1 and 2 are only exemplary descriptions of the step X, and do not constitute a specific limitation on the embodiments of the present application. Those skilled in the art may complete the step X based on other specific technical means.

S103:对各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像。S103: De-infrared processing the image to be processed in each frame image to obtain a visible light color image.

步骤S103中所确定的可见光色彩图像为不包含红外成分的图像,所以需要对各帧图像中的待处理图像进行去红外处理,以得到具有真实色彩还原度的可见光色彩图像。The visible light color image determined in step S103 is an image that does not include an infrared component, so it is necessary to perform de-infrared processing on the image to be processed in each frame image to obtain a visible light color image having a true color reproduction degree.

在一种实现方式中,待处理图像可以为各帧图像中的其余图像,首先需要说明的是,此处所说的其余图像为上述所得到的各帧图像中去除步骤S102中用以确定感红外亮度图像的一帧图像后所剩余的图像。例如,上述所得到的各帧图像包括图像a~c,其中,图像a被用于确定感红外亮度图像,则图像b和c即为其余图像;再如,上述所得到的各帧图像包括图像d和e,其中,图像d被用于确定感红外亮度图像,则图像e即为其余图像。In an implementation manner, the image to be processed may be the rest of the images in each frame image. First, it should be noted that the remaining images mentioned herein are used in the above-mentioned frame images to be removed in step S102. The image remaining after one frame of the luminance image. For example, the image of each frame obtained above includes images a to c, wherein the image a is used to determine the infrared brightness image, and the images b and c are the remaining images; for example, the image of each frame obtained includes the image. d and e, where the image d is used to determine the infrared brightness image, then the image e is the remaining image.

可以理解,上述涉及的其余图像的数量可以为1个,也可以为至少两个,故本申请实施例中,一种情况下,当上述各帧图像中的其余图像的数量为1时,上述对各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像(S103)的步骤,可以包括:It can be understood that the number of the remaining images involved in the foregoing may be one or at least two. Therefore, in the embodiment of the present application, in one case, when the number of remaining images in the image of each frame is 1, the above De-infrared processing the image to be processed in each frame image to obtain a visible light color image (S103), which may include:

对所得到的各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。De-infrared processing is performed on the remaining images in the obtained frame images to obtain a visible light color image.

对上述所得到的各帧图像中的其余图像进行去红外处理后,图像中的红外成分被去除,即可得到可见光色彩图像。当然,对图像进行去红外处理的方式可以参照现有技术,本申请实施例可以不限定该去红外处理的具体实现方式。After de-infrared processing is performed on the remaining images in the frame images obtained as described above, the infrared components in the image are removed, and a visible light color image is obtained. Certainly, the manner of de-infrared processing the image may refer to the prior art. The specific implementation manner of the de-infrared processing may not be limited in the embodiment of the present application.

作为此情况下的一种可选实现方式,如图3所示,在图1所示方法实施例的基础上,上述对所得到的各帧图像中的其余图像进行去红外处理,获得可见光色彩图像的步骤,可以包括:As an alternative implementation in this case, as shown in FIG. 3, based on the method embodiment shown in FIG. 1, the above-mentioned images in the obtained frame images are de-infrared processed to obtain visible light colors. The steps of the image may include:

S1031:在目标图像包含有IR通道的情况下,对目标图像的IR通道进行插值,生成插值处理后的目标图像,其中,目标图像为各帧图像中的其余图像。S1031: If the target image includes an IR channel, the IR channel of the target image is interpolated to generate an interpolated target image, wherein the target image is the remaining image in each frame image.

例如,用以成像获得目标图像的图像传感器为RGBIR图像传感器,则目标图像包含有IR通道;可以理解,对目标图像的IR通道进行插值后,插值处理后的目标图像中每个像素都对应有IR值。同理的是,步骤S1031中进行插值所采用的插值方法可以为双线性插值算法、双三次插值算法等,本申请实施例并不对此所采用的插值算法进行限定。For example, the image sensor used for imaging to obtain the target image is an RGBIR image sensor, and the target image includes an IR channel; it can be understood that after interpolating the IR channel of the target image, each pixel in the target image after the interpolation process corresponds to IR value. For the same reason, the interpolation method used in the interpolation in step S1031 may be a bilinear interpolation algorithm, a bicubic interpolation algorithm, etc., and the interpolation algorithm adopted in this embodiment is not limited in this embodiment.

S1032:针对插值处理后目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。S1032: For each pixel in the target image after the interpolation process, updating is performed as follows to obtain a visible light color image: if the pixel has an R value, the R value of the pixel is updated: the R value of the pixel and the IR of the pixel. The difference between the parameter values; if the pixel has a G value, the G value of the pixel is updated: the difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated. The difference between the B value of the pixel and the IR parameter value of the pixel; wherein the IR parameter value of the pixel is the product of the IR value of the pixel and the preset correction value.

上述预设修正值可以为0至1024中的任一整数或小数,预设修正值的具体数值可以根据实际情况进行设定,本申请实施例并不限定该预设修正值的取值大小。通常情况下,该预设修正值可以设置为1,则步骤S1032可以具体为:针对插值处理后目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G 值与该像素的IR值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR值的差值。当然,本领域技术人员可以理解的是,预设修正值的取值并不局限于此。The preset correction value may be any integer or decimal of 0 to 1024. The specific value of the preset correction value may be set according to an actual situation. The embodiment of the present application does not limit the value of the preset correction value. In general, the preset correction value may be set to 1, the step S1032 may be specifically: for each pixel in the target image after the interpolation processing, updating according to the following manner to obtain a visible light color image: if the pixel has an R value Update the R value of the pixel: the difference between the R value of the pixel and the IR value of the pixel; if the pixel has a G value, update the G value of the pixel: the G value of the pixel and the IR value of the pixel The difference value; if the pixel has a B value, the B value of the pixel is updated: the difference between the B value of the pixel and the IR value of the pixel. Of course, those skilled in the art can understand that the value of the preset correction value is not limited thereto.

具体的,步骤S1031执行后,目标图像的每个像素上都对应有一个IR值,但图像融合设备还没有对目标图像的R通道、G通道和B通道分别进行插值,所以目标图像中的像素可能对应仅有IR值,或者除具有IR值外,还具有R值、G值或B值。Specifically, after the step S1031 is executed, each pixel of the target image corresponds to an IR value, but the image fusion device does not separately interpolate the R channel, the G channel, and the B channel of the target image, so the pixels in the target image are It may correspond to only the IR value, or in addition to the IR value, it also has an R value, a G value or a B value.

示例性的,假设上述预设修正值为1,此时像素的IR参数值即为像素的IR值,则步骤S1032可以理解为:Exemplarily, if the preset correction value is 1, and the IR parameter value of the pixel is the IR value of the pixel, step S1032 can be understood as:

针对插值处理后目标图像中的每一像素,按照如下方式进行更新:For each pixel in the target image after interpolation, update as follows:

如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR值的差值;当然,如果该像素仅存在IR值,则对该像素不做任何更新处理。If the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR value of the pixel; if the pixel has a G value, the G value of the pixel is updated: the G value of the pixel The difference from the IR value of the pixel; if the pixel has a B value, the B value of the pixel is updated: the difference between the B value of the pixel and the IR value of the pixel; of course, if the pixel only has an IR value, Then no update processing is performed on the pixel.

此时,可以得到一个仅具有RGB三通道的色彩图像,可以将该色彩图像作为可见光色彩图像。At this time, a color image having only three channels of RGB can be obtained, which can be used as a visible light color image.

需要说明的是,在对所得到的各帧图像中的其余图像进行去红外处理后,去红外处理后的图像中,并不是每一个像素上都具有R值、G值以及B值,所以为了提高图像质量,还可以在去红外处理后,针对上述各帧图像中的其余图像的R通道、G通道和B通道分别进行插值,进而得到可见光色彩图像。It should be noted that after de-infrared processing is performed on the remaining images in the obtained frame images, not every pixel has an R value, a G value, and a B value, so To improve the image quality, after the de-infrared processing, the R channel, the G channel, and the B channel of the remaining images in the above-mentioned frames are separately interpolated to obtain a visible light color image.

同理的是,针对上述各帧图像中的其余图像的R通道、G通道和B通道分别进行插值所采用的插值方法可以为双线性插值算法、双三次插值算法等,本申请实施例并不对此所采用的插值算法进行限定。For the same reason, the interpolation method used for the interpolation of the R channel, the G channel, and the B channel of the remaining images in the foregoing frame images may be a bilinear interpolation algorithm, a bicubic interpolation algorithm, etc. The interpolation algorithm used is not limited.

另外,除了上述图3所示实现方式外,对此处所述的其余图像进行去红外处理还可以采用现有技术中所提供的其他实现方式,本申请实施例在此不做限定。In addition, the implementation of the de-infrared processing of the remaining images described herein may be performed by other implementations provided in the prior art, which is not limited herein.

另一种情况下,当上述各帧图像中的其余图像的数量至少为2时,上述所得到的各帧图像中的其余图像所分别对应的曝光时长均不同。In another case, when the number of remaining images in each of the frame images is at least 2, the exposure time lengths of the remaining images in the obtained frame images are different.

可以理解,为了能够进行宽动态合成处理,得到宽动态图像,上述其余图像所分别对应的曝光时长均不同,具体的,可以在图像融合设备中设置控制单元,以控制所得到的各帧图像对应的曝光时长。例如,上述其余图像的数量为2,则可以预先设置图像融合设备所采集的3帧图像中,除第一帧图像用以确定感红外亮度图像外,第二帧图像的曝光时长为32ms,第三帧图像对应的曝光时长为2ms。It can be understood that, in order to enable wide dynamic synthesis processing, a wide dynamic image is obtained, and the exposure time lengths of the remaining images are different. Specifically, a control unit may be disposed in the image fusion device to control the corresponding image of each frame. The length of exposure. For example, if the number of the remaining images is 2, the 3 frames of images collected by the image fusion device may be preset, and the exposure time of the second frame image is 32 ms, except for the first frame image to determine the infrared brightness image. The exposure time corresponding to the three-frame image is 2 ms.

在此情况下,上述对各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像(S103)的步骤,可以包括下述步骤a和步骤b:In this case, the step of performing de-infrared processing on the image to be processed in each frame image to obtain a visible light color image (S103) may include the following steps a and b:

步骤a:将上述所得到的各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像。Step a: performing wide dynamic synthesis processing on the remaining images in the frame images obtained above to obtain a wide dynamic image.

宽动态(High Dynamic Range,HDR)图像,亦称为宽动态范围图像,其相比与低动态范围图像,不存在局部过曝的现象,可以体现更多的图像细节,所以本申请实施例中为了能够获得体现有更多图像细节的可见光色彩图像,可以对上述多帧其余图像进行宽动态合成处理,得到宽动态图像。当然,对多帧图像进行宽动态合成处理的具体实现方式属于现有技术,本申请实施例在此不做详细介绍。A high dynamic range (HDR) image, which is also called a wide dynamic range image, which has no partial overexposure phenomenon compared to a low dynamic range image, and can reflect more image details, so in the embodiment of the present application, In order to obtain a visible light color image with more image details, the wide dynamic synthesis processing can be performed on the remaining images of the plurality of frames to obtain a wide dynamic image. Of course, the specific implementation of the wide dynamic synthesis processing on the multi-frame image belongs to the prior art, and the embodiments of the present application are not described in detail herein.

步骤b:对该宽动态图像进行去红外处理,获得可见光色彩图像。Step b: De-infrared processing the wide dynamic image to obtain a visible light color image.

同理,此处对该宽动态图像进行去红外处理的具体实现方式,可以参照前述图3所示方法实施例中对一帧其余图像进行去红外处理的具体实现方式,本申请实施例在此不做赘述。For the specific implementation of the de-infrared processing of the wide dynamic image, reference may be made to the specific implementation of the de-infrared processing of the remaining images of one frame in the method embodiment shown in FIG. 3, where the embodiment of the present application is Do not repeat them.

在另一种实现方式中,待处理图像可以为各帧图像中的全部图像,例如,上述所得到的各帧图像包括图像a~c,其中,图像a用于确定感红外亮度图像,图像a~c为待处理图像。In another implementation manner, the image to be processed may be all the images in each frame image. For example, each of the obtained frame images includes images a to c, wherein the image a is used to determine the infrared brightness image, and the image a ~c is the image to be processed.

由于各帧图像是通过至少两次曝光得到的,且一次曝光得到一帧图像,因此,上述涉及的待处理图像的数量至少为两个,上述待处理图像所分别对应的曝光时长均不同。故本申请实施例中,对各帧图像中的待处理图像进行 去红外处理,得到可见光色彩图像(S103)的具体实现方式可以参照步骤S103中的步骤a和步骤b,区别仅为将各帧图像中的其余图像替换为各帧图像中的全部图像,在此不再赘述。Since each frame image is obtained by at least two exposures, and one frame of image is obtained by one exposure, the number of images to be processed mentioned above is at least two, and the exposure time lengths corresponding to the images to be processed are different. Therefore, in the embodiment of the present application, the specific implementation manner of performing the de-infrared processing on the image to be processed in each frame image to obtain the visible light color image (S103) may refer to step a and step b in step S103, and the difference is only for each frame. The remaining images in the image are replaced with all the images in each frame image, and are not described here.

S104:将感红外亮度图像与可见光色彩图像融合,获得融合图像。S104: Fusion the infrared brightness image with the visible color image to obtain a fused image.

本申请实施例中,将感红外亮度图像与可见光色彩图像进行融合所采用的实现方式可以是多种多样的,作为本申请实施例的一种实现方式,上述将感红外亮度图像与可见光色彩图像融合,获得融合图像的步骤,可以包括下述步骤a1~a4:In the embodiment of the present application, the implementation of the infrared brightness image and the visible light color image may be various. As an implementation manner of the embodiment of the present application, the infrared brightness image and the visible color image are sensed. The step of obtaining the fused image may include the following steps a1 to a4:

步骤a1:通过以下公式计算可见光色彩图像中每个像素的亮度信号:Step a1: Calculate the luminance signal of each pixel in the visible light color image by the following formula:

Y=(R+G+B)/3;Y=(R+G+B)/3;

式中,Y表示可见光色彩图像中的像素的亮度信号值,R表示Y对应的像素的R通道值,G表示Y对应的像素的G通道值,B表示Y对应的像素的B通道值。Where Y represents the luminance signal value of the pixel in the visible light color image, R represents the R channel value of the pixel corresponding to Y, G represents the G channel value of the pixel corresponding to Y, and B represents the B channel value of the pixel corresponding to Y.

步骤a2:针对可见光色彩图像中每个像素,计算该像素的R通道值、G通道值、B通道值分别与该像素对应的亮度信号值Y的比例,即K1=R/Y,K2=G/Y,K3=B/Y。Step a2: calculating, for each pixel in the visible light color image, a ratio of an R channel value, a G channel value, and a B channel value of the pixel to a luminance signal value Y corresponding to the pixel, that is, K1=R/Y, K2=G /Y, K3=B/Y.

步骤a3:对可见光色彩图像中所有像素对应的K1、K2、K3进行色彩降噪处理,例如采用高斯滤波处理,得到每个像素对应的色彩降噪处理后的K1’、K2’、K3’。Step a3: performing color noise reduction processing on K1, K2, and K3 corresponding to all pixels in the visible light color image, for example, using Gaussian filtering processing to obtain K1', K2', K3' after the color noise reduction processing corresponding to each pixel.

步骤a4:采用以下公式,将感红外亮度图像中每个像素的亮度信号值Y’与可见光色彩图像中对应像素的K1’、K2’、K3’进行融合处理,得到融合图像:Step a4: merging the luminance signal value Y' of each pixel in the infrared illuminance image with the K1', K2', K3' of the corresponding pixel in the visible light color image by using the following formula to obtain a fused image:

R’=K1’*Y’;R'=K1'*Y';

G’=K2’*Y’;G'=K2’*Y’;

B’=K3’*Y’;B’=K3’*Y’;

式中,R’、G’以及B’分别表示融合图像中的像素的R通道值、G通道值、B通道值;K1’、K2’以及K3’分别表示色彩降噪处理后,可见光色彩图像中对 应像素的K1、K2、K3;Y’表示感红外亮度图像中对应像素的亮度信号值。Where R', G', and B' represent the R channel value, G channel value, and B channel value of the pixel in the fused image, respectively; K1', K2', and K3' respectively represent the visible light color image after color noise reduction processing K1, K2, K3 of the corresponding pixel; Y' represents the luminance signal value of the corresponding pixel in the infrared brightness image.

作为本申请实施例的另一种实现方式,上述将感红外亮度图像与可见光色彩图像融合,获得融合图像的步骤,可以包括下述步骤b1~b4:As another implementation manner of the embodiment of the present application, the step of fusing the infrared brightness image and the visible color image to obtain a fused image may include the following steps b1 b b4:

步骤b1:将可见光色彩图像中的RGB色彩信号转换为YUV(一种颜色编码标准)信号。Step b1: Converting the RGB color signal in the visible light color image into a YUV (a color coding standard) signal.

当然,RGB色彩信号转换为YUV信号的具体实现方式属于现有技术,本申请实施例在此不做详细介绍。Certainly, the specific implementation manner of converting the RGB color signal into the YUV signal belongs to the prior art, and the embodiments of the present application are not described in detail herein.

步骤b2:提取该Y UV信号中的UV分量,即色彩分量。Step b2: Extract the UV component, that is, the color component, in the Y UV signal.

步骤b3:对所提取的UV分量进行去除色彩噪声处理,例如进行高斯滤波降噪,得到处理后的UV分量。Step b3: Perform color noise removal processing on the extracted UV component, for example, Gaussian filtering noise reduction to obtain a processed UV component.

步骤b4:将处理后的UV分量与感红外亮度图像的亮度信号组合,形成新的YUV信号,此时可以将该新的YUV信号对应的图像作为最终的融合图像;也可以将该将新的YUV信号再转化为新的RGB信号,将该新的RGB信号对应的图像作为最终的融合图像。Step b4: combining the processed UV component with the luminance signal of the infrared illuminating image to form a new YUV signal, and the image corresponding to the new YUV signal may be used as the final fused image; The YUV signal is then converted into a new RGB signal, and the image corresponding to the new RGB signal is used as the final fused image.

另外,与此实现方式类似的,还可以将可见光色彩图像中的RGB色彩信号转换为HSV(一种颜色编码标准)信号进行图像融合,本申请实施例在此不做限定。In addition, similar to this implementation, the RGB color signal in the visible light color image may be converted into an HSV (a color coding standard) signal for image fusion, which is not limited herein.

另外需要说明的是,为了保证去除红外成分后颜色的准确还原,从而提高图像融合质量,在上述方法应用于图像融合设备,且上述所得到的各帧图像由该图像融合设备采集的情况下;图像融合设备的光学镜头上可以设置有滤光片,该滤光片滤除的光谱区域可以包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。In addition, in order to ensure the accurate restoration of the color after removing the infrared component, thereby improving the image fusion quality, when the above method is applied to the image fusion device, and the obtained frame images are collected by the image fusion device; The optical lens of the image fusion device may be provided with a filter, and the spectral region filtered by the filter may include [T1, T2]; wherein 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

参照图4,可以理解,R、G、B以及IR通道在近红外波段(650nm~1100nm)上响应差别较大,为了避免上述各通道在某些光谱区域响应差别大导致红外成分去除效果差的问题,图像融合设备的光学镜头上设置有滤光片,以滤除上述响应差别大的光谱区域。Referring to FIG. 4, it can be understood that the R, G, B, and IR channels have different responses in the near-infrared band (650 nm to 1100 nm), and the infrared component removal effect is poor in order to avoid the difference in response of each channel in some spectral regions. The problem is that the optical lens of the image fusion device is provided with a filter to filter out the spectral regions with large differences in response.

具体的,上述图像融合设备中可以设置有图像采集单元,图像采集单元 包含光学镜头、设置在该光学镜头上的滤光片以及图像传感器。该滤光片可以通过镀膜技术集成在上述光学镜头上;另外,该滤光片可以是带阻滤光片,也可以是成本更低的双峰滤光片,需要说明的是,该滤光片是双峰滤光片时,滤光片滤除的光谱区域还可以包括[T3,+∞)的光谱区域,850nm≤T3≤1100nm,T2<T3。Specifically, the image fusion device may be provided with an image acquisition unit, and the image acquisition unit includes an optical lens, a filter disposed on the optical lens, and an image sensor. The filter can be integrated on the optical lens by a coating technology; in addition, the filter can be a band stop filter or a lower cost bimodal filter. It should be noted that the filter When the sheet is a bimodal filter, the spectral region filtered by the filter may further include a spectral region of [T3, +∞), 850 nm ≤ T3 ≤ 1100 nm, and T2 < T3.

与现有技术相比,本实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以是由一个图像传感器进行采集的,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,本实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。Compared with the prior art, in the solution provided by the embodiment, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so that only one image sensor exists in the device. The image collection and fusion can be completed to improve the image quality in the case of low illumination. The device provided by the embodiment has good adaptability and is convenient to apply; from another perspective, for image acquisition and integration, For the device to which the solution provided in this embodiment is applied, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

为了得到信噪比高、质量更高的融合图像,作为本申请实施例的一种可选实现方式,在上述方法应用于图像融合设备,且上述所得到的各帧图像由该图像融合设备采集的情况下,在上述任一方法实施例的基础上,上述方法还可以包括:In order to obtain a fused image with a high signal-to-noise ratio and a higher quality, as an alternative implementation manner of the embodiment of the present application, the foregoing method is applied to an image fusion device, and the obtained frame images are collected by the image fusion device. In the case of any of the foregoing method embodiments, the method may further include:

在上述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光。The infrared fill light is performed during the exposure time corresponding to the preset exposure within the image acquisition period.

图像融合设备在一次曝光的过程中,利用光学镜头捕捉的入射光信号生成图像,如果未进行红外补光,则光学镜头所捕捉的入射光信号仅包括环境入射光信号,而在进行了红外补光的情况下,则光学镜头所捕捉的入射光信号包括环境入射光信号以及红外补光信号。In the process of one exposure, the image fusion device generates an image by using the incident light signal captured by the optical lens. If the infrared light is not applied, the incident light signal captured by the optical lens includes only the ambient incident light signal, and the infrared compensation is performed. In the case of light, the incident light signal captured by the optical lens includes an ambient incident light signal and an infrared fill light signal.

图像融合设备在第预设次曝光时间内进行红外补光,具体的,可以在图像融合设备中设置控制单元,以控制红外补光灯以及图像采集单元,使得红外补光灯的补光时间段处于图像采集单元中预设的某次曝光时间内。The image fusion device performs infrared fill light in the preset exposure time. Specifically, the control unit may be set in the image fusion device to control the infrared fill light and the image acquisition unit, so that the fill time of the infrared fill light is completed. It is within a certain exposure time preset in the image acquisition unit.

需要说明的是,图像融合设备在第预设次曝光时间内进行红外补光,可以增加前述感红外亮度图像的质量,但是如果图像采集周期内除该第预设次曝光外的其他曝光时间内进行了红外补光,则增加了获得到上述可见光色彩 图像的难度。It should be noted that the image fusion device performs infrared fill light during the preset exposure time, which can increase the quality of the aforementioned infrared brightness image, but if the image capture period is other than the preset exposure time Infrared fill light increases the difficulty of obtaining the above visible color image.

故,为在提高感红外亮度图像的质量的同时,不增加获得可见光色彩图像的难度,作为本申请实施例的一种可选实现方式,上述在图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光的步骤,可以包括:Therefore, in order to improve the quality of the infrared brightness image, the difficulty of obtaining the visible light color image is not increased. As an optional implementation manner of the embodiment of the present application, the preset exposure corresponding to the image acquisition period corresponds to The step of performing infrared fill light during the exposure time may include:

按照如下控制方式,在图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于该第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于该第预设次曝光的曝光结束时刻。According to the following control mode, the infrared fill light is performed during the exposure time corresponding to the preset exposure in the image acquisition period: the start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the infrared fill light is The end time is not later than the exposure end time of the first preset exposure.

示例性的,图像融合设备内设置有控制单元,控制单元在图像采集周期内的第预设次曝光的开始时刻控制启动红外补光,并在第预设次曝光的结束时刻控制关闭红外补光,红外补光与该第预设次曝光完全同步,即该第预设次曝光开始时红外补光开始,第预设次曝光结束时红外补光结束。Exemplarily, the image fusion device is provided with a control unit, and the control unit controls to activate the infrared fill light at the start time of the preset exposure in the image acquisition period, and controls to turn off the infrared fill light at the end time of the preset exposure. The infrared fill light is completely synchronized with the preset preset exposure, that is, the infrared fill light starts when the first preset exposure starts, and the infrared fill light ends when the preset preset exposure ends.

本申请实施例中,红外补光的补光强度可以根据实际情况设定,本申请实施例并不限定红外补光的补光强度。另外,上述进行了红外补光的一次曝光所对应的曝光时长可以根据实际的补光参数所确定,本申请实施例同样并不限定上述进行了红外补光的一次曝光所对应的曝光时长。In the embodiment of the present application, the fill light intensity of the infrared fill light can be set according to actual conditions, and the embodiment of the present application does not limit the fill light intensity of the infrared fill light. In addition, the exposure duration corresponding to the one-time exposure of the infrared fill light can be determined according to the actual fill light parameter, and the embodiment of the present application also does not limit the exposure time length corresponding to the one-time exposure of the infrared fill light.

另外,红外补光所使用红外光的波段可以不限定,但为了图像传感器可以得到最大的响应,本申请实施例可以使用波长为850nm~900nm波段的红外光进行红外补光。In addition, the wavelength band of the infrared light used for the infrared fill light may not be limited, but for the image sensor to obtain the maximum response, the embodiment of the present application may perform infrared fill light using infrared light having a wavelength band of 850 nm to 900 nm.

在此情况下,上述基于所得到的各帧图像中的其中一帧,确定感红外亮度图像(S102)的步骤,可以包括:In this case, the step of determining the infrared brightness image based on one of the obtained frames of the frame (S102) may include:

基于上述第预设次曝光所得到的图像,确定感红外亮度图像。Based on the image obtained by the above-mentioned preset exposure, the infrared brightness image is determined.

可以理解,在本申请实施例中,用以确定感红外亮度图像的图像是在存在红外补光的条件下曝光获得的,而上述各帧图像中的其余图像则是在不存在红外补光的条件下曝光获得的。It can be understood that, in the embodiment of the present application, the image used to determine the infrared brightness image is obtained by exposure in the presence of infrared fill light, and the remaining images in the above frame images are in the absence of infrared fill light. Obtained under conditions of exposure.

引申到视频的拍摄过程,如前所述,视频中的每一帧图像即为本申请实施例中的融合图像,由于视频中的视频帧是连续采集的,所以上述红外补光的补光方式为一种频闪补光,并且,频闪补光的周期与每帧图像的采集周期 是相同的。The video capture process is as follows. As described above, each frame of the video is the fused image in the embodiment of the present application. Since the video frame in the video is continuously collected, the infrared fill light is added. It is a stroboscopic fill light, and the period of stroboscopic fill light is the same as the acquisition period of each frame of image.

可以理解,上述第预设次曝光的曝光过程中进行的红外补光会增强该第预设次曝光所得到图像的亮度,所以为了保证该第预设次曝光所得到图像的亮度保持在合适的亮度的范围内,在本申请实施例中,第预设次曝光所对应的曝光参数可以不大于目标最大值,其中,该曝光参数为曝光时长和/或增益,目标最大值为除第预设次曝光外其余各次曝光所对应曝光参数中的最大值。It can be understood that the infrared fill light performed during the exposure process of the first preset exposure enhances the brightness of the image obtained by the preset exposure, so that the brightness of the image obtained by the preset exposure is maintained at an appropriate level. In the range of the brightness, in the embodiment of the present application, the exposure parameter corresponding to the preset exposure may be no greater than the target maximum, wherein the exposure parameter is the exposure duration and/or the gain, and the target maximum is the preset. The maximum value of the exposure parameters corresponding to the other exposures other than the secondary exposure.

以该曝光参数为曝光时长为例,假设一个图像采集周期内进行了三次曝光,预设图像采集周期内的第三次曝光所得到的图像用于生成感红外亮度图像,图像采集周期内的三次曝光的曝光时长分别为:x毫秒、y毫秒和z毫秒,假设第x>y,则必然存在x≥z;例如,图像采集周期内的三次曝光的曝光时长分别为:25毫秒、5毫秒以及10毫秒。Taking the exposure parameter as the exposure duration as an example, assuming that three exposures are performed within one image acquisition period, the image obtained by the third exposure in the preset image acquisition period is used to generate an infrared luminance image, three times in the image acquisition period. The exposure durations of the exposure are: x milliseconds, y milliseconds, and z milliseconds. Assuming x>y, there must be x≥z; for example, the exposure durations of the three exposures in the image acquisition period are: 25 milliseconds, 5 milliseconds, and 10 milliseconds.

再假设一个图像采集周期内进行了两次曝光,预设图像采集周期内的第一次曝光所得到的图像用于生成感红外亮度图像,图像采集周期内的两次曝光的曝光时长分别为:m毫秒和n毫秒,则必然存在n≥m;例如,图像采集周期内的两次曝光的曝光时长分别为:10毫秒以及30毫秒。Assuming that two exposures are performed during an image acquisition period, the image obtained by the first exposure in the preset image acquisition period is used to generate an infrared brightness image, and the exposure durations of the two exposures in the image acquisition period are: For m milliseconds and n milliseconds, n ≥ m must exist; for example, the exposure durations of the two exposures in the image acquisition period are: 10 milliseconds and 30 milliseconds, respectively.

另外,在上述图像采集周期内的曝光次数大于两次时,上述第预设次曝光可以为上述至少两次曝光中的第一次曝光或最后一次曝光。In addition, when the number of exposures in the image capturing period is greater than two times, the first preset exposure may be the first exposure or the last exposure of the at least two exposures.

可以理解,上述图像采集周期内的曝光次数大于两次时,可以获得至少3帧图像,在这至少3帧图像中,其中一帧用以生成感红外亮度图像,其余帧图像用于生成可见光色彩图像,所以此处的其余帧图像需要为图像传感器连续采集的图像,为达到此需求,则上述第预设次曝光可以为上述至少两次曝光中的第一次曝光或最后一次曝光。It can be understood that when the number of exposures in the image capturing period is greater than two times, at least three frames of images can be obtained. Among the at least three frames, one frame is used to generate an infrared brightness image, and the remaining frame images are used to generate visible light colors. The image, so the remaining frame images here need to be images continuously acquired by the image sensor. To achieve this requirement, the first preset exposure may be the first exposure or the last exposure of the at least two exposures.

例如,可以首先利用上述其余帧图像生成宽动态范围图像,然后用所生成的宽动态范围图像生成可见光色彩图像。由于生成宽动态范围图像需要连续采集的多帧图像,所以此处的其余帧图像需要为图像传感器连续采集的图像。For example, a wide dynamic range image may be first generated using the remaining frame images described above, and then a visible light color image may be generated using the generated wide dynamic range image. Since the generation of a wide dynamic range image requires a multi-frame image that is continuously acquired, the remaining frame images here need to be images that are continuously acquired by the image sensor.

针对本实施例,示例性的,如图5所示,一个图像采集周期内包含两次曝光,即图5中的双快门曝光,图5中的一次奇次曝光和相邻的一次偶次曝光对 应为一个图像采集周期,并且偶次曝光对应获得的图像用以确定感红外亮度图像,从图中的红外灯亮度变化曲线可以看到:红外补光的上升沿可以比偶次曝光开始时刻晚,但不能早;同理,下降沿可以比偶次曝光结束时刻早,但不能晚;即红外补光不应提早或迟滞于该偶次曝光。可以理解,在视频帧的连续采集过程中,红外灯仅对偶次曝光时进行红外补光,形成一种频闪补光的效果。For the present embodiment, as an example, as shown in FIG. 5, one image acquisition period includes two exposures, that is, double shutter exposure in FIG. 5, one odd exposure in FIG. 5, and an adjacent even exposure. Corresponding to an image acquisition period, and the corresponding image obtained by the even exposure is used to determine the infrared brightness image. From the brightness curve of the infrared light in the figure, it can be seen that the rising edge of the infrared fill light can be later than the start time of the even exposure. But not early; for the same reason, the falling edge can be earlier than the end of the even exposure, but not late; that is, infrared fill light should not be early or delayed in the even exposure. It can be understood that in the continuous acquisition process of the video frame, the infrared lamp only performs infrared filling light for the even exposure, and forms a stroboscopic fill light effect.

再如图6所示,一个图像采集周期内包含3次曝光,即图6中的A曝光、以及相邻B曝光和及C曝光,并且C曝光对应获得的图像用以确定感红外亮度图像,从图中的红外灯亮度变化曲线可以看到:红外补光的上升沿可以比C曝光开始时刻晚,但不能早;同理,下降沿可以比C曝光结束时刻早,但不能晚;即红外补光不应提早或迟滞于该C曝光。可以理解,在视频帧的连续采集过程中,红外灯仅对第C次曝光时进行红外补光,形成一种频闪补光的效果,其中,在图6中第C次分别为第3次、第6次。As shown in FIG. 6, an image acquisition period includes three exposures, that is, A exposure in FIG. 6, and adjacent B exposure and C exposure, and C exposure corresponds to the obtained image to determine an infrared brightness image. From the brightness curve of the infrared light in the figure, it can be seen that the rising edge of the infrared fill light can be later than the start time of the C exposure, but not earlier; similarly, the falling edge can be earlier than the end of the C exposure, but not later; that is, infrared Fill light should not be early or delayed in the C exposure. It can be understood that in the continuous acquisition process of the video frame, the infrared lamp only performs infrared filling light for the Cth exposure to form a stroboscopic fill light effect, wherein the third time in FIG. 6 is the third time. The sixth time.

可以理解,本实施例中,用以确定感红外亮度图像的图像是在存在红外补光的条件下曝光获得的,感红外亮度图像得到了红外补光的加强,具有较好的信噪比,使得感红外亮度图像与可见光色彩图像融合后,能够得到质量较理想的融合图像。It can be understood that, in this embodiment, the image for determining the infrared brightness image is obtained by exposure in the presence of infrared fill light, and the infrared brightness image is enhanced by infrared fill light, and has a better signal to noise ratio. By merging the infrared brightness image with the visible color image, a fused image with better quality can be obtained.

下面通过一个具体实例来对本申请实施例进行简单介绍。The following briefly describes an embodiment of the present application by a specific example.

为了更加清楚的展示图像融合设备获得融合图像的过程,本实例中将图像采集设备划分为多个单元,由各个单元共同完成图像融合过程;当然,本实例中对于图像融合设备的划分方式并不构成对本申请的限定,仅是示例性的说明。In order to more clearly demonstrate the process of obtaining a fused image by the image fusion device, in this example, the image collection device is divided into a plurality of units, and the image fusion process is completed by each unit; of course, the image fusion device is not divided in this example. The limitations of the application are to be construed as merely illustrative.

如图7所示,图像融合设备可以包括红外补光单元(如补光灯)、控制单元、图像采集单元、预处理单元以及融合处理单元,其中,该预处理单元以及融合处理单元可以看做是一个图像合成单元。As shown in FIG. 7, the image fusion device may include an infrared fill light unit (such as a fill light), a control unit, an image acquisition unit, a preprocessing unit, and a fusion processing unit, wherein the preprocessing unit and the fusion processing unit may be regarded as Is an image synthesis unit.

需要说明的是,控制单元可以向图像采集单元发送曝光控制信号,以控制图像采集单元在一个图像采集周期内采集多帧图像,并可以通过曝光控制 信号控制每次曝光的曝光时长;另外控制单元可以向红外补光单元发送补光控制信号,以使得红外补光单元保证在预设的一次曝光时间内进行红外补光。It should be noted that the control unit may send an exposure control signal to the image acquisition unit to control the image acquisition unit to acquire multiple frames of images in one image acquisition period, and may control the exposure duration of each exposure through the exposure control signal; The fill light control signal may be sent to the infrared fill light unit, so that the infrared fill light unit ensures that the infrared fill light is performed within a preset one exposure time.

具体的,图像融合设备获得融合图像的过程如下:Specifically, the process of obtaining a fused image by the image fusion device is as follows:

图像采集单元中的RGBIR图像传感器在一个图像采集周期内,通过连续三次曝光获得图像a、b和c,并且,在第三次曝光获得图像c的过程中,红外补光单元进行红外补光,使得图像c为基于环境入射光和红外补光所成像获得的。The RGBIR image sensor in the image acquisition unit obtains images a, b, and c by three consecutive exposures in one image acquisition period, and in the process of obtaining image c in the third exposure, the infrared fill light unit performs infrared fill light. The image c is made imaged based on ambient incident light and infrared fill light.

然后,预处理单元对图像a和b进行宽动态合成处理,得到宽动态图像,并对该宽动态图像进行去红外处理,得到可见光色彩图像。同时,预处理单元还对图像c进行去马赛克处理,得到感红外亮度图像。Then, the pre-processing unit performs wide dynamic synthesis processing on the images a and b to obtain a wide dynamic image, and performs de-infrared processing on the wide dynamic image to obtain a visible light color image. At the same time, the pre-processing unit also performs demosaic processing on the image c to obtain an infrared illuminance image.

最后,融合处理单元从预处理单元中获得可见光色彩图像以及感红外亮度图像,并将可见光色彩图像以及感红外亮度图像进行融合,得到融合图像。Finally, the fusion processing unit obtains the visible light color image and the infrared illuminance image from the preprocessing unit, and fuses the visible light color image and the sensible infrared brightness image to obtain a fused image.

相应于图1所示方法实施例,本申请实施例还提供了一种图像融合装置,如图8所示,所述装置包括:Corresponding to the method embodiment shown in FIG. 1 , the embodiment of the present application further provides an image fusion device. As shown in FIG. 8 , the device includes:

获得模块110,用于获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;第一确定模块120,用于基于所述各帧图像中的其中一帧,确定感红外亮度图像;第二确定模块130,用于对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;融合模块140,用于将所述感红外亮度图像与所述可见光色彩图像融合,获得融合图像。The obtaining module 110 is configured to obtain each frame image obtained by at least two exposures in one image acquisition period; and the first determining module 120 is configured to determine the infrared brightness image based on one of the frame images; The second determining module 130 is configured to perform de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image, and the fusion module 140 is configured to fuse the infrared brightness image with the visible color image. Get a fused image.

作为本申请实施例的可选实现方式,所述装置应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述装置还可以包括:As an optional implementation of the embodiment of the present application, the device is applied to an image fusion device, and the image of each frame is collected by the image fusion device; the device may further include:

红外补光模块,用于在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;所述第一确定模块120,可以具体用于:基于所述第预设次曝光所得到的图像,确定感红外亮度图像。The infrared fill light module is configured to perform infrared fill light in an exposure time corresponding to the preset exposure time in the image acquisition period; the first determining module 120 may be specifically configured to: based on the preset time The resulting image is exposed to determine an infrared brightness image.

具体的,所述第预设次曝光所对应的曝光参数可以不大于目标最大值,其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。Specifically, the exposure parameter corresponding to the preset exposure may be not greater than a target maximum, wherein the exposure parameter is an exposure duration and/or a gain, and the target maximum is in addition to the preset exposure The maximum value of the exposure parameters corresponding to each of the other exposures.

作为本申请实施例的一种可选实现方式,所述红外补光模块,可以具体用于:按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。As an optional implementation manner of the embodiment of the present application, the infrared fill light module may be specifically configured to: perform infrared in an exposure time corresponding to a preset exposure in the image collection period according to the following control manner; Fill light: The start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not later than the exposure end time of the first preset exposure.

具体的,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光可以为所述至少两次曝光中的第一次曝光或最后一次曝光。Specifically, when the number of exposures in the image acquisition period is greater than two times, the first preset exposure may be the first exposure or the last exposure of the at least two exposures.

具体的,所述第一确定模块120,可以具体用于:对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Specifically, the first determining module 120 may be specifically configured to: perform demosaic processing on one of the frames of the frames to generate an infrared brightness image.

作为本申请实施例的一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,在所述各帧图像中的其余图像的数量为1时,所述第二确定模块130,可以具体用于:对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。As an optional implementation manner of the embodiment of the present application, the to-be-processed image is the remaining image in the frame image, and when the number of the remaining images in the frame image is 1, the second determination The module 130 may be specifically configured to perform de-infrared processing on the remaining images in the frame images to obtain a visible light color image.

在此实现方式下,相应于图3所示方法实施例,具体的,如图9所示,所述第二确定模块130,可以包括:插值子模块1301,用于在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;更新子模块1302,用于针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。In this implementation, corresponding to the method embodiment shown in FIG. 3, specifically, as shown in FIG. 9, the second determining module 130 may include: an interpolation sub-module 1301, configured to include an IR channel in the target image. In the case of the target image, the target image is interpolated, and the target image is the remaining image in the frame image; the update sub-module 1302 is configured to After the interpolation process, each pixel in the target image is updated as follows to obtain a visible light color image: if the pixel has an R value, the R value of the pixel is updated: the R value of the pixel and the IR parameter of the pixel. The difference between the values; if the pixel has a G value, the G value of the pixel is updated: the difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated. The difference between the B value of the pixel and the IR parameter value of the pixel; wherein the IR parameter value of the pixel is the product of the IR value of the pixel and the preset correction value.

作为本申请实施例的另一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,在所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同时;所述第二确定模块130,可以包括:第一处理子模块,用于将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;第二处理子模块,用于对所述宽动态图像进行去红外处理,获得可见光色彩图像。As another optional implementation manner of the embodiment of the present application, the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is at least 2, and each of the The second determining module 130 may include: a first processing sub-module, configured to perform wide dynamic synthesis processing on the remaining images in the frame images of the frame images. Obtaining a wide dynamic image; and a second processing sub-module for performing de-infrared processing on the wide dynamic image to obtain a visible light color image.

具体的,所述装置可以应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述图像融合设备的光学镜头上可以设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。Specifically, the device may be applied to an image fusion device, where each frame image is collected by the image fusion device; an optical lens of the image fusion device may be provided with a filter, and the filter is filtered. The spectral region includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

由以上可知,与现有技术相比,本实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以是由一个图像传感器进行采集的,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,本实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。It can be seen from the above that, compared with the prior art, in the solution provided by the embodiment, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so as long as it is in the device. There is an image sensor, which can complete the image collection and fusion to improve the image quality under low illumination conditions. The device provided by this embodiment has good adaptability and is easy to apply; from another perspective, for image acquisition and For a device integrated with the solution provided by the embodiment, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

相应于图1或3所示方法实施例,本申请实施例还提供了一种电子设备,如图10所示,该电子设备包括存储器210和处理器220。Corresponding to the method embodiment shown in FIG. 1 or FIG. 3, the embodiment of the present application further provides an electronic device. As shown in FIG. 10, the electronic device includes a memory 210 and a processor 220.

其中,存储器210,用于存放程序代码;处理器220,用于执行存储器210上所存放的程序代码时,实现如下步骤:获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;基于所得到的各帧图像中的其中一帧,确定感红外亮度图像;对所得到的各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;将感红外亮度图像与可见光色彩图像融合,获得融合图像。The memory 210 is configured to store program code. When the processor 220 is configured to execute the program code stored on the memory 210, the following steps are performed: obtaining each frame image obtained by at least two exposures in one image acquisition period; Determining an infrared brightness image based on one of the obtained frames of each frame image; performing de-infrared processing on the image to be processed in each obtained frame image to obtain a visible light color image; and sensing the infrared brightness image and the visible light color image Fusion to obtain fused images.

作为本申请实施例的一种可选实现方式,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;处理器220还用于执行如下步骤:在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:基于所述第预设次曝光所得到的图像,确定感红外亮度图像。As an optional implementation manner of the embodiment of the present application, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; the processor 220 is further configured to perform the following steps: Performing infrared fill light corresponding to the exposure time corresponding to the preset exposure in the period; and determining, according to one of the frames of the frames, the step of determining the infrared brightness image, comprising: based on the preset exposure The resulting image determines the infrared brightness image.

作为本申请实施例的一种可选实现方式,所述第预设次曝光所对应的曝光参数不大于目标最大值,其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。As an optional implementation manner of the embodiment of the present application, the exposure parameter corresponding to the preset exposure is not greater than a target maximum, wherein the exposure parameter is an exposure duration and/or a gain, and the target maximum The maximum value of the exposure parameters corresponding to each of the other exposures except the preset exposure.

作为本申请实施例的一种可选实现方式,所述在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光的步骤,可以包括:按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。As an optional implementation manner of the embodiment of the present application, the step of performing infrared light filling in the exposure time corresponding to the preset exposure in the image collection period may include: following the following control manners; The infrared fill light is performed in the exposure time corresponding to the preset exposure in the image acquisition period: the start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not late At the end of exposure of the first predetermined exposure.

作为本申请实施例的一种可选实现方式,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝光或最后一次曝光。As an optional implementation manner of the embodiment of the present application, when the number of exposures in the image collection period is greater than two times, the first preset exposure is the first exposure or the last of the at least two exposures. One exposure.

作为本申请实施例的一种可选实现方式,所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,可以包括:对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。As an optional implementation manner of the embodiment of the present application, the step of determining an infrared illuminance image based on one of the frame images may include: performing one of the frame images De-mosaic processing to generate an infrared brightness image.

作为本申请实施例的一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。As an optional implementation manner of the embodiment of the present application, the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is 1, and the frames are The step of performing de-infrared processing on the image to be processed in the image to obtain a visible light color image includes: performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image.

作为本申请实施例的一种可选实现方式,所述对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像的步骤,可以包括:在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。As an optional implementation manner of the embodiment of the present application, the step of performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image may include: if the target image includes an IR channel Interpolating an IR channel of the target image to generate the target image after the interpolation process, wherein the target image is the remaining image in each frame image; and each of the target images after the interpolation process One pixel is updated as follows to obtain a visible light color image: if the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has G Value, update the G value of the pixel: the difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, update the B value of the pixel: the B value of the pixel and the pixel The difference of the IR parameter values; wherein the IR parameter value of the pixel is the product of the IR value of the pixel and the preset correction value.

作为本申请实施例的一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,可以包括:将所述 各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;对所述宽动态图像进行去红外处理,获得可见光色彩图像。As an optional implementation manner of the embodiment of the present application, the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is at least 2, and the image of each frame is The exposure time lengths of the remaining images in the respective frames are different; the step of performing de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image may include: resting the remaining images in the frames The image is subjected to wide dynamic synthesis processing to obtain a wide dynamic image; the wide dynamic image is subjected to de-infrared processing to obtain a visible light color image.

作为本申请实施例的一种可选实现方式,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。As an optional implementation manner of the embodiment of the present application, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; and the optical lens of the image fusion device is provided with a filter. The spectral region filtered by the filter includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

关于该方法各个步骤的具体实现以及相关解释内容可以参见上述图1、图3所示的方法实施例以及其它方法实施例,在此不做赘述。For the specific implementation of the various steps of the method and related explanations, reference may be made to the method embodiments and other method embodiments shown in FIG. 1 and FIG. 3, and details are not described herein.

上述存储器可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The above memory may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Ne twork Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Applica tion Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Ne twork processor, NP for short), or a digital signal processor (DSP). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.

由以上可知,与现有技术相比,本实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以是由一个图像传感器进行采集的,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,本实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。It can be seen from the above that, compared with the prior art, in the solution provided by the embodiment, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so as long as it is in the device. There is an image sensor, which can complete the image collection and fusion to improve the image quality under low illumination conditions. The device provided by this embodiment has good adaptability and is easy to apply; from another perspective, for image acquisition and For a device integrated with the solution provided by the embodiment, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:获得在一个图像采集周期内通过至少两次曝光得到的各帧图 像;基于所得到的各帧图像中的其中一帧,确定感红外亮度图像;对所得到的各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;将感红外亮度图像与可见光色彩图像融合,获得融合图像。In still another embodiment provided by the present application, there is provided a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are performed: obtaining a Each frame image obtained by at least two exposures in an image acquisition period; determining an infrared brightness image based on one of the obtained frame images; performing de-infrared processing on the image to be processed in each obtained frame image Obtaining a visible light color image; fusing the infrared brightness image with the visible color image to obtain a fused image.

作为本申请实施例的一种可选实现方式,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述计算机程序被处理器执行时还可以实现如下步骤:在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:基于所述第预设次曝光所得到的图像,确定感红外亮度图像。As an optional implementation manner of the embodiment of the present application, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; when the computer program is executed by the processor, the following steps may be implemented: Performing infrared fill light in an exposure time corresponding to the preset exposure in the image acquisition period; and determining, according to one of the frame images, the step of determining an infrared brightness image, comprising: The image obtained by the preset exposure is used to determine the infrared brightness image.

作为本申请实施例的一种可选实现方式,所述第预设次曝光所对应的曝光参数不大于目标最大值,其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。As an optional implementation manner of the embodiment of the present application, the exposure parameter corresponding to the preset exposure is not greater than a target maximum, wherein the exposure parameter is an exposure duration and/or a gain, and the target maximum The maximum value of the exposure parameters corresponding to each of the other exposures except the preset exposure.

作为本申请实施例的一种可选实现方式,所述在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光的步骤,可以包括:按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。As an optional implementation manner of the embodiment of the present application, the step of performing infrared light filling in the exposure time corresponding to the preset exposure in the image collection period may include: following the following control manners; The infrared fill light is performed in the exposure time corresponding to the preset exposure in the image acquisition period: the start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not late At the end of exposure of the first predetermined exposure.

作为本申请实施例的一种可选实现方式,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝光或最后一次曝光。As an optional implementation manner of the embodiment of the present application, when the number of exposures in the image collection period is greater than two times, the first preset exposure is the first exposure or the last of the at least two exposures. One exposure.

作为本申请实施例的一种可选实现方式,所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,可以包括:对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。As an optional implementation manner of the embodiment of the present application, the step of determining an infrared illuminance image based on one of the frame images may include: performing one of the frame images De-mosaic processing to generate an infrared brightness image.

作为本申请实施例的一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。As an optional implementation manner of the embodiment of the present application, the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is 1, and the frames are The step of performing de-infrared processing on the image to be processed in the image to obtain a visible light color image includes: performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image.

作为本申请实施例的一种可选实现方式,所述对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像的步骤,可以包括:在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。As an optional implementation manner of the embodiment of the present application, the step of performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image may include: if the target image includes an IR channel Interpolating an IR channel of the target image to generate the target image after the interpolation process, wherein the target image is the remaining image in each frame image; and each of the target images after the interpolation process One pixel is updated as follows to obtain a visible light color image: if the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has G Value, update the G value of the pixel: the difference between the G value of the pixel and the IR parameter value of the pixel; if the pixel has a B value, update the B value of the pixel: the B value of the pixel and the pixel The difference of the IR parameter values; wherein the IR parameter value of the pixel is the product of the IR value of the pixel and the preset correction value.

作为本申请实施例的一种可选实现方式,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,可以包括:将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;对所述宽动态图像进行去红外处理,获得可见光色彩图像。As an optional implementation manner of the embodiment of the present application, the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is at least 2, and the image of each frame is The exposure time lengths of the remaining images in the respective frames are different; the step of performing de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image may include: resting the remaining images in the frames The image is subjected to wide dynamic synthesis processing to obtain a wide dynamic image; the wide dynamic image is subjected to de-infrared processing to obtain a visible light color image.

作为本申请实施例的一种可选实现方式,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。As an optional implementation manner of the embodiment of the present application, the method is applied to an image fusion device, where each frame image is collected by the image fusion device; and the optical lens of the image fusion device is provided with a filter. The spectral region filtered by the filter includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2.

由以上可知,与现有技术相比,本实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以是由一个图像传感器进行采集的,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,本实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。It can be seen from the above that, compared with the prior art, in the solution provided by the embodiment, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so as long as it is in the device. There is an image sensor, which can complete the image collection and fusion to improve the image quality under low illumination conditions. The device provided by this embodiment has good adaptability and is easy to apply; from another perspective, for image acquisition and For a device integrated with the solution provided by the embodiment, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

在本申请提供的又一实施例中,还提供了一种计算机程序,所述计算机程序用于在运行时实现上述实施例中任一所述的图像融合方法。In still another embodiment provided by the present application, there is also provided a computer program for implementing the image fusion method of any of the above embodiments at runtime.

由以上可知,与现有技术相比,本实施例提供的方案中,上述在一个图像采集周期内通过至少两次曝光得到的各帧图像可以是由一个图像传感器进行采集的,所以只要设备中存在一个图像传感器,就可以完成图像的采集与融合,以提升低照度情况下的图像质量,本实施例所提供方案的设备适应性好,便于应用;从另一角度来说,对于图像采集与融合一体的、并应用本实施例所提供方案的设备而言,该设备中可以只设置一个传感器,不必设置分光装置,结构简单,设备成本低。It can be seen from the above that, compared with the prior art, in the solution provided by the embodiment, each frame image obtained by at least two exposures in one image acquisition period may be collected by one image sensor, so as long as it is in the device. There is an image sensor, which can complete the image collection and fusion to improve the image quality under low illumination conditions. The device provided by this embodiment has good adaptability and is easy to apply; from another perspective, for image acquisition and For a device integrated with the solution provided by the embodiment, only one sensor can be disposed in the device, and the spectroscopic device is not required, and the structure is simple and the device cost is low.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备以及计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, and the computer readable storage medium embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (23)

一种图像融合方法,其特征在于,所述方法包括:An image fusion method, the method comprising: 获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;Obtaining each frame image obtained by at least two exposures in one image acquisition period; 基于所述各帧图像中的其中一帧,确定感红外亮度图像;Determining an infrared brightness image based on one of the frames of the frames; 对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;De-infrared processing the image to be processed in each frame image to obtain a visible light color image; 将所述感红外亮度图像与所述可见光色彩图像融合,获得融合图像。The sensible infrared brightness image is fused with the visible light color image to obtain a fused image. 根据权利要求1所述的方法,其特征在于,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;The method according to claim 1, wherein the method is applied to an image fusion device, and the frame images are collected by the image fusion device; 所述方法还包括:The method further includes: 在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;Performing infrared fill light during an exposure time corresponding to the preset exposure within the image acquisition period; 所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:The step of determining an infrared brightness image based on one of the frames of the frames includes: 基于所述第预设次曝光所得到的图像,确定感红外亮度图像。The infrared brightness image is determined based on the image obtained by the preset exposure. 根据权利要求2所述的方法,其特征在于,所述第预设次曝光所对应的曝光参数不大于目标最大值,The method according to claim 2, wherein the exposure parameter corresponding to the preset exposure is not greater than a target maximum value, 其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第预设次曝光外其余各次曝光所对应曝光参数中的最大值。The exposure parameter is an exposure duration and/or a gain, and the target maximum value is a maximum value of exposure indexes corresponding to the other exposures except the first preset exposure. 根据权利要求2所述的方法,其特征在于,所述在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光的步骤,包括:The method according to claim 2, wherein the step of performing infrared fill light in the exposure time corresponding to the preset exposure within the image acquisition period comprises: 按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:According to the following control mode, infrared fill light is performed during the exposure time corresponding to the preset exposure within the image acquisition period: 红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。The start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not later than the exposure end time of the first preset exposure. 根据权利要求2所述的方法,其特征在于,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝 光或最后一次曝光。The method according to claim 2, wherein said first exposure is the first exposure or the last of said at least two exposures when said number of exposures in said image acquisition period is greater than two One exposure. 根据权利要求1所述的方法,其特征在于,所述基于所述各帧图像中的其中一帧,确定感红外亮度图像的步骤,包括:The method according to claim 1, wherein the step of determining an infrared illuminance image based on one of the frames of the frames comprises: 对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Performing a demosaic process on one of the frames of the frames to generate an infrared illuminance image. 根据权利要求1~6任一所述的方法,其特征在于,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,The method according to any one of claims 1 to 6, wherein the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is 1. 所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:The step of performing de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image includes: 对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。De-infrared processing is performed on the remaining images in the frame images to obtain a visible light color image. 根据权利要求7所述的方法,其特征在于,所述对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像的步骤,包括:The method according to claim 7, wherein the step of performing de-infrared processing on the remaining images in the frame images to obtain a visible light color image comprises: 在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;If the target image includes an IR channel, interpolating the IR channel of the target image to generate the target image after the interpolation process, wherein the target image is the remaining image in each frame image; 针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:For each pixel in the target image after the interpolation process, the image is updated as follows to obtain a visible light color image: 如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。If the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has a G value, the G value of the pixel is updated: G of the pixel The difference between the value and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated: the difference between the B value of the pixel and the IR parameter value of the pixel; wherein, the IR parameter value of the pixel The product of the IR value of the pixel and the preset correction value. 根据权利要求1~6任一所述的方法,其特征在于,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;The method according to any one of claims 1 to 6, wherein the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is at least 2, and The exposure durations corresponding to the remaining images in each frame image are different; 所述对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像的步骤,包括:The step of performing de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image includes: 将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;Performing wide dynamic synthesis processing on the remaining images in the frame images to obtain a wide dynamic image; 对所述宽动态图像进行去红外处理,获得可见光色彩图像。The wide dynamic image is subjected to de-infrared processing to obtain a visible light color image. 根据权利要求1~6任一所述的方法,其特征在于,所述方法应用于图像融合设备,所述各帧图像由所述图像融合设备采集;The method according to any one of claims 1 to 6, wherein the method is applied to an image fusion device, and the frame images are collected by the image fusion device; 所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。The optical lens of the image fusion device is provided with a filter, and the spectral region filtered by the filter includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2. 一种图像融合装置,其特征在于,所述装置包括:An image fusion device, characterized in that the device comprises: 获得模块,用于获得在一个图像采集周期内通过至少两次曝光得到的各帧图像;Obtaining a module for obtaining each frame image obtained by at least two exposures in one image acquisition period; 第一确定模块,用于基于所述各帧图像中的其中一帧,确定感红外亮度图像;a first determining module, configured to determine an infrared brightness image based on one of the frames of the frames; 第二确定模块,用于对所述各帧图像中的待处理图像进行去红外处理,得到可见光色彩图像;a second determining module, configured to perform de-infrared processing on the image to be processed in the image of each frame to obtain a visible light color image; 融合模块,用于将所述感红外亮度图像与所述可见光色彩图像融合,获得融合图像。And a fusion module, configured to fuse the infrared brightness image with the visible color image to obtain a fused image. 根据权利要求11所述的装置,其特征在于,所述装置应用于图像融合设备,所述各帧图像由所述图像融合设备采集;The apparatus according to claim 11, wherein said apparatus is applied to an image fusion device, and said frame images are acquired by said image fusion device; 所述装置还包括:The device also includes: 红外补光模块,用于在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光;The infrared fill light module is configured to perform infrared fill light during an exposure time corresponding to the preset exposure in the image acquisition period; 所述第一确定模块,具体用于:The first determining module is specifically configured to: 基于所述第预设次曝光所得到的图像,确定感红外亮度图像。The infrared brightness image is determined based on the image obtained by the preset exposure. 根据权利要求12所述的装置,其特征在于,所述第预设次曝光所对应的曝光参数不大于目标最大值,The device according to claim 12, wherein the exposure parameter corresponding to the preset exposure is not greater than a target maximum value, 其中,所述曝光参数为曝光时长和/或增益,所述目标最大值为除所述第 预设次曝光外其余各次曝光所对应曝光参数中的最大值。The exposure parameter is an exposure duration and/or a gain, and the target maximum value is a maximum value of exposure indexes corresponding to the other exposures except the first preset exposure. 根据权利要求12所述的装置,其特征在于,所述红外补光模块,具体用于:The device according to claim 12, wherein the infrared fill light module is specifically configured to: 按照如下控制方式,在所述图像采集周期内的第预设次曝光所对应曝光时间内进行红外补光:According to the following control mode, infrared fill light is performed during the exposure time corresponding to the preset exposure within the image acquisition period: 红外补光的开始时刻不早于所述第预设次曝光的曝光开始时刻,红外补光的结束时刻不晚于所述第预设次曝光的曝光结束时刻。The start time of the infrared fill light is not earlier than the exposure start time of the first preset exposure, and the end time of the infrared fill light is not later than the exposure end time of the first preset exposure. 根据权利要求12所述的装置,其特征在于,在所述图像采集周期内的曝光次数大于两次时,所述第预设次曝光为所述至少两次曝光中的第一次曝光或最后一次曝光。The apparatus according to claim 12, wherein said first exposure is the first exposure or the last of said at least two exposures when said number of exposures in said image acquisition period is greater than two One exposure. 根据权利要求11所述的装置,其特征在于,所述第一确定模块,具体用于:The device according to claim 11, wherein the first determining module is specifically configured to: 对所述各帧图像中的其中一帧进行去马赛克处理,生成感红外亮度图像。Performing a demosaic process on one of the frames of the frames to generate an infrared illuminance image. 根据权利要求11~16任一所述的装置,其特征在于,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量为1,The device according to any one of claims 11 to 16, wherein the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is 1. 所述第二确定模块,具体用于:The second determining module is specifically configured to: 对所述各帧图像中的其余图像进行去红外处理,获得可见光色彩图像。De-infrared processing is performed on the remaining images in the frame images to obtain a visible light color image. 根据权利要求17所述的装置,其特征在于,所述第二确定模块,包括:The apparatus according to claim 17, wherein the second determining module comprises: 插值子模块,用于在目标图像包含有IR通道的情况下,对所述目标图像的IR通道进行插值,生成插值处理后的所述目标图像,其中,所述目标图像为所述各帧图像中的其余图像;An interpolation sub-module, configured to interpolate an IR channel of the target image, where the target image includes an IR channel, to generate the target image after the interpolation process, wherein the target image is the image of each frame The rest of the images; 更新子模块,用于针对插值处理后所述目标图像中的每一像素,按照如下方式进行更新,得到可见光色彩图像:And an update submodule, configured to update each pixel in the target image after the interpolation process as follows to obtain a visible light color image: 如果该像素存在R值,更新该像素的R值为:该像素的R值与该像素的IR参数值的差值;如果该像素存在G值,更新该像素的G值为:该像素的G值与 该像素的IR参数值的差值;如果该像素存在B值,更新该像素的B值为:该像素的B值与该像素的IR参数值的差值;其中,像素的IR参数值为该像素的IR值与预设修正值的乘积。If the pixel has an R value, the R value of the pixel is updated: the difference between the R value of the pixel and the IR parameter value of the pixel; if the pixel has a G value, the G value of the pixel is updated: G of the pixel The difference between the value and the IR parameter value of the pixel; if the pixel has a B value, the B value of the pixel is updated: the difference between the B value of the pixel and the IR parameter value of the pixel; wherein, the IR parameter value of the pixel The product of the IR value of the pixel and the preset correction value. 根据权利要求11~16任一所述的装置,其特征在于,所述待处理图像为所述各帧图像中的其余图像,所述各帧图像中的其余图像的数量至少为2,且所述各帧图像中的其余图像所分别对应的曝光时长均不同;The device according to any one of claims 11 to 16, wherein the image to be processed is the remaining image in each frame image, and the number of remaining images in each frame image is at least 2, and The exposure durations corresponding to the remaining images in each frame image are different; 所述第二确定模块,包括:The second determining module includes: 第一处理子模块,用于将所述各帧图像中的其余图像进行宽动态合成处理,得到宽动态图像;a first processing sub-module, configured to perform wide dynamic synthesis processing on the remaining images in the frame images to obtain a wide dynamic image; 第二处理子模块,用于对所述宽动态图像进行去红外处理,获得可见光色彩图像。And a second processing submodule, configured to perform de-infrared processing on the wide dynamic image to obtain a visible light color image. 根据权利要求11~16任一所述的装置,其特征在于,所述装置应用于图像融合设备,所述各帧图像由所述图像融合设备采集;The device according to any one of claims 11 to 16, wherein the device is applied to an image fusion device, and the frame images are collected by the image fusion device; 所述图像融合设备的光学镜头上设置有滤光片,所述滤光片滤除的光谱区域包括[T1,T2];其中,600nm≤T1≤800nm,750nm≤T2≤1100nm,T1<T2。The optical lens of the image fusion device is provided with a filter, and the spectral region filtered by the filter includes [T1, T2]; wherein, 600 nm ≤ T1 ≤ 800 nm, 750 nm ≤ T2 ≤ 1100 nm, and T1 < T2. 一种电子设备,其特征在于,包括处理器和存储器,An electronic device, comprising a processor and a memory, 其中,存储器,用于存放程序代码;Wherein, the memory is used to store the program code; 处理器,用于执行存储器上所存放的程序代码时,实现权利要求1~10任一所述的方法步骤。The processor, when used to execute the program code stored on the memory, implements the method steps of any one of claims 1 to 10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1~10任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any one of claims 1 to 10. 一种计算机程序,其特征在于,所述计算机程序用于在运行时执行权利要求1-10任一所述的方法。A computer program for performing the method of any of claims 1-10 at runtime.
PCT/CN2018/101859 2017-12-20 2018-08-23 Image fusion method and apparatus, electronic device, and computer readable storage medium Ceased WO2019119842A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711381018.0A CN109951646B (en) 2017-12-20 2017-12-20 Image fusion method and device, electronic equipment and computer readable storage medium
CN201711381018.0 2017-12-20

Publications (1)

Publication Number Publication Date
WO2019119842A1 true WO2019119842A1 (en) 2019-06-27

Family

ID=66992522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101859 Ceased WO2019119842A1 (en) 2017-12-20 2018-08-23 Image fusion method and apparatus, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (2) CN109951646B (en)
WO (1) WO2019119842A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905185A (en) * 2021-10-27 2022-01-07 锐芯微电子股份有限公司 Image processing method and device
CN114143419A (en) * 2020-09-04 2022-03-04 聚晶半导体股份有限公司 Dual-sensor camera system and its depth map calculation method
CN114157382A (en) * 2021-12-28 2022-03-08 中电海康集团有限公司 Time synchronization control system of optical-video integrated machine
CN114331934A (en) * 2021-12-07 2022-04-12 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment
CN114500850A (en) * 2022-02-22 2022-05-13 锐芯微电子股份有限公司 Image processing method, device and system and readable storage medium
CN115187496A (en) * 2022-07-07 2022-10-14 杭州萤石软件有限公司 Method and device for fusing visible light image and infrared light image and electronic equipment
US20230123736A1 (en) * 2021-10-14 2023-04-20 Redzone Robotics, Inc. Data translation and interoperability
CN119784607A (en) * 2024-12-26 2025-04-08 西北工业大学 A method of infrared dual-band image fusion driven by semantic loss function

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021016900A1 (en) * 2019-07-31 2021-02-04 华为技术有限公司 Image sensor and image photosensing method
CN112399064B (en) * 2019-08-12 2023-05-23 浙江宇视科技有限公司 Double-light fusion snapshot method and camera
CN110602415B (en) * 2019-09-30 2021-09-07 杭州海康威视数字技术股份有限公司 Exposure control device, method and camera
CN113259546B (en) * 2020-02-11 2023-05-12 华为技术有限公司 Image acquisition device and image acquisition method
CN113271414B (en) * 2020-02-14 2022-11-18 上海海思技术有限公司 Image acquisition method and device
CN113940052B (en) * 2020-04-29 2023-01-20 华为技术有限公司 Camera and method for acquiring image
CN111383206B (en) * 2020-06-01 2020-09-29 浙江大华技术股份有限公司 Image processing method and device, electronic equipment and storage medium
CN114374776B (en) * 2020-10-15 2023-06-23 华为技术有限公司 Camera and camera control method
CN113114926B (en) * 2021-03-10 2022-11-25 杭州海康威视数字技术股份有限公司 Image processing method and device and camera
CN113112495B (en) * 2021-04-30 2024-02-23 浙江华感科技有限公司 Abnormal image processing method and device, thermal imaging equipment and storage medium
CN115314628B (en) * 2021-05-08 2024-03-01 杭州海康威视数字技术股份有限公司 Imaging method, imaging system and camera
CN115314629B (en) * 2021-05-08 2024-03-01 杭州海康威视数字技术股份有限公司 Imaging method, imaging system and camera
CN113489865A (en) * 2021-06-11 2021-10-08 浙江大华技术股份有限公司 Monocular camera and image processing system
CN113596357B (en) * 2021-07-29 2023-04-18 北京紫光展锐通信技术有限公司 Image signal processor, image signal processing device and method, chip and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010081010A2 (en) * 2009-01-09 2010-07-15 New York University Methods, computer-accessible medium and systems for facilitating dark flash photography
CN104661008A (en) * 2013-11-18 2015-05-27 深圳中兴力维技术有限公司 Processing method and device for improving colorful image quality under condition of low-light level
CN107072644A (en) * 2014-09-18 2017-08-18 株式会社岛津制作所 Imaging device
CN107438170A (en) * 2016-05-25 2017-12-05 杭州海康威视数字技术股份有限公司 A kind of image Penetrating Fog method and the image capture device for realizing image Penetrating Fog

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040256561A1 (en) * 2003-06-17 2004-12-23 Allyson Beuhler Wide band light sensing pixel array
US8408821B2 (en) * 2010-10-12 2013-04-02 Omnivision Technologies, Inc. Visible and infrared dual mode imaging system
US9143704B2 (en) * 2012-01-20 2015-09-22 Htc Corporation Image capturing device and method thereof
CN102982518A (en) * 2012-11-06 2013-03-20 扬州万方电子技术有限责任公司 Fusion method of infrared image and visible light dynamic image and fusion device of infrared image and visible light dynamic image
US9654704B2 (en) * 2013-03-15 2017-05-16 Infrared Integrated Systems, Ltd. Apparatus and method for multispectral imaging with three dimensional overlaying
JP2014216734A (en) * 2013-04-24 2014-11-17 日立マクセル株式会社 Imaging apparatus and imaging system
KR20150021353A (en) * 2013-08-20 2015-03-02 삼성테크윈 주식회사 Image systhesis system and image synthesis method
US9723224B2 (en) * 2014-03-31 2017-08-01 Google Technology Holdings LLC Adaptive low-light identification
CN105263008B (en) * 2014-06-19 2018-03-16 深圳中兴力维技术有限公司 Color image quality method for improving and its device under low environment illumination
CN105243726B (en) * 2014-07-11 2018-03-30 威海新北洋荣鑫科技股份有限公司 The acquisition methods and device of digital image data
JP6264233B2 (en) * 2014-09-02 2018-01-24 株式会社Jvcケンウッド IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND CONTROL PROGRAM
KR102388249B1 (en) * 2015-11-27 2022-04-20 엘지이노텍 주식회사 Camera module for taking picture using visible light or infrared ray
CN105611136B (en) * 2016-02-26 2019-04-23 联想(北京)有限公司 A kind of imaging sensor and electronic equipment
CN106572289B (en) * 2016-10-21 2019-08-20 维沃移动通信有限公司 A kind of image processing method and mobile terminal of camera module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010081010A2 (en) * 2009-01-09 2010-07-15 New York University Methods, computer-accessible medium and systems for facilitating dark flash photography
CN104661008A (en) * 2013-11-18 2015-05-27 深圳中兴力维技术有限公司 Processing method and device for improving colorful image quality under condition of low-light level
CN107072644A (en) * 2014-09-18 2017-08-18 株式会社岛津制作所 Imaging device
CN107438170A (en) * 2016-05-25 2017-12-05 杭州海康威视数字技术股份有限公司 A kind of image Penetrating Fog method and the image capture device for realizing image Penetrating Fog

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143419A (en) * 2020-09-04 2022-03-04 聚晶半导体股份有限公司 Dual-sensor camera system and its depth map calculation method
CN114143419B (en) * 2020-09-04 2023-12-26 聚晶半导体股份有限公司 Dual-sensor camera system and depth map calculation method thereof
US20230123736A1 (en) * 2021-10-14 2023-04-20 Redzone Robotics, Inc. Data translation and interoperability
CN113905185A (en) * 2021-10-27 2022-01-07 锐芯微电子股份有限公司 Image processing method and device
CN113905185B (en) * 2021-10-27 2023-10-31 锐芯微电子股份有限公司 Image processing method and device
CN114331934A (en) * 2021-12-07 2022-04-12 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment
CN114157382A (en) * 2021-12-28 2022-03-08 中电海康集团有限公司 Time synchronization control system of optical-video integrated machine
CN114157382B (en) * 2021-12-28 2024-02-09 中电海康集团有限公司 Time synchronization control system of light vision all-in-one machine
CN114500850A (en) * 2022-02-22 2022-05-13 锐芯微电子股份有限公司 Image processing method, device and system and readable storage medium
CN114500850B (en) * 2022-02-22 2024-01-19 锐芯微电子股份有限公司 Image processing method, device, system and readable storage medium
CN115187496A (en) * 2022-07-07 2022-10-14 杭州萤石软件有限公司 Method and device for fusing visible light image and infrared light image and electronic equipment
CN119784607A (en) * 2024-12-26 2025-04-08 西北工业大学 A method of infrared dual-band image fusion driven by semantic loss function

Also Published As

Publication number Publication date
CN112788249A (en) 2021-05-11
CN112788249B (en) 2022-12-06
CN109951646A (en) 2019-06-28
CN109951646B (en) 2021-01-15

Similar Documents

Publication Publication Date Title
WO2019119842A1 (en) Image fusion method and apparatus, electronic device, and computer readable storage medium
CN111988587B (en) Image fusion apparatus and image fusion method
CN108419061B (en) Multispectral-based image fusion equipment and method and image sensor
CN110493532B (en) Image processing method and system
CN110493506B (en) Image processing method and system
TWI488144B (en) Method for providing improved high-resolution images using low-resolution images of scenes captured by the same image capture device and at least one high-resolution image
CN103250405B (en) Flash system for multiple aperture imaging
WO2017202061A1 (en) Image defogging method and image capture apparatus implementing image defogging
KR20160012743A (en) Image photographing apparatus and methods for photographing image thereof
CN106063249A (en) Imaging device, control method thereof, and computer-readable recording medium
CN103546730A (en) Method for enhancing light sensitivities of images on basis of multiple cameras
US9148552B2 (en) Image processing apparatus, image pickup apparatus, non-transitory storage medium storing image processing program and image processing method
JP2020187409A (en) Image recognition device, solid-state imaging device, and image recognition method
CN110493531B (en) Image processing method and system
JP4250506B2 (en) Image processing method, image processing apparatus, image processing program, and imaging system
JP5681589B2 (en) Imaging apparatus and image processing method
WO2020146118A1 (en) Lens rolloff assisted auto white balance
US20200077006A1 (en) Image processing method and imaging device
JP2014209689A (en) Imaging device and method
CN109345602A (en) Image processing method and device, storage medium and electronic equipment
CN109447925B (en) Image processing method and device, storage medium, electronic device
JP4993275B2 (en) Image processing device
JP2020191506A (en) Defect pixel detection device and imaging device, and defect pixel detection method
JP2006101231A (en) White balance adjustment device, color adjustment device, white balance adjustment method, and color adjustment method
JP2011044965A (en) Imaging apparatus, imaging method and computer program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18891109

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18891109

Country of ref document: EP

Kind code of ref document: A1