[go: up one dir, main page]

CN118784810A - Image processing method, device, storage medium and chip - Google Patents

Image processing method, device, storage medium and chip Download PDF

Info

Publication number
CN118784810A
CN118784810A CN202310364347.3A CN202310364347A CN118784810A CN 118784810 A CN118784810 A CN 118784810A CN 202310364347 A CN202310364347 A CN 202310364347A CN 118784810 A CN118784810 A CN 118784810A
Authority
CN
China
Prior art keywords
color temperature
white balance
target
temperature detection
weight
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.)
Pending
Application number
CN202310364347.3A
Other languages
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202310364347.3A priority Critical patent/CN118784810A/en
Publication of CN118784810A publication Critical patent/CN118784810A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J5/60Radiation pyrometry, e.g. infrared or optical thermometry using determination of colour temperature
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

本公开涉及一种图像处理方法、装置、存储介质及芯片,该方法包括:响应于第一图像的获取指令,获取第一图像以及多向环境信息,多向环境信息包括多个色温传感器分别检测到的环境信息,每一色温传感器的检测方向不同;根据多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,目标色温传感器的检测方向与第一图像对应;在确定置信值大于预设置信阈值的情况下,根据多向环境信息确定目标白平衡点;根据目标白平衡点对第一图像进行处理,得到目标图像。能够准确地确定对应当前场景的白平衡点,可以目标场景的白平衡色温错判问题。

The present disclosure relates to an image processing method, device, storage medium and chip, the method comprising: in response to an acquisition instruction of a first image, acquiring a first image and multi-directional environmental information, the multi-directional environmental information comprising environmental information respectively detected by a plurality of color temperature sensors, each of which has a different detection direction; determining a confidence value that a scene corresponding to a target color temperature sensor is a target scene according to the multi-directional environmental information, the detection direction of the target color temperature sensor corresponding to the first image; determining a target white balance point according to the multi-directional environmental information when the confidence value is greater than a preset confidence threshold; processing the first image according to the target white balance point to obtain a target image. The white balance point corresponding to the current scene can be accurately determined, and the problem of misjudgment of the white balance color temperature of the target scene can be solved.

Description

图像处理方法、装置、存储介质及芯片Image processing method, device, storage medium and chip

技术领域Technical Field

本公开涉及图像处理领域,尤其涉及一种图像处理方法、装置、存储介质及芯片。The present disclosure relates to the field of image processing, and in particular to an image processing method, device, storage medium and chip.

背景技术Background Art

相关技术中,绝大部分是使用单向多通道色温传感器辅助白平衡计算,然而受限于色温传感器探测视场较为有限,在面对较大面积纯色及误导色场景时,往往无法有效计算出场景真实色温。In the related technologies, most of them use unidirectional multi-channel color temperature sensors to assist in white balance calculation. However, due to the limited detection field of view of the color temperature sensor, when faced with a large area of pure color or misleading color scenes, it is often impossible to effectively calculate the true color temperature of the scene.

发明内容Summary of the invention

为克服相关技术中存在的问题,本公开提供一种图像处理方法、装置、存储介质及芯片。In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, storage medium and chip.

根据本公开实施例的第一方面,提供一种图像处理方法,包括:According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:

响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;In response to an instruction to acquire a first image, acquire the first image and multi-directional environmental information, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction;

根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;Determining, according to the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image;

在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;In a case where it is determined that the confidence value is greater than a preset confidence threshold, determining a target white balance point according to the multi-directional environmental information;

根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The first image is processed according to the target white balance point to obtain a target image.

根据本公开实施例的第二方面,提供一种图像处理装置,包括:According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

获取模块,被配置为响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;an acquisition module, configured to acquire the first image and multi-directional environmental information in response to an acquisition instruction of the first image, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, each of which has a different detection direction;

第一确定模块,被配置为根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;A first determination module is configured to determine, based on the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image;

第二确定模块,被配置为在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;A second determination module is configured to determine a target white balance point according to the multi-directional environment information when it is determined that the confidence value is greater than a preset confidence threshold;

第四确定模块,被配置为根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The fourth determination module is configured to process the first image according to the target white balance point to obtain a target image.

根据本公开实施例的第三方面,提供一种图像处理装置,包括:According to a third aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

处理器;processor;

用于存储处理器可执行指令的存储器;a memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured to:

响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;In response to an instruction to acquire a first image, acquire the first image and multi-directional environmental information, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction;

根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;Determining, according to the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image;

在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;In a case where it is determined that the confidence value is greater than a preset confidence threshold, determining a target white balance point according to the multi-directional environmental information;

根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The first image is processed according to the target white balance point to obtain a target image.

根据本公开实施例的第四方面,提供一种计算机可读存储介质,其上存储有计算机程序指令,该程序指令被处理器执行时实现本公开第一方面中任一项所述方法的步骤。According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of any one of the methods described in the first aspect of the present disclosure are implemented.

根据本公开实施例的第五方面,提供一种芯片,包括处理器和接口;所述处理器用于读取指令以执行本公开第一方面中任一项所述的方法。According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, comprising a processor and an interface; the processor is used to read instructions to execute any one of the methods described in the first aspect of the present disclosure.

本公开的实施例提供的技术方案可以包括以下有益效果:通过获取多个色温传感器分别检测到的环境信息,即多向环境信息,并基于该多向环境信息目标色温传感器对应目标场景的置信度,进一步基于置信度确定是否触发多向白平衡,并在确定触发多向白平衡后基于多个色温传感器分别检测到的环境信息确定白平衡点并对图像进行处理,能够准确地确定对应当前场景的白平衡点,可以避免较大面积纯色及误导色光源场景的白平衡色温错判,导致图像处理效果不佳的问题。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by acquiring environmental information detected by multiple color temperature sensors, namely, multi-directional environmental information, and based on the confidence of the target scene corresponding to the target color temperature sensor of the multi-directional environmental information, further determining whether to trigger the multi-directional white balance based on the confidence, and after determining that the multi-directional white balance is triggered, determining the white balance point based on the environmental information detected by the multiple color temperature sensors and processing the image, the white balance point corresponding to the current scene can be accurately determined, and the problem of misjudgment of the white balance color temperature of a large area of pure color and misleading color light source scenes, resulting in poor image processing effects, can be avoided.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

图1是根据一示例性实施例示出的一种图像处理方法的流程图。Fig. 1 is a flow chart showing an image processing method according to an exemplary embodiment.

图2是根据一示例性实施例示出的一种第一映射关系表的示意图。Fig. 2 is a schematic diagram showing a first mapping relationship table according to an exemplary embodiment.

图3是根据一示例性实施例示出的一种预设置信曲线的示意图。Fig. 3 is a schematic diagram showing a preset signal curve according to an exemplary embodiment.

图4是根据一示例性实施例示出的一种第五权重与第二偏差值的映射关系示意图。Fig. 4 is a schematic diagram showing a mapping relationship between a fifth weight and a second deviation value according to an exemplary embodiment.

图5是根据一示例性实施例示出的一种图像处理方法的流程图。Fig. 5 is a flow chart showing an image processing method according to an exemplary embodiment.

图6是根据一示例性实施例示出的一种图像处理装置的框图。Fig. 6 is a block diagram showing an image processing apparatus according to an exemplary embodiment.

图7是根据一示例性实施例示出的一种用于图像处理的装置的框图。Fig. 7 is a block diagram showing a device for image processing according to an exemplary embodiment.

具体实施方式DETAILED DESCRIPTION

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

需要说明的是,本公开中所有获取信号、信息或数据的动作都是在遵照所在地国家相应的数据保护法规政策的前提下,并获得由相应装置所有者给予授权的情况下进行的。It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

图1是根据一示例性实施例示出的一种图像处理方法的流程图,该方法可以用于终端中,例如可以是终端的拍摄系统,或者,还可以用于车载相机、监控系统等,该方法的执行主体例如可以是处理器或者其他任意具备信息处理能力的电子设备,如图1所示,该方法包括以下步骤。FIG1 is a flowchart of an image processing method according to an exemplary embodiment. The method may be used in a terminal, such as a photographing system of the terminal, or may also be used in a vehicle-mounted camera, a monitoring system, etc. The executor of the method may be, for example, a processor or any other electronic device with information processing capabilities. As shown in FIG1 , the method includes the following steps.

S101、响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同。S101. In response to an instruction to obtain a first image, obtain the first image and multi-directional environmental information, where the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, each of which has a different detection direction.

其中,第一图像的获取指令例如可以是用户的操作所生成的指令,例如按压拍摄按钮或者用户的图像拍摄语音指令等等,本公开实施例对此不作限定。The instruction for acquiring the first image may be, for example, an instruction generated by a user's operation, such as pressing a capture button or a user's voice command for capturing an image, etc. This is not limited in the embodiments of the present disclosure.

示例地,多个色温传感器可以包括第一色温传感器与第二色温传感器,例如可以是手机的前置色温传感器与后置色温传感器,具体的,第一色温传感器与第二色温传感器例如可以是前后置双向多通道色温传感器。或者,第一色温传感器与第二色温传感器还可以是位于同一位置且拍摄不同角度的两个监控装置,监控装置可以包括色温传感器,监控装置的拍摄角度与其中的色温传感器的检测角度相同或接近。或者,多个色温传感器还可以包括更多的色温传感器,本公开对色温传感器的数量不作限定。For example, the multiple color temperature sensors may include a first color temperature sensor and a second color temperature sensor, for example, they may be a front color temperature sensor and a rear color temperature sensor of a mobile phone. Specifically, the first color temperature sensor and the second color temperature sensor may be, for example, front and rear bidirectional multi-channel color temperature sensors. Alternatively, the first color temperature sensor and the second color temperature sensor may also be two monitoring devices located at the same position and shooting at different angles. The monitoring device may include a color temperature sensor, and the shooting angle of the monitoring device is the same as or close to the detection angle of the color temperature sensor therein. Alternatively, the multiple color temperature sensors may also include more color temperature sensors, and the present disclosure does not limit the number of color temperature sensors.

在一些实施例中,多向环境信息包括多个色温传感器分别检测到的以下至少一者或多者:环境相关色温(CCT,Correlated color temperature)、亮度(Lv)信息、红外信息以及环境白点。即,环境信息可以包括以下一者或多者:环境相关色温、亮度信息、红外信息以及环境白点。In some embodiments, the multi-directional environmental information includes at least one or more of the following detected by multiple color temperature sensors: environmental correlated color temperature (CCT), luminance (Lv) information, infrared information, and environmental white point. That is, the environmental information may include one or more of the following: environmental correlated color temperature, luminance information, infrared information, and environmental white point.

其中,环境相关色温则是对应的色温传感器检测到的当前环境的相关色温,红外信息例如可以是红外辐射比(IRRATIO,Infrared Radiation Ratio),环境白点例如可以包括当前环境对应的R/G以及B/G两个参数。可以理解的是,每一色温传感器均可以检测环境相关色温、亮度信息、红外信息以及环境白点中的至少一种信息。环境信息具体包括何种信息可以是根据色温传感器的能力确定,本公开对此不作限定。The environment-correlated color temperature is the correlated color temperature of the current environment detected by the corresponding color temperature sensor, the infrared information may be, for example, an infrared radiation ratio (IRRATIO), and the environment white point may include, for example, two parameters, R/G and B/G, corresponding to the current environment. It is understandable that each color temperature sensor may detect at least one of the environment-correlated color temperature, brightness information, infrared information, and environment white point. The specific information included in the environment information may be determined according to the capability of the color temperature sensor, and the present disclosure does not limit this.

S102、根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应。S102: Determine, according to the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image.

值得说明的是,第一图像的拍摄方向可以与多个色温传感器中的至少一个色温传感器的检测方向对应。例如,第一图像的拍摄装置的拍摄方向与第一色温传感器的检测方向相同,或,拍摄方向与检测方向的偏差小于预设阈值,则可以确定第一色温传感器的检测方向与第一图像对应。It is worth noting that the shooting direction of the first image may correspond to the detection direction of at least one color temperature sensor among the multiple color temperature sensors. For example, if the shooting direction of the shooting device of the first image is the same as the detection direction of the first color temperature sensor, or if the deviation between the shooting direction and the detection direction is less than a preset threshold, it can be determined that the detection direction of the first color temperature sensor corresponds to the first image.

示例地,若拍摄第一图像的摄像装置的拍摄方向与第一色温传感器的检测方向相同,则可以确定目标色温传感器为第一传感器,即,第一色温传感器的检测方向与所述第一图像对应。For example, if the shooting direction of the camera that shoots the first image is the same as the detection direction of the first color temperature sensor, it can be determined that the target color temperature sensor is the first sensor, that is, the detection direction of the first color temperature sensor corresponds to the first image.

可选地,目标场景例如可以包括纯色场景和/或混淆色场景。或者也可以是其他场景,本公开实施例对此不作限定。Optionally, the target scene may include, for example, a pure color scene and/or a mixed color scene, or may be other scenes, which are not limited in the embodiments of the present disclosure.

其中,纯色场景例如可以是指色温传感器采集的画面中的色温相同的面积大于预设阈值的场景,混淆色场景例如可以是指色温传感器采集的画面中的色温相近的面积大于预设阈值的场景,色温相近可以是指两个像素点的色温差距小于预设差值阈值。Among them, a pure color scene may, for example, refer to a scene in which an area with the same color temperature in a picture captured by a color temperature sensor is larger than a preset threshold, a mixed color scene may, for example, refer to a scene in which an area with similar color temperature in a picture captured by a color temperature sensor is larger than a preset threshold, and similar color temperature may refer to a scene in which the color temperature difference between two pixels is smaller than a preset difference threshold.

在一些可选地实施例中,步骤S102中根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,包括:In some optional embodiments, determining, in step S102, according to the multi-directional environmental information, a confidence value that the scene corresponding to the target color temperature sensor is the target scene includes:

根据所述多向环境信息确定至少一个置信参数,不同的置信参数是根据所述多向环境信息中不同子信息确定的;根据每一所述置信参数分别对应的预设置信权重对所述置信参数加权,得到所述置信值。At least one confidence parameter is determined according to the multi-directional environmental information, and different confidence parameters are determined according to different sub-information in the multi-directional environmental information; the confidence parameters are weighted according to the preset confidence weights corresponding to each of the confidence parameters to obtain the confidence value.

具体的,置信参数可以是基于多向环境信息中目标色温传感器检测到的环境信息与其他色温传感器检测到的环境信息之间的差异确定的。或者,还可以是根据目标色温传感器检测到的环境信息的时域连续性确定的。Specifically, the confidence parameter may be determined based on the difference between the environmental information detected by the target color temperature sensor and the environmental information detected by other color temperature sensors in the multi-directional environmental information, or may be determined based on the temporal continuity of the environmental information detected by the target color temperature sensor.

示例地,置信参数可以包括C0、C1、C2、C3、C4、C5,不同的置信参数可以表征在不同维度的多向环境信息对应的场景为目标场景的置信度。例如,不同的置信参数可以是基于多向环境信息中的不同信息确定的。For example, the confidence parameters may include C0, C1, C2, C3, C4, and C5, and different confidence parameters may characterize the confidence that the scene corresponding to the multi-directional environmental information in different dimensions is the target scene. For example, different confidence parameters may be determined based on different information in the multi-directional environmental information.

S103、在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点。S103: When it is determined that the confidence value is greater than a preset confidence threshold, determine a target white balance point according to the multi-directional environment information.

其中,预设置信阈值可以是本领域技术人员根据历史经验或者实验结果标定的,本公开实施例对其具体数值不作限定。Among them, the preset confidence threshold can be calibrated by those skilled in the art based on historical experience or experimental results, and the embodiments of the present disclosure do not limit its specific value.

示例地,以多个色温传感器可以包括第一色温传感器与第二色温传感器,置信参数包括C0、C1、C2、C3、C4、C5为例,每一置信参数对应的置信权重可以分别是T0、T1、T2、T3、T4、T5。进而,可以基于以下公式确定是否触发多向白平衡:For example, the multiple color temperature sensors may include a first color temperature sensor and a second color temperature sensor, and the confidence parameters include C0, C1, C2, C3, C4, and C5. The confidence weights corresponding to each confidence parameter may be T0, T1, T2, T3, T4, and T5, respectively. Then, whether to trigger multi-directional white balance may be determined based on the following formula:

T0*C0+T1*C1+T2*C2+T3*C3+T4*C4+T5*C5>=Double CS Trigger Threshold。T0*C0+T1*C1+T2*C2+T3*C3+T4*C4+T5*C5>=Double CS Trigger Threshold.

其中,Double CS Trigger Threshold可以是触发多向白平衡的预设置信阈值,在基于置信参数,以及每一置信参数分别对应的置信权重计算得到的加权结果大于该预设触发阈值时,则可以确定触发双向白平衡。The Double CS Trigger Threshold may be a preset confidence threshold for triggering multi-directional white balance. When a weighted result calculated based on the confidence parameter and the confidence weight corresponding to each confidence parameter is greater than the preset trigger threshold, it may be determined that the bidirectional white balance is triggered.

在一些实施例中,可以是基于多向环境信息中的第一色温传感器检测到的环境信息确定一个白平衡点,再基于第二色温传感器检测到的环境信息确定另一个白平衡点,再基于这两个白平衡点确定目标白平衡点。In some embodiments, a white balance point may be determined based on the environmental information detected by the first color temperature sensor in the multi-directional environmental information, another white balance point may be determined based on the environmental information detected by the second color temperature sensor, and then a target white balance point may be determined based on the two white balance points.

在另一些实施例中,还可以采用其他的方式,例如基于多向环境信息,综合各个色温传感器检测到的环境信息确定目标白平衡点。对于一些可能的实施方式本公开实施例在下文将详细说明,此处不作赘述。In other embodiments, other methods may be used, such as determining the target white balance point based on multi-directional environmental information and integrating environmental information detected by each color temperature sensor. Some possible implementations of the present disclosure will be described in detail below and will not be repeated here.

S104、根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。S104: Process the first image according to the target white balance point to obtain a target image.

可选地,在得到目标图像之后,则可以将目标图像进行存储或显示。示例地,若第一图像的获取指令为用户利用手机的后置摄像头进行拍摄对应的获取指令为例,则可以对后置摄像头初始获取到的第一图像处理得到该目标图像,并将该目标图像显示于手机屏幕,并存储至手机的存储装置。Optionally, after obtaining the target image, the target image can be stored or displayed. For example, if the acquisition instruction of the first image is an acquisition instruction corresponding to a user shooting with a rear camera of a mobile phone, the first image initially acquired by the rear camera can be processed to obtain the target image, and the target image can be displayed on the mobile phone screen and stored in the storage device of the mobile phone.

在本公开实施例中,通过获取多个色温传感器分别检测到的环境信息,即多向环境信息,并基于该多向环境信息目标色温传感器对应目标场景的置信度,进一步基于置信度确定是否触发多向白平衡,并在确定触发多向白平衡后基于多个色温传感器分别检测到的环境信息确定白平衡点并对图像进行处理,能够准确地确定对应当前场景的白平衡点,可以避免较大面积纯色及误导色光源场景的白平衡色温错判,导致图像处理效果不佳的问题。在一些实施例中,所述根据所述多向环境信息,确定目标白平衡点,包括:In the embodiments of the present disclosure, by acquiring environmental information detected by multiple color temperature sensors, i.e., multi-directional environmental information, and based on the confidence of the target color temperature sensor corresponding to the target scene of the multi-directional environmental information, further determining whether to trigger the multi-directional white balance based on the confidence, and after determining to trigger the multi-directional white balance, determining the white balance point based on the environmental information detected by the multiple color temperature sensors and processing the image, the white balance point corresponding to the current scene can be accurately determined, and the problem of misjudgment of the white balance color temperature of a large area of pure color and misleading color light source scenes, resulting in poor image processing effects, can be avoided. In some embodiments, determining the target white balance point based on the multi-directional environmental information includes:

基于所述置信参数,确定每一所述色温传感器分别对应的输出权重;Based on the confidence parameter, determining an output weight corresponding to each of the color temperature sensors;

根据所述输出权重以及所述多向环境信息,确定环境辅助信息;Determining environmental auxiliary information according to the output weight and the multi-directional environmental information;

根据所述环境辅助信息,确定目标白平衡点。A target white balance point is determined according to the environmental auxiliary information.

在一些可能的实施方式中,可以采用帕累托最优前沿面多目标搜索策略,确定各个色温传感器分别对应的输出权重。In some possible implementations, a Pareto optimal frontier multi-objective search strategy may be used to determine the output weights corresponding to each color temperature sensor.

值得说明的是,由于需要利用至少一个置信参数作为子目标搜索,然而如果仅使用单目标搜索算法则需要在不同子目标之间进行线性加权,因而很难设定一个权重向量能够满足不同模式下对环境信息输出的权衡需求,所以这里可以利用多目标搜索算法来避免对不同子目标权重的繁琐设置和改变目标权重后重新计算置信参数的麻烦,从而获取更为合理的不同色温传感器输出权重。It is worth noting that since at least one confidence parameter is needed for sub-target search, if only a single-target search algorithm is used, linear weighting is required between different sub-targets. Therefore, it is difficult to set a weight vector that can meet the trade-off requirements for environmental information output in different modes. Therefore, a multi-target search algorithm can be used here to avoid the tedious setting of weights for different sub-targets and the trouble of recalculating confidence parameters after changing target weights, thereby obtaining more reasonable output weights of different color temperature sensors.

在确定各个色温传感器分别对应的输出权重后,则可以结合该输出权重,对各个色温传感器检测到的环境信息进行加权求和得到该环境辅助信息,进而基于该环境辅助信息确定目标白平衡点。After the output weights corresponding to the color temperature sensors are determined, the environmental information detected by the color temperature sensors can be weighted and summed in combination with the output weights to obtain the environmental auxiliary information, and then the target white balance point can be determined based on the environmental auxiliary information.

可选地,环境辅助信息例如可以包括根据环境信息加权后的环境相关色温、亮度信息、红外信息以及环境白点中的一者或多者,例如,环境辅助信息可以包括辅助环境信息、辅助亮度信息、辅助红外信息以及辅助环境白点中的一者或多者。辅助相关色温、辅助红外信息、辅助亮度信息以及辅助环境白点是分别将相关色温、红外信息、亮度信息以及环境白点分别与对应的加权系数进行加权计算得到。示例地,该环境辅助信息可以是New(CCT、LV、IRRATIO、R/G、B/G)。可以理解的是,上述环境辅助信息中的各种信息可以用于辅助确定目标白平衡点,本公开实施例对其名称不作限定。Optionally, the environmental auxiliary information may include, for example, one or more of the environmental correlated color temperature, brightness information, infrared information, and environmental white point weighted according to the environmental information. For example, the environmental auxiliary information may include one or more of the auxiliary environmental information, auxiliary brightness information, auxiliary infrared information, and auxiliary environmental white point. The auxiliary correlated color temperature, auxiliary infrared information, auxiliary brightness information, and auxiliary environmental white point are obtained by weighting the correlated color temperature, infrared information, brightness information, and environmental white point with corresponding weighting coefficients, respectively. For example, the environmental auxiliary information may be New (CCT, LV, IRRATIO, R/G, B/G). It is to be understood that various information in the above environmental auxiliary information may be used to assist in determining the target white balance point, and the embodiments of the present disclosure do not limit their names.

其中,环境辅助信息具体包括何种信息,可以是基于各个色温传感器检测到的信息确定的,例如,若各个色温传感器均无法检测亮度信息,该环境辅助信息则可以不包括该辅助亮度信息。Specifically, what kind of information the environmental auxiliary information includes may be determined based on information detected by each color temperature sensor. For example, if each color temperature sensor cannot detect brightness information, the environmental auxiliary information may not include the auxiliary brightness information.

采用上述方案,可以基于置信参数确定各个色温传感器分别对应的输出权重,能够基于该输出权重更加准确的得到环境辅助信息,进而能够更加准确地结合各个色温传感器采集到的环境信息确定目标白平衡点,进一步提高了目标白平衡点的准确性。By adopting the above scheme, the output weights corresponding to each color temperature sensor can be determined based on the confidence parameters, and the environmental auxiliary information can be obtained more accurately based on the output weights, so that the target white balance point can be determined more accurately in combination with the environmental information collected by each color temperature sensor, thereby further improving the accuracy of the target white balance point.

在一些可选地实施例中,所述根据所述环境辅助信息,确定目标白平衡点,包括:In some optional embodiments, determining a target white balance point according to the environmental auxiliary information includes:

根据所述环境辅助信息,确定至少一个白平衡色温检测权重,不同的白平衡色温检测权重是根据所述环境辅助信息中不同子信息确定的;Determine at least one white balance color temperature detection weight according to the environmental auxiliary information, where different white balance color temperature detection weights are determined according to different sub-information in the environmental auxiliary information;

根据所述白平衡色温检测权重,确定所述目标白平衡点。The target white balance point is determined according to the white balance color temperature detection weight.

可选地,不同的白平衡色温检测权重可以表征在不同维度的环境辅助信息对应的场景为目标场景的置信度。例如,不同的白平衡色温检测权重可以是基于环境辅助信息中的不同信息确定的。Optionally, different white balance color temperature detection weights may represent the confidence that the scene corresponding to the environmental auxiliary information in different dimensions is the target scene. For example, different white balance color temperature detection weights may be determined based on different information in the environmental auxiliary information.

采用上述方案,基于加权后的环境辅助信息确定不同维度的环境辅助信息对应的场景为目标场景的置信度,也即不同维度的白平衡色温检测权重,并基于不同维度的白平衡色温检测权重确定目标白平衡点,能够综合环境辅助信息中不同的信息,结合不同信息对该目标白平衡点可能造成的影响,更加准确地确定目标白平衡点,可以进一步避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, the confidence that the scene corresponding to the environmental auxiliary information of different dimensions is the target scene is determined based on the weighted environmental auxiliary information, that is, the white balance color temperature detection weights of different dimensions, and the target white balance point is determined based on the white balance color temperature detection weights of different dimensions. This scheme can comprehensively integrate different information in the environmental auxiliary information and the possible impact of different information on the target white balance point, so as to more accurately determine the target white balance point, and can further avoid the problem of misjudgment of white balance color temperature in scenes with large areas of pure color and misleading color light sources.

在一些可选地实施例中,所述根据所述白平衡色温检测权重,确定目标白平衡点,包括:In some optional embodiments, determining a target white balance point according to the white balance color temperature detection weight includes:

确定每一所述白平衡色温检测权重对应的第一白平衡点;Determine a first white balance point corresponding to each of the white balance color temperature detection weights;

确定每一所述白平衡色温检测权重对应的插值率;Determining an interpolation rate corresponding to each of the white balance color temperature detection weights;

根据每一所述白平衡色温检测权重对应的第一白平衡点,以及每一所述白平衡色温检测权重对应的插值率,确定所述目标白平衡点。The target white balance point is determined according to the first white balance point corresponding to each of the white balance color temperature detection weights and the interpolation rate corresponding to each of the white balance color temperature detection weights.

值得说明的是,不同的白平衡色彩检测权重可以对应环境辅助信息中的不同信息。而基于环境辅助信息中的不同的信息可以确定得到不同的第一白平衡点。每一白平衡色温检测权重对应的第一白平衡点,具体可以是指根据该白平衡色温检测权重对应的环境辅助信息中的信息确定的白平衡点。It is worth noting that different white balance color detection weights may correspond to different information in the environmental auxiliary information. Different first white balance points may be determined based on different information in the environmental auxiliary information. The first white balance point corresponding to each white balance color temperature detection weight may specifically refer to a white balance point determined based on the information in the environmental auxiliary information corresponding to the white balance color temperature detection weight.

示例地,若一个白平衡色彩检测权重是基于辅助相关色温以及辅助红外信息,则该白平衡色彩检测权重对应的第一白平衡点则可以是基于辅助相关色温以及辅助红外信息确定的第一白平衡点。For example, if a white balance color detection weight is based on the auxiliary correlated color temperature and the auxiliary infrared information, then the first white balance point corresponding to the white balance color detection weight may be a first white balance point determined based on the auxiliary correlated color temperature and the auxiliary infrared information.

在一些可选的实施例中,每一白平衡色温检测权重对应的插值率可以是预先标定的。确定每一所述白平衡色温检测权重对应的插值率,可以是从存储设备中获取每一白平衡色温检测权重对应的插值率。In some optional embodiments, the interpolation rate corresponding to each white balance color temperature detection weight may be pre-calibrated. Determining the interpolation rate corresponding to each white balance color temperature detection weight may be to obtain the interpolation rate corresponding to each white balance color temperature detection weight from a storage device.

在另一些可选地实施例中,所述确定每一所述白平衡色温检测权重对应的插值率,包括:In some other optional embodiments, determining the interpolation rate corresponding to each of the white balance color temperature detection weights includes:

确定目标色温传感器检测到的环境信息对应的第二白平衡点;确定每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离;根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的插值率。Determine a second white balance point corresponding to the environmental information detected by the target color temperature sensor; determine the distance between the first white balance point corresponding to each of the white balance color temperature detection weights and the second white balance point; and determine an interpolation rate corresponding to each of the white balance color temperature detection weights based on the distance between the first white balance point corresponding to each of the white balance color temperature detection weights and the second white balance point.

其中,若目标白平衡点用于对第一色温传感器的检测方向对应的图像进行处理,第二白平衡点例如可以是基于第一色温传感器采集到的环境信息确定的。若目标白平衡点用于对第二色温传感器的检测方向对应的图像进行处理,第二白平衡点例如可以是基于第二色温传感器采集到的环境信息确定的。Wherein, if the target white balance point is used to process the image corresponding to the detection direction of the first color temperature sensor, the second white balance point may be determined based on the environmental information collected by the first color temperature sensor, for example. If the target white balance point is used to process the image corresponding to the detection direction of the second color temperature sensor, the second white balance point may be determined based on the environmental information collected by the second color temperature sensor, for example.

可选地,第一白平衡点与第二白平衡点间的距离可以是通过第一白平衡点与第二白平衡点分别对应的白平衡坐标确定的,例如可以构建一个坐标系,该坐标系的横轴例如可以是R/G,纵轴例如可以是B/G,进而可以基于两个白平衡点的坐标计算两者之间的距离。Optionally, the distance between the first white balance point and the second white balance point may be determined by white balance coordinates corresponding to the first white balance point and the second white balance point, respectively. For example, a coordinate system may be constructed, the horizontal axis of the coordinate system may be, for example, R/G, and the vertical axis may be, for example, B/G, and then the distance between the two white balance points may be calculated based on the coordinates of the two white balance points.

需要解释的是,所述第二白平衡点可以理解为实际白平衡点或真实白平衡点。It should be explained that the second white balance point can be understood as an actual white balance point or a real white balance point.

采用上述方案,通过确定每一白平衡色温检测权重对应的第一白平衡点以及各个第一白平衡点与第二白平衡点对应的距离,进而可以基于每一白平衡色温检测权重对应的距离准确地确定各个白平衡色温检测权重对应的插值率。By adopting the above scheme, by determining the first white balance point corresponding to each white balance color temperature detection weight and the distance between each first white balance point and the second white balance point, the interpolation rate corresponding to each white balance color temperature detection weight can be accurately determined based on the distance corresponding to each white balance color temperature detection weight.

在一些实施例中,所述根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的插值率包括:In some embodiments, determining the interpolation rate corresponding to each white balance color temperature detection weight according to the distance between the first white balance point and the second white balance point corresponding to each white balance color temperature detection weight includes:

根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的距离权重;Determining a distance weight corresponding to each of the white balance color temperature detection weights according to a distance between a first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights;

根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率。An interpolation rate corresponding to each white balance color temperature detection weight is determined according to each white balance color temperature detection weight, a distance corresponding to each white balance color temperature detection weight, and a distance weight corresponding to each white balance color temperature detection weight.

其中,距离与该距离对应的距离权重可以是通过查表确定的,例如,当距离为0的时候,该距离对应的距离权重可以为1,当距离大于或等于预设距离阈值时,该距离对应的距离权重可以为0,在距离小于该预设阈值,且大于零时,距离与该距离对应的距离权重可以负相关。Among them, the distance and the distance weight corresponding to the distance can be determined by looking up a table. For example, when the distance is 0, the distance weight corresponding to the distance can be 1. When the distance is greater than or equal to a preset distance threshold, the distance weight corresponding to the distance can be 0. When the distance is less than the preset threshold and greater than zero, the distance and the distance weight corresponding to the distance can be negatively correlated.

采用上述方案,通过确定各个距离对应的距离权重,并结合个白平衡色温检测权重以及对应的各个距离,能够准确地确定每一白平衡色温检测权重对应的插值率,进而能够准确地基于该插值率确定目标白平衡点,有效地提高了目标白平衡点的准确性,进而避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by determining the distance weight corresponding to each distance, and combining the white balance color temperature detection weight and the corresponding distance, the interpolation rate corresponding to each white balance color temperature detection weight can be accurately determined, and then the target white balance point can be accurately determined based on the interpolation rate, which effectively improves the accuracy of the target white balance point and avoids the problem of misjudgment of white balance color temperature in scenes with large areas of pure color and misleading color light sources.

可选地,根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率,包括:Optionally, determining an interpolation rate corresponding to each white balance color temperature detection weight according to each white balance color temperature detection weight, a distance corresponding to each white balance color temperature detection weight, and a distance weight corresponding to each white balance color temperature detection weight includes:

确定每一所述白平衡色温检测权重、与对应的距离以及对应的距离权重的乘积,得到每一所述白平衡检测参数对应的插值参数;Determine the product of each white balance color temperature detection weight, the corresponding distance, and the corresponding distance weight, to obtain an interpolation parameter corresponding to each white balance detection parameter;

根据每一所述白平衡色温检测权重对应的插值参数以及所有白平衡色温检测权重对应的差值参数的和值,确定每一白平衡色温检测权重对应的插值率。The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the interpolation parameter corresponding to each white balance color temperature detection weight and the sum of the difference parameters corresponding to all white balance color temperature detection weights.

可选地,根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率,包括:Optionally, determining an interpolation rate corresponding to each white balance color temperature detection weight according to each white balance color temperature detection weight, a distance corresponding to each white balance color temperature detection weight, and a distance weight corresponding to each white balance color temperature detection weight includes:

根据以下公式,确定每一所述白平衡色温检测权重对应的插值率:The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the following formula:

其中,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,Distj表示第j个白平衡色温检测权重与所述第二白平衡点间的距离,Confj表示第j个白平衡色温检测权重对应的距离权重,Pj表示第j个白平衡色温检测权重;Disti表示第i个白平衡色温检测权重与所述第二白平衡点间的距离,Confi表示第i个白平衡色温检测权重对应的距离权重,Pi表示第i个白平衡色温检测权重,n表示白平衡色温检测权重的数量减一。Among them, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, Dist j represents the distance between the j-th white balance color temperature detection weight and the second white balance point, Conf j represents the distance weight corresponding to the j-th white balance color temperature detection weight, and P j represents the j-th white balance color temperature detection weight; Dist i represents the distance between the ith white balance color temperature detection weight and the second white balance point, Conf i represents the distance weight corresponding to the ith white balance color temperature detection weight, Pi represents the ith white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights minus one.

可以理解的是,j可以是小于等于n的任意自然数。示例地,上述至少一个白平衡色温检测权重可以包括五个基于环境辅助信息中的不同信息确定得到的白平衡色温检测权重,例如P0、P1、P2、P3、P4。此时,n可以是4,j可以为0、1、2、3、4中的任意一个数值。It is understandable that j can be any natural number less than or equal to n. For example, the at least one white balance color temperature detection weight can include five white balance color temperature detection weights determined based on different information in the environmental auxiliary information, such as P0, P1, P2, P3, and P4. At this time, n can be 4, and j can be any value of 0, 1, 2, 3, and 4.

采用上述方案,能够准确地确定每一白平衡色温检测权重占整体权重的占比,进而能够基于每一白平衡色温检测权重占整体权重的占比更加准确地确定每一白平衡色温检测权重对应的插值率,进而可以确定更加准确的确定得到目标白平衡点。By adopting the above scheme, the proportion of each white balance color temperature detection weight in the overall weight can be accurately determined, and then the interpolation rate corresponding to each white balance color temperature detection weight can be more accurately determined based on the proportion of each white balance color temperature detection weight in the overall weight, and then the target white balance point can be determined more accurately.

可选地,所述根据每一所述白平衡色温检测权重对应的第一白平衡点,以及每一所述白平衡色温检测权重对应的插值率,确定所述目标白平衡点,包括:Optionally, determining the target white balance point according to the first white balance point corresponding to each of the white balance color temperature detection weights and the interpolation rate corresponding to each of the white balance color temperature detection weights includes:

根据以下公式,确定所述目标白平衡点:The target white balance point is determined according to the following formula:

其中,FinalR/G_B/G表示所述目标白平衡点,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,PiR/G_B/G表示第j个白平衡色温检测权重对应的第一白平衡点,n表示白平衡色温检测权重的数量。Among them, FinalR/G_B/G represents the target white balance point, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, PiR /G_B/G represents the first white balance point corresponding to the j-th white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights.

示例地,上述至少一个白平衡色温检测权重可以包括五个基于环境辅助信息中的不同信息确定得到的白平衡色温检测权重,例如P0、P1、P2、P3、P4。此时,n可以是4,j可以为0、1、2、3、4中的任意一个数值。For example, the at least one white balance color temperature detection weight may include five white balance color temperature detection weights determined based on different information in the environmental auxiliary information, such as P0, P1, P2, P3, and P4. In this case, n may be 4, and j may be any value of 0, 1, 2, 3, and 4.

采用上述方案,通过确定每一白平衡色温检测权重对应的插值率以及每一白平衡色温检测权重对应的第一白平衡点,能够准确地基于插值率结合各个白平衡色温检测权重对应的白平衡点,能够准确地得到结合了多向色温传感器的不同信息的目标白平衡点,有效地提高了目标白平衡点的准确性,进而有效地避免了较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by determining the interpolation rate corresponding to each white balance color temperature detection weight and the first white balance point corresponding to each white balance color temperature detection weight, the white balance points corresponding to each white balance color temperature detection weight can be accurately combined based on the interpolation rate, and the target white balance point combined with different information of the multi-directional color temperature sensor can be accurately obtained, thereby effectively improving the accuracy of the target white balance point, and effectively avoiding the problem of white balance color temperature misjudgment in scenes with large areas of pure color and misleading color light sources.

在一些实施例中,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:In some embodiments, determining at least one white balance color temperature detection weight according to the environmental auxiliary information includes:

根据第一映射关系表,确定所述辅助相关色温以及所述辅助红外信息对应的第一权重;所述第一映射关系表是根据相关色温以及红外信息与所述目标场景的匹配关系确定的。According to the first mapping relationship table, the first weights corresponding to the auxiliary correlated color temperature and the auxiliary infrared information are determined; the first mapping relationship table is determined according to the matching relationship between the correlated color temperature and the infrared information and the target scene.

值得说明的是,相关色温与红外信息满足一定的匹配关系,例如低色温场景通常伴随着较低的IRRATIO,高色温场景则对应较高的IRRATIO。也即是说,在相关色温与红外信息匹配度较高时,则可以说明环境辅助信息对应的场景为目标场景的可能性较低,在相关色温与红外信息匹配度较低时,则可以说明环境辅助信息对应的场景为目标场景的可能性较高。It is worth noting that the correlated color temperature and infrared information satisfy a certain matching relationship. For example, low color temperature scenes are usually accompanied by lower IRRATIO, while high color temperature scenes correspond to higher IRRATIO. In other words, when the correlated color temperature and infrared information match highly, it can be said that the scene corresponding to the environmental auxiliary information is less likely to be the target scene. When the correlated color temperature and infrared information match less, it can be said that the scene corresponding to the environmental auxiliary information is more likely to be the target scene.

示例地,参照图2所示的第一映射关系表的示意图,该第一映射关系表可以如图2所示,在辅助相关色温CCT较低且辅助红外信息IRRATIO也较低时,第一权重的值可以处于高权重区间,即P0的值可以处于High P0 Area1;在辅助相关色温CCT较高且辅助红外信息IRRATIO也较高时,第一权重的值可以处于高权重区间,即P0的值可以处于High P0 Area2;在辅助相关色温CCT较高而辅助红外信息IRRATIO较低时,第一权重的值可以处于低权重区间,即P0的值可以处于Low P0 Area1;在辅助相关色温CCT较低而辅助红外信息IRRATIO较高时,第一权重的值可以处于低权重区间,即P0的值可以处于Low P0 Area2。其中,不同辅助相关色温以及辅助红外信息对应的第一权重P0的具体大小可以根据实际情况进行标定,本公开实施例对此不作限定。For example, referring to the schematic diagram of the first mapping relationship table shown in FIG2, the first mapping relationship table may be as shown in FIG2, when the auxiliary correlated color temperature CCT is low and the auxiliary infrared information IRRATIO is also low, the value of the first weight may be in the high weight interval, that is, the value of P0 may be in High P0 Area1; when the auxiliary correlated color temperature CCT is high and the auxiliary infrared information IRRATIO is also high, the value of the first weight may be in the high weight interval, that is, the value of P0 may be in High P0 Area2; when the auxiliary correlated color temperature CCT is high and the auxiliary infrared information IRRATIO is low, the value of the first weight may be in the low weight interval, that is, the value of P0 may be in Low P0 Area1; when the auxiliary correlated color temperature CCT is low and the auxiliary infrared information IRRATIO is high, the value of the first weight may be in the low weight interval, that is, the value of P0 may be in Low P0 Area2. Among them, the specific size of the first weight P0 corresponding to different auxiliary correlated color temperatures and auxiliary infrared information can be calibrated according to actual conditions, and the embodiments of the present disclosure are not limited to this.

采用上述方案,通过预先确定第一映射关系表,能够有效地根据辅助相关色温以及辅助红外信息确定与其对应的第一权重,进而得到一个能够可靠表征环境辅助信息中的辅助相关色温以及辅助红外信息对应的场景为目标场景的置信度的一个白平衡色温检测权重,并可以基于该白平衡色温检测权重准确地确定目标白平衡点,以避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by predetermining the first mapping relationship table, the first weight corresponding to the auxiliary correlated color temperature and the auxiliary infrared information can be effectively determined, thereby obtaining a white balance color temperature detection weight that can reliably characterize the confidence that the scene corresponding to the auxiliary correlated color temperature in the environmental auxiliary information and the auxiliary infrared information is the target scene, and the target white balance point can be accurately determined based on the white balance color temperature detection weight to avoid the problem of white balance color temperature misjudgment in scenes with large areas of pure color and misleading color light sources.

在一些实施例中,所述根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:In some embodiments, determining at least one white balance color temperature detection weight according to the environmental auxiliary information includes:

根据第二映射关系表,确定所述辅助相关色温对应的第二权重;所述第二映射关系表是根据相关色温与所述目标场景的匹配关系确定的。According to the second mapping relationship table, a second weight corresponding to the auxiliary correlated color temperature is determined; the second mapping relationship table is determined according to a matching relationship between the correlated color temperature and the target scene.

值得说明的是,由于相关色温与纯色(Pure)场景或者混淆色(Confusion)场景存在着一定的逆向反比关系,即纯色或混淆色的白平衡色温检测值往往远离真实输出的相关色温,基于此则可以相关色温与目标场景的匹配关系标定该第二映射关系表。示例地,与该辅助相关色温对应的白平衡色温检测权重可以依据该第二映射关系表,根据相关色温与目标场景的匹配关系进行调整。示例地,辅助相关色温越高,第二权重P1的值可以越低,辅助相关色温越低,第二权重P1的值可以越高。It is worth noting that, since there is a certain inverse relationship between the correlated color temperature and the pure color scene or the confused color scene, that is, the white balance color temperature detection value of the pure color or the confused color is often far away from the correlated color temperature of the actual output, based on this, the second mapping relationship table can be calibrated according to the matching relationship between the correlated color temperature and the target scene. For example, the white balance color temperature detection weight corresponding to the auxiliary correlated color temperature can be adjusted according to the matching relationship between the correlated color temperature and the target scene based on the second mapping relationship table. For example, the higher the auxiliary correlated color temperature, the lower the value of the second weight P1 can be, and the lower the auxiliary correlated color temperature, the higher the value of the second weight P1 can be.

采用上述方案,通过预先确定第二映射关系表,并基于该第二映射关系表以及辅助相关色温,能够确定可以可靠表征环境辅助信息中的辅助相关色温对应的场景为目标场景的置信度的一个白平衡色温检测权重,并可以基于该白平衡色温检测权重准确地确定目标白平衡点,以避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by predetermining the second mapping relationship table, and based on the second mapping relationship table and the auxiliary correlated color temperature, a white balance color temperature detection weight that can reliably characterize the confidence that the scene corresponding to the auxiliary correlated color temperature in the environmental auxiliary information is the target scene can be determined, and the target white balance point can be accurately determined based on the white balance color temperature detection weight to avoid the problem of misjudgment of white balance color temperature in scenes with large areas of pure color and misleading color light sources.

在一些实施例中,所述根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:In some embodiments, determining at least one white balance color temperature detection weight according to the environmental auxiliary information includes:

获取场景亮度信息;根据第三映射关系表,确定所述辅助亮度信息对应的目标亮度信息与所述场景亮度信息的第一偏差值,所述第三映射关系表是根据辅助亮度信息与目标场景亮度的匹配关系确定的;根据所述第一偏差值,确定第三权重。Obtain scene brightness information; determine a first deviation value between the target brightness information corresponding to the auxiliary brightness information and the scene brightness information according to a third mapping relationship table, wherein the third mapping relationship table is determined based on a matching relationship between the auxiliary brightness information and the target scene brightness; determine a third weight according to the first deviation value.

其中,场景亮度信息可以通过亮度计采集的。示例地,第三映射关系表可以如表1所示:The scene brightness information may be collected by a brightness meter. For example, the third mapping relationship table may be as shown in Table 1:

辅助亮度信息LVAuxiliary brightness information LV 目标亮度信息LuxTarget brightness information Lux 辅助亮度信息LVAuxiliary brightness information LV 目标亮度信息LuxTarget brightness information Lux 11 0.90.9 1010 460.8460.8 22 1.81.8 1111 921.6921.6 33 3.63.6 1212 1843.21843.2 44 7.27.2 1313 3686.43686.4 55 14.414.4 1414 7372.77372.7 66 28.828.8 1515 14745.614745.6 77 57.657.6 1616 29491.229491.2 88 115.2115.2 1717 58982.458982.4 99 230.4230.4 1818 117964.8117964.8

表1Table 1

其中,辅助亮度信息对应的单位可以是Lv,其可以表示单位面积上发光强度,目标亮度信息对应的单位可以是Lux,即勒克斯。The unit corresponding to the auxiliary brightness information may be Lv, which may represent the luminous intensity per unit area, and the unit corresponding to the target brightness information may be Lux, i.e., lux.

示例地,可以通过判断当前环境场景亮度信息与辅助亮度信息是否一致,确定白平衡色温检测的对应权重P2,对于不一致场景,有可能是误导色温判断,因而可以降低第三权重P2,偏离当前表1的色温判断极有可能是被纯色或混淆色所误导的白平衡结果,需降低其对应的第三权重P2。For example, the corresponding weight P2 of the white balance color temperature detection can be determined by judging whether the current environment scene brightness information is consistent with the auxiliary brightness information. For inconsistent scenes, the color temperature judgment may be misleading, so the third weight P2 can be reduced. The color temperature judgment that deviates from the current Table 1 is very likely to be a white balance result misled by pure color or mixed color, and its corresponding third weight P2 needs to be reduced.

例如,在辅助亮度信息为10的情况下,目标亮度信息为460.8,若场景亮度信息的值为460.8,即第一偏差值为0,则该第三权重P2的值可以为1,若场景亮度信息不为460.8,则场景亮度信息与460.8的差距越大,即第一偏差值越大,第三权重P2的值越低,直至该P2的值为0。For example, when the auxiliary brightness information is 10, the target brightness information is 460.8. If the value of the scene brightness information is 460.8, that is, the first deviation value is 0, then the value of the third weight P2 can be 1. If the scene brightness information is not 460.8, the greater the difference between the scene brightness information and 460.8, that is, the greater the first deviation value, the lower the value of the third weight P2, until the value of P2 is 0.

采用上述方案,通过获取场景亮度信息并基于第三映射关系表,确定辅助亮度信息对应的目标亮度信息与场景亮度信息的第一偏差值,并基于该第一偏差值准确的确定一个能够可靠表征环境辅助信息中的辅助亮度信息对应的场景为目标场景的置信度的一个白平衡色温检测权重,并可以基于该白平衡色温检测权重准确地确定目标白平衡点,以避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by acquiring the scene brightness information and determining the first deviation value between the target brightness information corresponding to the auxiliary brightness information and the scene brightness information based on the third mapping relationship table, and based on the first deviation value, accurately determining a white balance color temperature detection weight that can reliably characterize the confidence that the scene corresponding to the auxiliary brightness information in the environmental auxiliary information is the target scene, and the target white balance point can be accurately determined based on the white balance color temperature detection weight to avoid the problem of white balance color temperature misjudgment in scenes with large areas of pure color and misleading color light sources.

在一些实施例中,所述根据所述环境辅助信息,确定白平衡色温检测权重,包括:In some embodiments, determining the white balance color temperature detection weight according to the environmental auxiliary information includes:

根据预设置信曲线,确定所述辅助环境白点对应的权重置信度;根据所述权重置信度,确定第四权重;所述预设置信曲线是根据异常白平衡点与正常白平衡点的偏差设置的。According to a preset confidence curve, the weighted confidence corresponding to the auxiliary environmental white point is determined; according to the weighted confidence, a fourth weight is determined; the preset confidence curve is set according to the deviation between the abnormal white balance point and the normal white balance point.

其中,正常白平横点与异常白平衡点可以是相关工作人员根据图像处理的效果预先标定得到的,正常白平衡点例如可以是非目标场景下确定得到的白平衡点,对于图像的处理效果能够满足要求,异常白平衡点可以是在目标场景下确定得到的白平衡点,对于图像的处理效果无法满足要求。显然,正常白平衡点与异常白平衡点存在着一定的偏差,因此通过设置预设置信曲线Weight Curve可以有效筛选正确白平衡区域,可以有效地降低纯色或混淆色场景下的第四权重P3。Among them, the normal white balance point and the abnormal white balance point can be pre-calibrated by relevant staff according to the effect of image processing. The normal white balance point can be, for example, a white balance point determined in a non-target scene, which can meet the requirements for the image processing effect. The abnormal white balance point can be a white balance point determined in a target scene, which cannot meet the requirements for the image processing effect. Obviously, there is a certain deviation between the normal white balance point and the abnormal white balance point. Therefore, by setting the preset signal curve Weight Curve, the correct white balance area can be effectively screened, and the fourth weight P3 in the pure color or mixed color scene can be effectively reduced.

示例地,图3是根据一示例性实施例示出的一种预设置信曲线的示意图,参照图3,该预设置信曲线Weight Curve处于坐标系中,该坐标系的横轴为R/G,纵轴为B/G,在辅助环境白点处于预设置信曲线Weight Curve与横轴构成的区间内的情况下,该第四权重P3的值较高,在辅助环境白点处于预设置信曲线Weight Curve与横轴构成的区间外的情况下,P3的值可以较低。本公开对各个辅助环境白点对应的第四权重P3的具体取值不作限定。For example, FIG3 is a schematic diagram of a preset signal curve according to an exemplary embodiment. Referring to FIG3, the preset signal curve Weight Curve is in a coordinate system, the horizontal axis of the coordinate system is R/G, and the vertical axis is B/G. When the auxiliary environment white point is within the interval formed by the preset signal curve Weight Curve and the horizontal axis, the value of the fourth weight P3 is high. When the auxiliary environment white point is outside the interval formed by the preset signal curve Weight Curve and the horizontal axis, the value of P3 can be low. The present disclosure does not limit the specific value of the fourth weight P3 corresponding to each auxiliary environment white point.

采用上述方案,通过设置预设置信曲线,并基于辅助环境白点以及该预设置信曲线,可以准确地确定一个能够可靠表征环境辅助信息中的辅助环境白点对应的场景为目标场景的置信度的一个白平衡色温检测权重,并可以基于该白平衡色温检测权重准确地确定目标白平衡点,以避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, by setting a preset signal curve, and based on the auxiliary ambient white point and the preset signal curve, a white balance color temperature detection weight that can reliably characterize the confidence that the scene corresponding to the auxiliary ambient white point in the environmental auxiliary information is the target scene can be accurately determined, and the target white balance point can be accurately determined based on the white balance color temperature detection weight to avoid the problem of white balance color temperature misjudgment in scenes with large areas of pure color and misleading color light sources.

在一些实施例中,所述根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:In some embodiments, determining at least one white balance color temperature detection weight according to the environmental auxiliary information includes:

根据所述辅助相关色温以及辅助红外信息,确定与黑体辐射曲线的第二偏差值;根据所述第二偏差值,确定第五权重。A second deviation value from a blackbody radiation curve is determined according to the auxiliary correlated color temperature and the auxiliary infrared information; and a fifth weight is determined according to the second deviation value.

其中,基于辅助相关色温及辅助红外信息可以推导出其与黑体辐射曲线(BlackBody Curve)的偏差DUV,该DUV则可以是上述的第二偏差值,通过DUV即第二偏差值,则可以确定该第五权重P4。Among them, based on the auxiliary correlated color temperature and the auxiliary infrared information, the deviation DUV from the black body radiation curve (BlackBody Curve) can be derived, and the DUV can be the above-mentioned second deviation value. Through the DUV, that is, the second deviation value, the fifth weight P4 can be determined.

图4是根据一示例性实施例示出的一种第五权重与第二偏差值的映射关系示意图,如图4所示,在第二偏差值即DUV小于70/-50时,第五权重P4的值可以为预设最大值,例如可以是1,在DUV大于70/-50时,第五权重P4的值可以与DUV的大小负相关,直至第五权重P4为0。示例地,可以是在第二偏差值即DUV等于90/-70时,第五权重P4为0。FIG4 is a schematic diagram showing a mapping relationship between a fifth weight and a second deviation value according to an exemplary embodiment. As shown in FIG4 , when the second deviation value, i.e., DUV, is less than 70/-50, the value of the fifth weight P4 may be a preset maximum value, such as 1. When DUV is greater than 70/-50, the value of the fifth weight P4 may be negatively correlated with the size of DUV until the fifth weight P4 is 0. For example, when the second deviation value, i.e., DUV, is equal to 90/-70, the fifth weight P4 is 0.

在一些实施例中,根据所述多向环境信息确定至少一个置信参数,包括:In some embodiments, determining at least one confidence parameter based on the multi-directional environmental information includes:

根据所述目标色温传感器与其他色温传感器检测到的环境色温差异确定第一置信参数;和/或,根据所述目标色温传感器与其他色温传感器检测到的环境白点差异确定第二置信参数;和/或,根据所述目标色温传感器与其他色温传感器检测到的环境红外差异确定第三置信参数;和/或,根据所述目标色温传感器与其他色温传感器检测到的环境亮度差异确定第四置信参数;和/或,根据所述目标色温传感器检测到的环境信息的时域连续性确定第五置信参数;和/或,根据所述目标色温传感器检测到的环境信息与所述目标场景匹配程度确定第五置信参数。A first confidence parameter is determined based on the difference in ambient color temperature detected by the target color temperature sensor and other color temperature sensors; and/or, a second confidence parameter is determined based on the difference in ambient white point detected by the target color temperature sensor and other color temperature sensors; and/or, a third confidence parameter is determined based on the difference in ambient infrared detected by the target color temperature sensor and other color temperature sensors; and/or, a fourth confidence parameter is determined based on the difference in ambient brightness detected by the target color temperature sensor and other color temperature sensors; and/or, a fifth confidence parameter is determined based on the temporal continuity of ambient information detected by the target color temperature sensor; and/or, a fifth confidence parameter is determined based on the degree of matching between the ambient information detected by the target color temperature sensor and the target scene.

示例地,第一置信参数可以与目标色温传感器和其他色温传感器检测到的环境色温差异的最大值正相关。例如,环境色温差异的最大值越大,第一置信参数越大;或者,在环境色温差异大于或等于预设阈值的情况下,该第一置信参数为1,在环境色温差异小于预设阈值的情况下第一置信参数与环境色温差异线性相关。第二置信参数、第三置信参数、第四置信参数、第五置信参数同理,此处不作赘述。For example, the first confidence parameter may be positively correlated with the maximum value of the difference in ambient color temperature detected by the target color temperature sensor and the other color temperature sensors. For example, the larger the maximum value of the difference in ambient color temperature, the larger the first confidence parameter; or, when the difference in ambient color temperature is greater than or equal to a preset threshold, the first confidence parameter is 1, and when the difference in ambient color temperature is less than the preset threshold, the first confidence parameter is linearly correlated with the difference in ambient color temperature. The second confidence parameter, the third confidence parameter, the fourth confidence parameter, and the fifth confidence parameter are similar and will not be described in detail here.

采用上述方案,能够基于目标色温传感器与其他色温传感器所检测到的信息的差异,以及所检测到的信息的时域连续性,准确地确定各个置信参数,进而能够基于这些置信参数,准确地判断是否需要进行多向白平衡,以避免较大面积纯色及误导色光源场景的白平衡色温错判问题。By adopting the above scheme, each confidence parameter can be accurately determined based on the difference between the information detected by the target color temperature sensor and other color temperature sensors, and the time domain continuity of the detected information. Then, based on these confidence parameters, it can be accurately judged whether multi-directional white balancing is needed to avoid the problem of misjudgment of white balance color temperature in scenes with large areas of pure color and misleading color light sources.

图5是根据一示例性实施例示出的一种图像方法的流程图,该方法的执行主体可以是手机,该手机可以配置前置色温传感器以及后置色温传感器,如图5所示,该方法可以包括:FIG5 is a flow chart of an image method according to an exemplary embodiment. The execution subject of the method may be a mobile phone, and the mobile phone may be configured with a front color temperature sensor and a rear color temperature sensor. As shown in FIG5 , the method may include:

S501、响应于第一图像的获取指令,获取双向环境信息,双向环境信息包括第一色温传感器以及第二色温传感器分别检测到的环境信息,第一色温传感器与第二色温传感器的检测方向不同。S501. In response to an instruction to obtain a first image, obtain bidirectional environmental information, where the bidirectional environmental information includes environmental information detected by a first color temperature sensor and a second color temperature sensor, respectively, and the first color temperature sensor and the second color temperature sensor have different detection directions.

S502、确定六个置信参数P0-P5。S502: Determine six confidence parameters P0-P5.

S503、根据置信参数P0-P5以及帕累托最优前沿面多目标搜索策略确定前置色温传感器与后置色温传感器的输出权重W1与W2。S503 , determining output weights W1 and W2 of the front color temperature sensor and the rear color temperature sensor according to confidence parameters P0-P5 and the Pareto optimal frontier multi-objective search strategy.

S504、根据W1和W2生成环境辅助信息New(CCT、LV、IRRATIO、R/G、B/G)。S504 , generate environmental auxiliary information New (CCT, LV, IRRATIO, R/G, B/G) according to W1 and W2 .

S505、基于环境辅助信息,生成五个白平衡色温检测权重P0-P4。S505 : Generate five white balance color temperature detection weights P0-P4 based on the environmental auxiliary information.

需要解释的是,环境辅助信息是根据环境信息进行加权计算得到。可以理解的是,辅助相关色温、辅助红外信息、辅助亮度信息以及辅助环境白点分别与相关色温、红外信息、亮度信息以及环境白点有关。辅助相关色温、辅助红外信息、辅助亮度信息以及辅助环境白点分别将相关色温、红外信息、亮度信息以及环境白点分别与对应的加权系数进行加权计算得到。It should be explained that the auxiliary environmental information is obtained by weighted calculation based on the environmental information. It can be understood that the auxiliary correlated color temperature, auxiliary infrared information, auxiliary brightness information and auxiliary ambient white point are respectively related to the correlated color temperature, infrared information, brightness information and ambient white point. The auxiliary correlated color temperature, auxiliary infrared information, auxiliary brightness information and auxiliary ambient white point are respectively obtained by weighted calculation of the correlated color temperature, infrared information, brightness information and ambient white point with the corresponding weighting coefficients.

S506、基于白平衡色温检测权重P0-P4确定当前环境的目标白平衡点。S506 : Determine the target white balance point of the current environment based on the white balance color temperature detection weights P0 - P4 .

S507、根据目标白平衡点对所述第一图像进行处理,得到目标图像。S507: Process the first image according to the target white balance point to obtain a target image.

其中,上述各个步骤的具体可选实施方式可以参见上述其他实施例的可选实施方式,此处不再赘述。Among them, the specific optional implementation methods of the above-mentioned steps can refer to the optional implementation methods of other embodiments mentioned above, and will not be repeated here.

基于相同的发明构思,图6是根据一示例性实施例示出的一种图像处理装置的框图。参照图6,该图像处理装置60包括:Based on the same inventive concept, FIG6 is a block diagram of an image processing device according to an exemplary embodiment. Referring to FIG6 , the image processing device 60 includes:

获取模块61,被配置为响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;An acquisition module 61 is configured to acquire the first image and multi-directional environmental information in response to an acquisition instruction of the first image, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction;

第一确定模块62,被配置为根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;A first determination module 62 is configured to determine, based on the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image;

第二确定模块63,被配置为在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;A second determination module 63 is configured to determine a target white balance point according to the multi-directional environment information when it is determined that the confidence value is greater than a preset confidence threshold;

处理模块64,被配置为根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The processing module 64 is configured to process the first image according to the target white balance point to obtain a target image.

可选地,第一确定模块62,被配置为:Optionally, the first determining module 62 is configured to:

根据所述多向环境信息确定至少一个置信参数,不同的置信参数是根据所述多向环境信息中不同子信息确定的;Determining at least one confidence parameter according to the multi-directional environmental information, where different confidence parameters are determined according to different sub-information in the multi-directional environmental information;

根据每一所述置信参数分别对应的预设置信权重对所述置信参数加权,得到所述置信值。The confidence parameters are weighted according to the preset confidence weights corresponding to each of the confidence parameters to obtain the confidence values.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

基于所述置信参数,确定每一所述色温传感器分别对应的输出权重;Based on the confidence parameter, determining an output weight corresponding to each of the color temperature sensors;

根据所述输出权重以及所述多向环境信息,确定环境辅助信息;Determining environmental auxiliary information according to the output weight and the multi-directional environmental information;

根据所述环境辅助信息,确定所述目标白平衡点。The target white balance point is determined according to the environmental auxiliary information.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据所述环境辅助信息,确定至少一个白平衡色温检测权重,不同的白平衡色温检测权重是根据所述环境辅助信息中不同子信息确定的;Determine at least one white balance color temperature detection weight according to the environmental auxiliary information, where different white balance color temperature detection weights are determined according to different sub-information in the environmental auxiliary information;

根据所述白平衡色温检测权重,确定所述目标白平衡点。The target white balance point is determined according to the white balance color temperature detection weight.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

确定每一所述白平衡色温检测权重对应的第一白平衡点;Determine a first white balance point corresponding to each of the white balance color temperature detection weights;

确定每一所述白平衡色温检测权重对应的插值率;Determining an interpolation rate corresponding to each of the white balance color temperature detection weights;

根据每一所述白平衡色温检测权重对应的第一白平衡点,以及每一所述白平衡色温检测权重对应的插值率,确定所述目标白平衡点。The target white balance point is determined according to the first white balance point corresponding to each of the white balance color temperature detection weights and the interpolation rate corresponding to each of the white balance color temperature detection weights.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

确定目标色温传感器检测到的环境信息对应的第二白平衡点;Determine a second white balance point corresponding to the environmental information detected by the target color temperature sensor;

确定每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离;Determine the distance between the first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights;

根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的距离权重;Determining a distance weight corresponding to each of the white balance color temperature detection weights according to a distance between a first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights;

根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率。An interpolation rate corresponding to each white balance color temperature detection weight is determined according to each white balance color temperature detection weight, a distance corresponding to each white balance color temperature detection weight, and a distance weight corresponding to each white balance color temperature detection weight.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

确定每一所述白平衡色温检测权重、与对应的距离以及对应的距离权重的乘积,得到每一所述白平衡检测参数对应的插值参数;Determine the product of each white balance color temperature detection weight, the corresponding distance, and the corresponding distance weight, to obtain an interpolation parameter corresponding to each white balance detection parameter;

根据每一所述白平衡色温检测权重对应的插值参数以及所有白平衡色温检测权重对应的差值参数的和值,确定每一白平衡色温检测权重对应的插值率。The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the interpolation parameter corresponding to each white balance color temperature detection weight and the sum of the difference parameters corresponding to all white balance color temperature detection weights.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据以下公式,确定每一所述白平衡色温检测权重对应的插值率:The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the following formula:

其中,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,Distj表示第j个白平衡色温检测权重与所述第二白平衡点间的距离,Confj表示第j个白平衡色温检测权重对应的距离权重,Pj表示第j个白平衡色温检测权重;Disti表示第i个白平衡色温检测权重与所述第二白平衡点间的距离,Confi表示第i个白平衡色温检测权重对应的距离权重,Pi表示第i个白平衡色温检测权重,n表示白平衡色温检测权重的数量。Among them, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, Dist j represents the distance between the j-th white balance color temperature detection weight and the second white balance point, Conf j represents the distance weight corresponding to the j-th white balance color temperature detection weight, and P j represents the j-th white balance color temperature detection weight; Dist i represents the distance between the ith white balance color temperature detection weight and the second white balance point, Conf i represents the distance weight corresponding to the ith white balance color temperature detection weight, Pi represents the ith white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据以下公式,确定所述目标白平衡点:The target white balance point is determined according to the following formula:

其中,FinalR/G_B/G表示所述目标白平衡点,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,PiR/G_B/G表示第j个白平衡色温检测权重对应的第一白平衡点,n表示白平衡色温检测权重的数量。Among them, FinalR/G_B/G represents the target white balance point, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, PiR /G_B/G represents the first white balance point corresponding to the j-th white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights.

可选地,所述环境信息包括以下一者或多者:环境相关色温、亮度信息、红外信息以及环境白点;Optionally, the environmental information includes one or more of the following: environmental correlated color temperature, brightness information, infrared information, and environmental white point;

所述环境辅助信息包括以下一者或多者:The environmental auxiliary information includes one or more of the following:

辅助相关色温、辅助红外信息、辅助亮度信息以及辅助环境白点。Auxiliary correlated color temperature, auxiliary infrared information, auxiliary brightness information, and auxiliary ambient white point.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据第一映射关系表,确定所述辅助相关色温以及所述辅助红外信息对应的第一权重;Determine, according to the first mapping relationship table, a first weight corresponding to the auxiliary correlated color temperature and the auxiliary infrared information;

所述第一映射关系表是根据相关色温以及红外信息与所述目标场景的匹配关系确定的。The first mapping relationship table is determined according to the matching relationship between the correlated color temperature and infrared information and the target scene.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据第二映射关系表,确定所述辅助相关色温对应的第二权重;Determining a second weight corresponding to the auxiliary correlated color temperature according to a second mapping relationship table;

所述第二映射关系表是根据相关色温与所述目标场景的匹配关系确定的。The second mapping relationship table is determined according to a matching relationship between the correlated color temperature and the target scene.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

获取场景亮度信息;Get scene brightness information;

根据第三映射关系表,确定所述辅助亮度信息对应的目标亮度信息与所述场景亮度信息的第一偏差值,所述第三映射关系表是根据辅助亮度信息与目标场景亮度的匹配关系确定的;Determine, according to a third mapping relationship table, a first deviation value between the target brightness information corresponding to the auxiliary brightness information and the scene brightness information, wherein the third mapping relationship table is determined according to a matching relationship between the auxiliary brightness information and the target scene brightness;

根据所述第一偏差值,确定第三权重。A third weight is determined according to the first deviation value.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据预设置信曲线,确定所述辅助环境白点对应的权重置信度;Determining the weighted reliability corresponding to the auxiliary environment white point according to a preset reliability curve;

根据所述权重置信度,确定第四权重;Determining a fourth weight according to the weight confidence;

所述预设置信曲线是根据异常白平衡点与正常白平衡点的分布设置的。The preset white balance curve is set according to the distribution of abnormal white balance points and normal white balance points.

可选地,第二确定模块63,被配置为:Optionally, the second determining module 63 is configured to:

根据所述辅助相关色温以及辅助红外信息,确定与黑体辐射曲线的第二偏差值;Determining a second deviation value from a blackbody radiation curve according to the auxiliary correlated color temperature and the auxiliary infrared information;

根据所述第二偏差值,确定第五权重。A fifth weight is determined according to the second deviation value.

可选地,第一确定模块62,被配置为:Optionally, the first determining module 62 is configured to:

根据所述目标色温传感器与其他色温传感器检测到的环境色温差异确定第一置信参数;和/或,Determining a first confidence parameter according to a difference in ambient color temperature detected by the target color temperature sensor and other color temperature sensors; and/or,

根据所述目标色温传感器与其他色温传感器检测到的环境白点差异确定第二置信参数;和/或,Determining a second confidence parameter according to the difference in ambient white points detected by the target color temperature sensor and other color temperature sensors; and/or,

根据所述目标色温传感器与其他色温传感器检测到的环境红外差异确定第三置信参数;和/或,Determine a third confidence parameter according to the difference between the ambient infrared detected by the target color temperature sensor and other color temperature sensors; and/or,

根据所述目标色温传感器与其他色温传感器检测到的环境亮度差异确定第四置信参数;和/或,Determining a fourth confidence parameter according to a difference in ambient brightness detected by the target color temperature sensor and other color temperature sensors; and/or,

根据所述目标色温传感器检测到的环境信息的时域连续性确定第五置信参数;和/或,determining a fifth confidence parameter according to the temporal continuity of the environmental information detected by the target color temperature sensor; and/or,

根据所述目标色温传感器检测到的环境信息与所述目标场景匹配程度确定第五置信参数。A fifth confidence parameter is determined according to a matching degree between the environmental information detected by the target color temperature sensor and the target scene.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

本公开还提供一种计算机可读存储介质,其上存储有计算机程序指令,该程序指令被处理器执行时实现本公开提供的图像处理方法的步骤。The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image processing method provided by the present disclosure are implemented.

图7是根据一示例性实施例示出的一种用于图像处理的装置700的框图。例如,装置700可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 7 is a block diagram of a device 700 for image processing according to an exemplary embodiment. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

参照图7,装置700可以包括以下一个或多个组件:处理组件702,存储器704,电源组件706,多媒体组件708,音频组件710,输入/输出接口712,传感器组件714,以及通信组件716。7 , the apparatus 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input/output interface 712 , a sensor component 714 , and a communication component 716 .

处理组件702通常控制装置700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件702可以包括一个或多个处理器720来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件702可以包括一个或多个模块,便于处理组件702和其他组件之间的交互。例如,处理组件702可以包括多媒体模块,以方便多媒体组件708和处理组件702之间的交互。The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

存储器704被配置为存储各种类型的数据以支持在装置700的操作。这些数据的示例包括用于在装置700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器704可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

电源组件706为装置700的各种组件提供电力。电源组件706可以包括电源管理系统,一个或多个电源,及其他与为装置700生成、管理和分配电力相关联的组件。The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

多媒体组件708包括在所述装置700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件708包括一个前置摄像头和/或后置摄像头。当装置700处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and/or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

音频组件710被配置为输出和/或输入音频信号。例如,音频组件710包括一个麦克风(MIC),当装置700处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器704或经由通信组件716发送。在一些实施例中,音频组件710还包括一个扬声器,用于输出音频信号。The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

输入/输出接口712为处理组件702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The input/output interface 712 provides an interface between the processing component 702 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

传感器组件714包括一个或多个传感器,用于为装置700提供各个方面的状态评估。例如,传感器组件714可以检测到装置700的打开/关闭状态,组件的相对定位,例如所述组件为装置700的显示器和小键盘,传感器组件714还可以检测装置700或装置700一个组件的位置改变,用户与装置700接触的存在或不存在,装置700方位或加速/减速和装置700的温度变化。传感器组件714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open/closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration/deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件716被配置为便于装置700和其他设备之间有线或无线方式的通信。装置700可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件716经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件716还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器704,上述指令可由装置700的处理器720执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

上述装置除了可以是独立的电子设备外,也可是独立电子设备的一部分,例如在一种实施例中,该装置可以是集成电路(Integrated Circuit,IC)或芯片,其中该集成电路可以是一个IC,也可以是多个IC的集合;该芯片可以包括但不限于以下种类:GPU(GraphicsProcessing Unit,图形处理器)、CPU(Central Processing Unit,中央处理器)、FPGA(Field Programmable Gate Array,可编程逻辑阵列)、DSP(Digital Signal Processor,数字信号处理器)、ASIC(Application Specific Integrated Circuit,专用集成电路)、SOC(System on Chip,SoC,片上系统或系统级芯片)等。上述的集成电路或芯片中可以用于执行可执行指令(或代码),以实现上述的图像处理方法。其中该可执行指令可以存储在该集成电路或芯片中,也可以从其他的装置或设备获取,例如该集成电路或芯片中包括处理器、存储器,以及用于与其他的装置通信的接口。该可执行指令可以存储于该存储器中,当该可执行指令被处理器执行时实现上述的图像处理方法;或者,该集成电路或芯片可以通过该接口接收可执行指令并传输给该处理器执行,以实现上述的图像处理方法。In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned image processing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned image processing method may be implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned image processing method.

在另一示例性实施例中,还提供一种计算机程序产品,该计算机程序产品包含能够由可编程的装置执行的计算机程序,该计算机程序具有当由该可编程的装置执行时用于执行上述的图像处理方法的代码部分。In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned image processing method when executed by the programmable device.

本领域技术人员在考虑说明书及实践本公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (21)

1.一种图像处理方法,其特征在于,包括:1. An image processing method, comprising: 响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;In response to an instruction to acquire a first image, acquire the first image and multi-directional environmental information, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction; 根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;Determining, according to the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image; 在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;In a case where it is determined that the confidence value is greater than a preset confidence threshold, determining a target white balance point according to the multi-directional environmental information; 根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The first image is processed according to the target white balance point to obtain a target image. 2.根据权利要求1所述的方法,其特征在于,根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,包括:2. The method according to claim 1, characterized in that, according to the multi-directional environmental information, determining the confidence value that the scene corresponding to the target color temperature sensor is the target scene comprises: 根据所述多向环境信息确定至少一个置信参数,不同的置信参数是根据所述多向环境信息中不同子信息确定的;Determining at least one confidence parameter according to the multi-directional environmental information, where different confidence parameters are determined according to different sub-information in the multi-directional environmental information; 根据每一所述置信参数分别对应的预设置信权重对所述置信参数加权,得到所述置信值。The confidence parameters are weighted according to the preset confidence weights corresponding to each of the confidence parameters to obtain the confidence values. 3.根据权利要求2所述的方法,其特征在于,根据所述多向环境信息确定目标白平衡点,包括:3. The method according to claim 2, wherein determining the target white balance point according to the multi-directional environmental information comprises: 基于所述置信参数,确定每一所述色温传感器分别对应的输出权重;Based on the confidence parameter, determining an output weight corresponding to each of the color temperature sensors; 根据所述输出权重以及所述多向环境信息,确定环境辅助信息;Determining environmental auxiliary information according to the output weight and the multi-directional environmental information; 根据所述环境辅助信息,确定所述目标白平衡点。The target white balance point is determined according to the environmental auxiliary information. 4.根据权利要求3所述的方法,其特征在于,根据所述环境辅助信息,确定所述目标白平衡点,包括;4. The method according to claim 3, characterized in that determining the target white balance point according to the environmental auxiliary information comprises: 根据所述环境辅助信息,确定至少一个白平衡色温检测权重,不同的白平衡色温检测权重是根据所述环境辅助信息中不同子信息确定的;Determine at least one white balance color temperature detection weight according to the environmental auxiliary information, where different white balance color temperature detection weights are determined according to different sub-information in the environmental auxiliary information; 根据所述白平衡色温检测权重,确定所述目标白平衡点。The target white balance point is determined according to the white balance color temperature detection weight. 5.根据权利要求4所述的方法,其特征在于,所述根据所述白平衡色温检测权重,确定目标白平衡点,包括:5. The method according to claim 4, characterized in that determining the target white balance point according to the white balance color temperature detection weight comprises: 确定每一所述白平衡色温检测权重对应的第一白平衡点;Determine a first white balance point corresponding to each of the white balance color temperature detection weights; 确定每一所述白平衡色温检测权重对应的插值率;Determining an interpolation rate corresponding to each of the white balance color temperature detection weights; 根据每一所述白平衡色温检测权重对应的第一白平衡点,以及每一所述白平衡色温检测权重对应的插值率,确定所述目标白平衡点。The target white balance point is determined according to the first white balance point corresponding to each of the white balance color temperature detection weights and the interpolation rate corresponding to each of the white balance color temperature detection weights. 6.根据权利要求5所述的方法,其特征在于,所述确定每一所述白平衡色温检测权重对应的插值率,包括:6. The method according to claim 5, characterized in that the determining the interpolation rate corresponding to each of the white balance color temperature detection weights comprises: 确定目标色温传感器检测到的环境信息对应的第二白平衡点;Determine a second white balance point corresponding to the environmental information detected by the target color temperature sensor; 确定每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离;Determine the distance between the first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights; 根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的插值率。An interpolation rate corresponding to each of the white balance color temperature detection weights is determined according to a distance between the first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights. 7.根据权利要求6所述的方法,其特征在于,所述根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的插值率包括:7. The method according to claim 6, wherein determining the interpolation rate corresponding to each white balance color temperature detection weight according to the distance between the first white balance point and the second white balance point corresponding to each white balance color temperature detection weight comprises: 根据每一所述白平衡色温检测权重对应的第一白平衡点与所述第二白平衡点间的距离,确定每一所述白平衡色温检测权重对应的距离权重;Determining a distance weight corresponding to each of the white balance color temperature detection weights according to a distance between a first white balance point and the second white balance point corresponding to each of the white balance color temperature detection weights; 根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率。An interpolation rate corresponding to each white balance color temperature detection weight is determined according to each white balance color temperature detection weight, a distance corresponding to each white balance color temperature detection weight, and a distance weight corresponding to each white balance color temperature detection weight. 8.根据权利要求7所述的方法,其特征在于,根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率,包括:8. The method according to claim 7, characterized in that, according to each of the white balance color temperature detection weights, the distance corresponding to each of the white balance color temperature detection weights, and the distance weight corresponding to each of the white balance color temperature detection weights, determining the interpolation rate corresponding to each of the white balance color temperature detection weights comprises: 确定每一所述白平衡色温检测权重、与对应的距离以及对应的距离权重的乘积,得到每一所述白平衡检测参数对应的插值参数;Determine the product of each white balance color temperature detection weight, the corresponding distance, and the corresponding distance weight, to obtain an interpolation parameter corresponding to each white balance detection parameter; 根据每一所述白平衡色温检测权重对应的插值参数以及所有白平衡色温检测权重对应的差值参数的和值,确定每一白平衡色温检测权重对应的插值率。The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the interpolation parameter corresponding to each white balance color temperature detection weight and the sum of the difference parameters corresponding to all white balance color temperature detection weights. 9.根据权利要求7所述的方法,其特征在于,根据每一所述白平衡色温检测权重、每一所述白平衡色温检测权重对应的距离,以及每一所述白平衡色温检测权重对应的距离权重,确定每一所述白平衡色温检测权重对应的插值率,包括:9. The method according to claim 7, characterized in that, according to each of the white balance color temperature detection weights, the distance corresponding to each of the white balance color temperature detection weights, and the distance weight corresponding to each of the white balance color temperature detection weights, determining the interpolation rate corresponding to each of the white balance color temperature detection weights comprises: 根据以下公式,确定每一所述白平衡色温检测权重对应的插值率:The interpolation rate corresponding to each white balance color temperature detection weight is determined according to the following formula: 其中,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,Distj表示第j个白平衡色温检测权重与所述第二白平衡点间的距离,Confj表示第j个白平衡色温检测权重对应的距离权重,Pj表示第j个白平衡色温检测权重;Disti表示第i个白平衡色温检测权重与所述第二白平衡点间的距离,Confi表示第i个白平衡色温检测权重对应的距离权重,Pi表示第i个白平衡色温检测权重,n表示白平衡色温检测权重的数量。Among them, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, Dist j represents the distance between the j-th white balance color temperature detection weight and the second white balance point, Conf j represents the distance weight corresponding to the j-th white balance color temperature detection weight, and P j represents the j-th white balance color temperature detection weight; Dist i represents the distance between the ith white balance color temperature detection weight and the second white balance point, Conf i represents the distance weight corresponding to the ith white balance color temperature detection weight, Pi represents the ith white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights. 10.根据权利要求5所述的方法,其特征在于,所述根据每一所述白平衡色温检测权重对应的第一白平衡点,以及每一所述白平衡色温检测权重对应的插值率,确定所述目标白平衡点,包括:10. The method according to claim 5, characterized in that the determining the target white balance point according to the first white balance point corresponding to each of the white balance color temperature detection weights and the interpolation rate corresponding to each of the white balance color temperature detection weights comprises: 根据以下公式,确定所述目标白平衡点:The target white balance point is determined according to the following formula: 其中,FinalR/G_B/G表示所述目标白平衡点,Blend_Ratioj表示第j个白平衡色温检测权重对应的插值率,PiR/G_B/G表示第j个白平衡色温检测权重对应的第一白平衡点,n表示白平衡色温检测权重的数量。Among them, FinalR/G_B/G represents the target white balance point, Blend_Ratio j represents the interpolation rate corresponding to the j-th white balance color temperature detection weight, PiR /G_B/G represents the first white balance point corresponding to the j-th white balance color temperature detection weight, and n represents the number of white balance color temperature detection weights. 11.根据权利要求4-10任一项所述的方法,其特征在于,所述环境信息包括以下一者或多者:环境相关色温、亮度信息、红外信息以及环境白点;11. The method according to any one of claims 4 to 10, characterized in that the environmental information comprises one or more of the following: environmental correlated color temperature, brightness information, infrared information, and environmental white point; 所述环境辅助信息包括以下一者或多者:The environmental auxiliary information includes one or more of the following: 辅助相关色温、辅助红外信息、辅助亮度信息以及辅助环境白点。Auxiliary correlated color temperature, auxiliary infrared information, auxiliary brightness information, and auxiliary ambient white point. 12.根据权利要求11所述的方法,其特征在于,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:12. The method according to claim 11, characterized in that determining at least one white balance color temperature detection weight according to the environmental auxiliary information comprises: 根据第一映射关系表,确定所述辅助相关色温以及所述辅助红外信息对应的第一权重;Determine, according to the first mapping relationship table, a first weight corresponding to the auxiliary correlated color temperature and the auxiliary infrared information; 所述第一映射关系表是根据相关色温以及红外信息与所述目标场景的匹配关系确定的。The first mapping relationship table is determined according to the matching relationship between the correlated color temperature and infrared information and the target scene. 13.根据权利要求12所述的方法,其特征在于,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:13. The method according to claim 12, characterized in that determining at least one white balance color temperature detection weight according to the environmental auxiliary information comprises: 根据第二映射关系表,确定所述辅助相关色温对应的第二权重;Determining a second weight corresponding to the auxiliary correlated color temperature according to a second mapping relationship table; 所述第二映射关系表是根据相关色温与所述目标场景的匹配关系确定的。The second mapping relationship table is determined according to a matching relationship between the correlated color temperature and the target scene. 14.根据权利要求11所述的方法,其特征在于,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:14. The method according to claim 11, characterized in that determining at least one white balance color temperature detection weight according to the environmental auxiliary information comprises: 获取场景亮度信息;Get scene brightness information; 根据第三映射关系表,确定所述辅助亮度信息对应的目标亮度信息与所述场景亮度信息的第一偏差值,所述第三映射关系表是根据辅助亮度信息与目标场景亮度的匹配关系确定的;Determine, according to a third mapping relationship table, a first deviation value between the target brightness information corresponding to the auxiliary brightness information and the scene brightness information, wherein the third mapping relationship table is determined according to a matching relationship between the auxiliary brightness information and the target scene brightness; 根据所述第一偏差值,确定第三权重。A third weight is determined according to the first deviation value. 15.根据权利要求11所述的方法,其特征在于,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:15. The method according to claim 11, characterized in that determining at least one white balance color temperature detection weight according to the environmental auxiliary information comprises: 根据预设置信曲线,确定所述辅助环境白点对应的权重置信度;Determining the weighted reliability corresponding to the auxiliary environment white point according to a preset reliability curve; 根据所述权重置信度,确定第四权重;Determining a fourth weight according to the weight confidence; 所述预设置信曲线是根据异常白平衡点与正常白平衡点的分布设置的。The preset white balance curve is set according to the distribution of abnormal white balance points and normal white balance points. 16.根据权利要求11所述的方法,其特征在于,根据所述环境辅助信息,确定至少一个白平衡色温检测权重,包括:16. The method according to claim 11, characterized in that determining at least one white balance color temperature detection weight according to the environmental auxiliary information comprises: 根据所述辅助相关色温以及辅助红外信息,确定与黑体辐射曲线的第二偏差值;Determining a second deviation value from a blackbody radiation curve according to the auxiliary correlated color temperature and the auxiliary infrared information; 根据所述第二偏差值,确定第五权重。A fifth weight is determined according to the second deviation value. 17.根据权利要求11所述的方法,其特征在于,根据所述多向环境信息确定至少一个置信参数,包括:17. The method according to claim 11, wherein determining at least one confidence parameter according to the multi-directional environmental information comprises: 根据所述目标色温传感器与其他色温传感器检测到的环境色温差异确定第一置信参数;和/或,Determining a first confidence parameter according to a difference in ambient color temperature detected by the target color temperature sensor and other color temperature sensors; and/or, 根据所述目标色温传感器与其他色温传感器检测到的环境白点差异确定第二置信参数;和/或,Determining a second confidence parameter according to the difference in ambient white points detected by the target color temperature sensor and other color temperature sensors; and/or, 根据所述目标色温传感器与其他色温传感器检测到的环境红外差异确定第三置信参数;和/或,Determine a third confidence parameter according to the difference between the ambient infrared detected by the target color temperature sensor and other color temperature sensors; and/or, 根据所述目标色温传感器与其他色温传感器检测到的环境亮度差异确定第四置信参数;和/或,Determining a fourth confidence parameter according to a difference in ambient brightness detected by the target color temperature sensor and other color temperature sensors; and/or, 根据所述目标色温传感器检测到的环境信息的时域连续性确定第五置信参数;和/或,determining a fifth confidence parameter according to the temporal continuity of the environmental information detected by the target color temperature sensor; and/or, 根据所述目标色温传感器检测到的环境信息与所述目标场景匹配程度确定第五置信参数。A fifth confidence parameter is determined according to a matching degree between the environmental information detected by the target color temperature sensor and the target scene. 18.一种图像处理装置,其特征在于,包括:18. An image processing device, comprising: 获取模块,被配置为响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;an acquisition module, configured to acquire the first image and multi-directional environmental information in response to an acquisition instruction of the first image, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction; 第一确定模块,被配置为根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;A first determination module is configured to determine, based on the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image; 第二确定模块,被配置为在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;A second determination module is configured to determine a target white balance point according to the multi-directional environment information when it is determined that the confidence value is greater than a preset confidence threshold; 处理模块,被配置为根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The processing module is configured to process the first image according to the target white balance point to obtain a target image. 19.一种图像处理装置,其特征在于,包括:19. An image processing device, comprising: 处理器;processor; 用于存储处理器可执行指令的存储器;a memory for storing processor-executable instructions; 其中,所述处理器被配置为:Wherein, the processor is configured to: 响应于第一图像的获取指令,获取所述第一图像以及多向环境信息,所述多向环境信息包括多个色温传感器分别检测到的环境信息,每一所述色温传感器的检测方向不同;In response to an instruction to acquire a first image, acquire the first image and multi-directional environmental information, wherein the multi-directional environmental information includes environmental information respectively detected by a plurality of color temperature sensors, and each of the color temperature sensors has a different detection direction; 根据所述多向环境信息,确定目标色温传感器对应的场景为目标场景的置信值,所述目标色温传感器的检测方向与所述第一图像对应;Determining, according to the multi-directional environmental information, a confidence value that a scene corresponding to a target color temperature sensor is a target scene, wherein a detection direction of the target color temperature sensor corresponds to the first image; 在确定所述置信值大于预设置信阈值的情况下,根据所述多向环境信息确定目标白平衡点;In a case where it is determined that the confidence value is greater than a preset confidence threshold, determining a target white balance point according to the multi-directional environmental information; 根据所述目标白平衡点对所述第一图像进行处理,得到目标图像。The first image is processed according to the target white balance point to obtain a target image. 20.一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,该程序指令被处理器执行时实现权利要求1-17中任一项所述方法的步骤。20. A computer-readable storage medium having computer program instructions stored thereon, wherein the program instructions implement the steps of the method according to any one of claims 1 to 17 when executed by a processor. 21.一种芯片,其特征在于,包括处理器和接口;所述处理器用于读取指令以执行权利要求1-17中任一项所述的方法。21. A chip, comprising a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 17.
CN202310364347.3A 2023-04-06 2023-04-06 Image processing method, device, storage medium and chip Pending CN118784810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310364347.3A CN118784810A (en) 2023-04-06 2023-04-06 Image processing method, device, storage medium and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310364347.3A CN118784810A (en) 2023-04-06 2023-04-06 Image processing method, device, storage medium and chip

Publications (1)

Publication Number Publication Date
CN118784810A true CN118784810A (en) 2024-10-15

Family

ID=92979386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310364347.3A Pending CN118784810A (en) 2023-04-06 2023-04-06 Image processing method, device, storage medium and chip

Country Status (1)

Country Link
CN (1) CN118784810A (en)

Similar Documents

Publication Publication Date Title
CN106651955B (en) Method and device for positioning target object in picture
CN106355573B (en) Target positioning method and device in pictures
EP3179711B1 (en) Method and apparatus for preventing photograph from being shielded
WO2021051949A1 (en) Image processing method and apparatus, electronic device, and storage medium
EP3163498A2 (en) Alarming method and device
KR20170020736A (en) Method, apparatus and terminal device for determining spatial parameters by image
WO2017059634A1 (en) Method and device for adjusting displayed image
CN108462833B (en) Photographing method, photographing device and computer-readable storage medium
CN108353129B (en) Shooting equipment and control method thereof
CN112219224A (en) Image processing method and device, electronic device and storage medium
CN107025441B (en) Skin color detection method and device
US20180088664A1 (en) Method and device for switching environment picture
CN108154090B (en) Face recognition method and device
CN107330391A (en) Product information reminding method and device
US10827156B2 (en) Light filling method and apparatus for photographing environment, and computer-readable storage medium
WO2020233201A1 (en) Icon position determination method and device
CN115861431B (en) Camera registration method, device, communication equipment and storage medium
CN106775240B (en) Application program triggering method, device and terminal
CN114155175B (en) Image generation method, device, electronic equipment and storage medium
CN109215615A (en) The compensation method of display unit running parameter and device
CN118784810A (en) Image processing method, device, storage medium and chip
CN108319899B (en) Fingerprint identification method and device
CN108182658B (en) Image beautification method and device
CN107680096A (en) Image processing method and device
CN108108668A (en) Age Forecasting Methodology and device based on image

Legal Events

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