[go: up one dir, main page]

CN118524299A - Color temperature compensation method, device, terminal equipment and storage medium - Google Patents

Color temperature compensation method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN118524299A
CN118524299A CN202310147354.8A CN202310147354A CN118524299A CN 118524299 A CN118524299 A CN 118524299A CN 202310147354 A CN202310147354 A CN 202310147354A CN 118524299 A CN118524299 A CN 118524299A
Authority
CN
China
Prior art keywords
color temperature
target
color
determining
coordinate point
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
CN202310147354.8A
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 CN202310147354.8A priority Critical patent/CN118524299A/en
Publication of CN118524299A publication Critical patent/CN118524299A/en
Pending legal-status Critical Current

Links

Landscapes

  • Color Television Image Signal Generators (AREA)

Abstract

本公开关于一种色温补偿方法、装置、终端设备及存储介质。所述色温补偿方法,应用于包含有至少两个不同颜色的单色闪光灯的终端设备,包括:基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围;获取所述终端设备的目标色温;若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯;利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿;其中,基于所述至少一个目标闪光灯补偿后的环境光色温与所述目标色温相同。

The present disclosure relates to a color temperature compensation method, device, terminal device and storage medium. The color temperature compensation method is applied to a terminal device including at least two monochrome flashlights of different colors, and includes: determining the color temperature adjustment range provided by at least two flashlights in the terminal device under the current shooting environment based on the ambient light color temperature of the current shooting environment of the terminal device; obtaining the target color temperature of the terminal device; if the target color temperature is within the color temperature adjustment range, determining at least one target flashlight from the at least two flashlights; using the at least one target flashlight, performing color temperature compensation on the current shooting environment; wherein the ambient light color temperature after compensation based on the at least one target flashlight is the same as the target color temperature.

Description

色温补偿方法、装置、终端设备及存储介质Color temperature compensation method, device, terminal equipment and storage medium

技术领域Technical Field

本公开涉及终端技术领域,尤其涉及一种色温补偿方法、装置、终端设备及存储介质。The present disclosure relates to the field of terminal technology, and in particular to a color temperature compensation method, device, terminal equipment and storage medium.

背景技术Background Art

为了实现更好的拍照效果,终端设备中通常预设多种白平衡模式或者允许用户手动调节白平衡参数。当终端设备所在拍摄环境的环境光色温与白平衡模式预设的色温或用户设置的色温不同时,终端设备就需要补偿环境光色温以得到所需的色温,从而实现满足用户的拍照需求。In order to achieve better photography effects, terminal devices usually preset multiple white balance modes or allow users to manually adjust white balance parameters. When the ambient light color temperature of the shooting environment of the terminal device is different from the color temperature preset in the white balance mode or the color temperature set by the user, the terminal device needs to compensate for the ambient light color temperature to obtain the required color temperature, thereby meeting the user's photography needs.

相关技术中通常基于采集的图像颜色的分析结果,确定色温补偿参数;或者通过调整单色闪光灯的亮度,实现对拍摄环境的环境光色温的色温补偿;但上述方法容易出现色温计算误差大、色温补偿范围小,使得色温补偿效果较差,难以满足用户的需求。In the related art, color temperature compensation parameters are usually determined based on the analysis results of the collected image colors; or the color temperature compensation of the ambient light color temperature of the shooting environment is achieved by adjusting the brightness of the monochromatic flash; however, the above method is prone to large color temperature calculation errors and a small color temperature compensation range, resulting in poor color temperature compensation effects and difficulty in meeting user needs.

发明内容Summary of the invention

为克服相关技术中存在的问题,本公开提供一种色温补偿方法、装置、终端设备及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a color temperature compensation method, an apparatus, a terminal device and a storage medium.

根据本公开实施例的第一方面,提供一种色温补偿方法,应用于包含有至少两个不同颜色的单色闪光灯的终端设备,包括:According to a first aspect of an embodiment of the present disclosure, a color temperature compensation method is provided, which is applied to a terminal device including at least two monochrome flash lamps of different colors, comprising:

基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围;Based on the color temperature of the ambient light in the current shooting environment of the terminal device, determining a color temperature adjustment range provided by at least two flashlights in the terminal device in the current shooting environment;

获取所述终端设备的目标色温;Obtaining a target color temperature of the terminal device;

若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯;If the target color temperature is within the color temperature adjustment range, determining at least one target flash light from the at least two flash lights;

利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿;其中,基于所述至少一个目标闪光灯补偿后的环境光色温与所述目标色温相同。The at least one target flash is used to perform color temperature compensation on the current shooting environment; wherein the color temperature of the ambient light after compensation based on the at least one target flash is the same as the target color temperature.

可选的,所述基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围,包括:Optionally, determining the color temperature adjustment range provided by at least two flashlights in the terminal device under the current shooting environment based on the color temperature of the ambient light in the current shooting environment of the terminal device includes:

获取终端设备当前拍摄环境的环境光色温;Get the ambient light color temperature of the current shooting environment of the terminal device;

检测至少两个所述闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温;Detecting the compensated color temperature of each of the at least two flashes when performing color temperature compensation for the current shooting environment at the maximum working brightness;

基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the obtained compensated color temperatures of at least two of the flashes and the color temperature of the ambient light, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围,包括:Optionally, determining the color temperature adjustment range that can be provided by the terminal device under the current shooting environment based on the obtained compensated color temperatures of at least two flashes and the ambient light color temperature includes:

基于所述至少两个闪光灯的补偿色温和所述环境光色温,在预设颜色坐标系中分别确定所述至少两个补偿色温对应的第一坐标点和所述环境光色温对应的第二坐标点;Based on the compensated color temperatures of the at least two flashlights and the color temperature of the ambient light, respectively determining a first coordinate point corresponding to the at least two compensated color temperatures and a second coordinate point corresponding to the color temperature of the ambient light in a preset color coordinate system;

所述第二坐标点和所述至少两个第一坐标点中任意相邻两个所述第一坐标点围合形成至少一个色温调节子区域;所述至少一个色温调节子区域内的任意两个色温调节子区域互不重叠;The second coordinate point and any adjacent two of the at least two first coordinate points enclose at least one color temperature adjustment sub-region; any two color temperature adjustment sub-regions in the at least one color temperature adjustment sub-region do not overlap each other;

基于至少一个色温调节子区域对应的色温范围,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the color temperature range corresponding to at least one color temperature adjustment sub-area, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯,包括:Optionally, if the target color temperature is within the color temperature adjustment range, determining at least one target flash light from the at least two flash lights comprises:

确定所述目标色温在预设颜色坐标系中对应的目标坐标点;Determine a target coordinate point corresponding to the target color temperature in a preset color coordinate system;

确定所述目标坐标点与至少一个所述色温调节子区域的位置关系;Determining a positional relationship between the target coordinate point and at least one of the color temperature adjustment sub-regions;

若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located are determined as the target flashes.

可选的,所述利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿,包括:Optionally, using the at least one target flash to perform color temperature compensation on the current shooting environment includes:

分别确定所述目标坐标点所在的色温调节子区域对应的两个第一坐标点与所述目标坐标点之间的距离;respectively determining the distances between the target coordinate point and two first coordinate points corresponding to the color temperature adjustment sub-region where the target coordinate point is located;

基于两个所述第一坐标点对应的距离之间的比值,确定两个所述目标闪光灯的颜色补偿参数;Determining color compensation parameters of the two target flash lights based on a ratio between the distances corresponding to the two first coordinate points;

基于所述颜色补偿参数,分别确定两个所述目标闪光灯的目标工作亮度;Based on the color compensation parameters, respectively determining the target working brightness of the two target flash lamps;

利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿。The color temperature of the current shooting environment is compensated by using the two target flash lamps at the target working brightness.

可选的,所述若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯,包括:Optionally, if the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, determining two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located as the target flashes includes:

若位置关系指示所述目标坐标点位于所述色温调节子区域内,确定所述目标坐标点是否处于所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上;If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-area, determining whether the target coordinate point is located on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-area and the second coordinate point;

若所述目标坐标点不处于所述连线上,将所述色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the target coordinate point is not on the connecting line, the two flashes corresponding to the color temperature adjustment sub-area are determined as the target flashes.

可选的,所述方法,包括:Optionally, the method comprises:

若所述目标坐标点处于所述连线上,将形成所述连线的所述第一坐标点对应的闪光灯,确定为所述目标闪光灯。If the target coordinate point is on the connection line, the flash corresponding to the first coordinate point forming the connection line is determined as the target flash.

根据本公开实施例的第二方面,本申请实施例提供了一种色温补偿装置,所述装置设置于包含有至少两个不同颜色的单色闪光灯的终端设备,包括:According to a second aspect of an embodiment of the present disclosure, an embodiment of the present application provides a color temperature compensation device, which is provided in a terminal device including at least two monochrome flash lamps of different colors, and includes:

第一确定模块,用于基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围;A first determination module, configured to determine, based on the color temperature of ambient light in the current shooting environment of the terminal device, a color temperature adjustment range provided by at least two flashlights in the terminal device in the current shooting environment;

获取模块,用于获取所述终端设备的目标色温;An acquisition module, used to acquire a target color temperature of the terminal device;

第二确定模块,用于若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯;A second determination module, configured to determine at least one target flash light from the at least two flash lights if the target color temperature is within the color temperature adjustment range;

补偿模块,用于利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿;其中,基于所述至少一个目标闪光灯补偿后的环境光色温与所述目标色温相同。A compensation module is used to use the at least one target flash to perform color temperature compensation on the current shooting environment; wherein the color temperature of the ambient light after compensation based on the at least one target flash is the same as the target color temperature.

可选的,所述第一确定模块,还用于获取终端设备当前拍摄环境的环境光色温;Optionally, the first determining module is further used to obtain the color temperature of ambient light in the current shooting environment of the terminal device;

检测至少两个所述闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温;Detecting the compensated color temperature of each of the at least two flashes when performing color temperature compensation for the current shooting environment at the maximum working brightness;

基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the obtained compensated color temperatures of at least two of the flashes and the color temperature of the ambient light, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述第一确定模块,还用于基于所述至少两个闪光灯的补偿色温和所述环境光色温,在预设颜色坐标系中分别确定所述至少两个补偿色温对应的第一坐标点和所述环境光色温对应的第二坐标点;Optionally, the first determination module is further used to determine, in a preset color coordinate system, first coordinate points corresponding to the at least two compensated color temperatures and a second coordinate point corresponding to the ambient light color temperature, respectively, based on the compensated color temperatures of the at least two flashes and the ambient light color temperature;

所述第二坐标点和所述至少两个第一坐标点中任意相邻两个所述第一坐标点围合形成至少一个色温调节子区域;所述至少一个色温调节子区域内的任意两个色温调节子区域互不重叠;The second coordinate point and any adjacent two of the at least two first coordinate points enclose at least one color temperature adjustment sub-region; any two color temperature adjustment sub-regions in the at least one color temperature adjustment sub-region do not overlap each other;

基于至少一个色温调节子区域对应的色温范围,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the color temperature range corresponding to at least one color temperature adjustment sub-area, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述第二确定模块,用于确定所述目标色温在预设颜色坐标系中对应的目标坐标点;Optionally, the second determination module is used to determine a target coordinate point corresponding to the target color temperature in a preset color coordinate system;

确定所述目标坐标点与至少一个所述色温调节子区域的位置关系;Determining a positional relationship between the target coordinate point and at least one of the color temperature adjustment sub-regions;

若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located are determined as the target flashes.

可选的,补偿模块,还用于分别确定所述目标坐标点所在的色温调节子区域对应的两个第一坐标点与所述目标坐标点之间的距离;Optionally, the compensation module is further used to respectively determine the distances between the target coordinate point and two first coordinate points corresponding to the color temperature adjustment sub-region where the target coordinate point is located;

基于两个所述第一坐标点对应的距离之间的比值,确定两个所述目标闪光灯的颜色补偿参数;Determining color compensation parameters of the two target flash lights based on a ratio between the distances corresponding to the two first coordinate points;

基于所述颜色补偿参数,分别确定两个所述目标闪光灯的目标工作亮度;Based on the color compensation parameters, respectively determining the target working brightness of the two target flash lamps;

利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿。The color temperature of the current shooting environment is compensated by using the two target flash lamps at the target working brightness.

可选的,所述第二确定模块,用于若位置关系指示所述目标坐标点位于所述色温调节子区域内,确定所述目标坐标点是否处于所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上;Optionally, the second determination module is used to determine whether the target coordinate point is on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-region and the second coordinate point if the position relationship indicates that the target coordinate point is within the color temperature adjustment sub-region;

若所述目标坐标点不处于所述连线上,将所述色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the target coordinate point is not on the connecting line, the two flashes corresponding to the color temperature adjustment sub-area are determined as the target flashes.

可选的,所述第二确定模块,用于若所述目标坐标点处于所述连线上,将形成所述连线的所述第一坐标点对应的闪光灯,确定为所述目标闪光灯。Optionally, the second determination module is used to determine the flash corresponding to the first coordinate point forming the connection line as the target flash if the target coordinate point is on the connection line.

根据本公开实施例的第三方面,提供一种终端设备,包括:According to a third aspect of an embodiment of the present disclosure, a terminal device is provided, including:

至少两个不同颜色的单色闪光灯;at least two monochrome flashes of different colors;

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

处理器,与所述存储器连接;A processor connected to the memory;

其中,所述处理器被配置为执行如本公开实施例的第一方面所述的色温补偿方法。The processor is configured to execute the color temperature compensation method as described in the first aspect of the embodiment of the present disclosure.

根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由终端设备的处理器执行时,使得终端设备能够执行如本公开实施例的第一方面所述的色温补偿方法中的步骤。According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of a terminal device, the terminal device is enabled to perform the steps in the color temperature compensation method as described in the first aspect of the embodiment of the present disclosure.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

本公开实施例基于终端设备当前拍摄环境的环境光色温,可以确定终端设备内的至少两个不同颜色的单色闪光灯在当前拍摄环境下提供的色温调节范围;通过获取终端设备的目标色温,并在该目标色温处于色温调节范围内时,即说明环境光色温可调节至目标色温时,从至少两个闪光灯中确定出至少一个目标闪光灯,用以对当前拍摄环境进行色温补偿,使得补偿后的环境光色温与目标色温相同,以实现拍照所需的目标色温,满足所需的拍照效果。另外,相比于单色闪光灯所能提供的色温调节范围,至少两个不同颜色的单色闪光灯能够提供更大的色温补偿范围,满足用户的更多需求。Based on the ambient light color temperature of the current shooting environment of the terminal device, the disclosed embodiment can determine the color temperature adjustment range provided by at least two different colored monochromatic flashes in the terminal device under the current shooting environment; by obtaining the target color temperature of the terminal device, and when the target color temperature is within the color temperature adjustment range, that is, when the ambient light color temperature can be adjusted to the target color temperature, at least one target flash is determined from at least two flashes to perform color temperature compensation on the current shooting environment, so that the compensated ambient light color temperature is the same as the target color temperature, so as to achieve the target color temperature required for taking pictures and meet the required photographic effect. In addition, compared with the color temperature adjustment range that can be provided by a monochromatic flash, at least two different colored monochromatic flashes can provide a larger color temperature compensation range to meet more user needs.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。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 of a method for adjusting white balance shown in the related art.

图2是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图一。FIG. 2 is a flowchart diagram 1 of a color temperature compensation method according to an exemplary embodiment of the present disclosure.

图3是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图二。FIG. 3 is a second flow chart of a color temperature compensation method according to an exemplary embodiment of the present disclosure.

图4是根据本公开一示例性实施例示出的一种色温补偿方法的设备示意图。Fig. 4 is a schematic diagram of a device showing a color temperature compensation method according to an exemplary embodiment of the present disclosure.

图5是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图三。FIG. 5 is a third flow chart of a color temperature compensation method according to an exemplary embodiment of the present disclosure.

图6是根据本公开一示例性实施例示出的一种配置有三个不同颜色的单色闪光灯的终端设备的色温调节范围的示意图。Fig. 6 is a schematic diagram showing a color temperature adjustment range of a terminal device configured with three monochrome flash lamps of different colors according to an exemplary embodiment of the present disclosure.

图7是根据本公开一示例性实施例示出的色温在预设颜色坐标系中的示意图。FIG. 7 is a schematic diagram showing color temperature in a preset color coordinate system according to an exemplary embodiment of the present disclosure.

图8是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图四。FIG. 8 is a fourth flowchart diagram of a color temperature compensation method according to an exemplary embodiment of the present disclosure.

图9是根据本公开一示例性实施例示出的一种色温补偿装置的结构示意图。Fig. 9 is a schematic structural diagram of a color temperature compensation device according to an exemplary embodiment of the present disclosure.

图10是根据本公开一示例性实施例示出的一种终端设备的框图。Fig. 10 is a block diagram showing a terminal device according to an exemplary embodiment of the present disclosure.

具体实施方式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 consistent with some aspects of the present disclosure as detailed in the appended claims.

相关技术中通常通过以下两种方式实现对终端设备的拍摄环境进行色温补偿:In the related art, the color temperature compensation of the shooting environment of the terminal device is usually achieved in the following two ways:

第一种方式,基于图像颜色分析结果进行色温补偿;具体地,如图1所示,图1是相关技术示出的一种白平衡的调整方法流程图,通过输入图像中像素点的RGB像素值,从所述像素点中确定绿色像素点和灰色像素点;通过分别根据绿色像素点和灰色像素点各自对应的RGB像素值确定可能的光源点,再根据可能的光源点进行综合判定,以确定准确的实际光源点的颜色比例系数,从而可以实现基于所述实际光源点的颜色比例系数,为所述设备提供准确的色温补偿值。The first method is to perform color temperature compensation based on the image color analysis result; specifically, as shown in Figure 1, Figure 1 is a flow chart of a white balance adjustment method shown in the related art, by inputting the RGB pixel values of the pixels in the image, determining the green pixels and the gray pixels from the pixels; determining the possible light source points according to the RGB pixel values corresponding to the green pixels and the gray pixels respectively, and then making a comprehensive judgment based on the possible light source points to determine the accurate color ratio coefficient of the actual light source point, so as to provide the device with an accurate color temperature compensation value based on the color ratio coefficient of the actual light source point.

但是这种色温补偿的方法没有提出利用闪光灯可对实际光源点进行色温补偿,无法充分发挥终端设备依靠自身组件实现色温补偿的潜力,且在一些特殊场景,如图片中的颜色整体偏向灰色时,难以找到绿色标定点,从而导致色温计算误差大。However, this method of color temperature compensation does not propose the use of flash to compensate the color temperature of the actual light source point, and cannot fully tap the potential of the terminal device to achieve color temperature compensation by relying on its own components. In some special scenes, such as when the overall color in the picture tends to be gray, it is difficult to find the green calibration point, resulting in large errors in color temperature calculation.

第二种方式,基于单色闪光灯进行色温补偿;具体地,利用白平衡参数和补光灯(预闪阶段的闪光灯)色温信息,预算出当前场景色温,从而指导白平衡工作。具体过程为:利用单个补光灯在开启前后所获图像的色温确定补光灯的补偿控制,从而可基于补偿控制对应的亮度信息计算闪光灯占环境光的比例,使得闪光灯可辅助终端设备的自动白平衡算法。The second method is to perform color temperature compensation based on a single-color flash; specifically, the color temperature of the current scene is estimated using the white balance parameters and the color temperature information of the fill light (the flash in the pre-flash stage), thereby guiding the white balance work. The specific process is: the compensation control of the fill light is determined using the color temperature of the image obtained before and after the single fill light is turned on, so that the proportion of the flash light to the ambient light can be calculated based on the brightness information corresponding to the compensation control, so that the flash light can assist the automatic white balance algorithm of the terminal device.

但是这种色温补偿的方法同样受限于图像的整体颜色,容易导致当前场景色温计算错误,且色温补偿范围小,只能在当前场景色温与闪光灯色温之间调节。However, this color temperature compensation method is also limited by the overall color of the image, which can easily lead to errors in calculating the color temperature of the current scene. In addition, the color temperature compensation range is small and can only be adjusted between the current scene color temperature and the flash color temperature.

本公开实施例提供一种色温补偿方法,图2是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图一。如图2所示,所述色温补偿方法,可以包括:The embodiment of the present disclosure provides a color temperature compensation method, and FIG2 is a flowchart of a color temperature compensation method according to an exemplary embodiment of the present disclosure. As shown in FIG2 , the color temperature compensation method may include:

步骤S101,基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围;Step S101, based on the color temperature of the ambient light in the current shooting environment of the terminal device, determining the color temperature adjustment range provided by at least two flashlights in the terminal device in the current shooting environment;

步骤S102,获取所述终端设备的目标色温;Step S102, obtaining a target color temperature of the terminal device;

步骤S103,若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯;Step S103, if the target color temperature is within the color temperature adjustment range, determining at least one target flash light from the at least two flash lights;

步骤S104,利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿;其中,基于所述至少一个目标闪光灯补偿后的环境光色温与所述目标色温相同。Step S104, using the at least one target flash to perform color temperature compensation on the current shooting environment; wherein the color temperature of the ambient light after compensation based on the at least one target flash is the same as the target color temperature.

在本公开实施例中,所述色温补偿方法可应用于终端设备,所述终端设备可以是包含有至少两个不同颜色的单色闪光灯的设备,例如手机、平板电脑等。所述不同颜色的单色闪光灯可为能够发射不同色温的光线的闪光灯,例如,红色闪光灯、绿色闪光灯等。In the embodiment of the present disclosure, the color temperature compensation method can be applied to a terminal device, which can be a device including at least two monochrome flashlights of different colors, such as a mobile phone, a tablet computer, etc. The monochrome flashlights of different colors can be flashlights that can emit light of different color temperatures, such as a red flashlight, a green flashlight, etc.

在步骤S101中,基于所述终端设备当前拍摄环境的环境光色温,以及终端设备中的至少两个不同颜色的单色闪光灯,可以确定所述终端设备在当前拍摄环境下提供的色温调节范围。In step S101, based on the color temperature of the ambient light in the current shooting environment of the terminal device and at least two monochrome flashes of different colors in the terminal device, the color temperature adjustment range provided by the terminal device in the current shooting environment can be determined.

其中,所述环境光色温是对当前拍摄环境光线中包含颜色成分的一个计量值。The ambient light color temperature is a measurement value of the color components contained in the current shooting ambient light.

可以理解的是,基于终端设备中的至少两个不同颜色的单色闪光灯,可以确定所述终端设备中的所述闪光灯的配置参数。基于所述终端设备当前拍摄环境的环境光色温,以及所述闪光灯的配置参数,可以确定所述终端设备的色温调节范围。It is understandable that the configuration parameters of the flash in the terminal device can be determined based on at least two different colored monochrome flashes in the terminal device. The color temperature adjustment range of the terminal device can be determined based on the ambient light color temperature of the current shooting environment of the terminal device and the configuration parameters of the flash.

其中,所述闪光灯的配置参数至少包括:照射角度、闪光指数。所述闪光灯的配置参数可由闪光灯的出厂说明书、实验检测等多种方式获得。The configuration parameters of the flashlight include at least: an illumination angle and a flash index. The configuration parameters of the flashlight can be obtained from the factory manual of the flashlight, experimental testing, and other methods.

可以理解的是,由于终端设备内配置的闪光灯的亮度参数、色温参数是固定的,不同环境下,处于同一亮度的闪光灯发射的光线的色温相同;由于不同环境的环境光色温不同,使得基于闪光灯对不同环境补偿后的环境光色温可能不同。It is understandable that since the brightness parameters and color temperature parameters of the flash configured in the terminal device are fixed, the color temperature of the light emitted by the flash at the same brightness in different environments is the same; since the color temperature of ambient light in different environments is different, the color temperature of ambient light after compensation for different environments based on the flash may be different.

可获取所述终端设备当前拍摄环境的环境光色温,分别获取每一个闪光灯处于多个不同的工作亮度时发射光线的光线色温;基于所述环境光色温和至少两个闪光灯中每一个闪光灯的多个光线色温,分别确定出利用处于不同工作亮度的闪光灯进行色温补偿后的环境光色温;基于每一个闪光灯对应的多个补偿后的环境光色温,确定所述终端设备中每一个闪光灯在当前拍摄环境下提供的色温调节范围。The ambient light color temperature of the current shooting environment of the terminal device can be obtained, and the light color temperatures of the light emitted by each flash when it is at multiple different working brightnesses can be obtained respectively; based on the ambient light color temperature and multiple light color temperatures of each of at least two flashes, the ambient light color temperature after color temperature compensation using the flashes at different working brightnesses can be determined respectively; based on the multiple compensated ambient light color temperatures corresponding to each flash, the color temperature adjustment range provided by each flash in the terminal device under the current shooting environment can be determined.

在获得每个闪光灯在当前拍摄环境下的色温调节范围后,基于至少两个闪光灯的颜色以及各自的色温调节区域,可以得到至少两个闪光灯同时对当前拍摄环境进行色温补偿时的色温调节范围,该色温调节范围即为所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围。After obtaining the color temperature adjustment range of each flash under the current shooting environment, based on the colors of at least two flashes and their respective color temperature adjustment areas, the color temperature adjustment range when at least two flashes simultaneously perform color temperature compensation for the current shooting environment can be obtained. This color temperature adjustment range is the color temperature adjustment range provided by at least two of the flashes in the terminal device under the current shooting environment.

需要说明的是,终端设备中的闪光灯在不同环境光色温下对当前拍摄环境进行色温补偿时的补偿色温可通过计算机软件模拟得到,也可以通过检测设备检测得到,本公开实施例对此不做具体限定。It should be noted that the compensated color temperature of the flash in the terminal device when performing color temperature compensation for the current shooting environment under different ambient light color temperatures can be obtained by computer software simulation or by detection by a detection device, and the embodiments of the present disclosure do not specifically limit this.

所述终端设备当前拍摄环境的环境光色温可由终端设备中的检测模块获取,所述检测模块用于通过检测相关参数得到所述当前拍摄环境的环境光色温。可选的,所述检测模块可以是色温传感器。The color temperature of the ambient light of the current shooting environment of the terminal device can be obtained by a detection module in the terminal device, and the detection module is used to obtain the color temperature of the ambient light of the current shooting environment by detecting relevant parameters. Optionally, the detection module can be a color temperature sensor.

需要说明的是,所述终端设备当前拍摄环境的环境光色温还可通过其他方式确定,本公开实施例对此不做具体限定。It should be noted that the color temperature of the ambient light in the current shooting environment of the terminal device may also be determined by other methods, and the embodiments of the present disclosure do not specifically limit this.

在步骤S102中,可基于所述终端设备的预设拍摄模式获取所述终端设备的目标色温。所述目标色温的取值等于所述终端设备的预设拍摄模式中所设置的白平衡参数,所述白平衡参数以色温表示。示例性的,所述预设拍摄模式可包括:日光模式,白平衡(色温)3000K;雨天模式,白平衡(色温)4500K。In step S102, the target color temperature of the terminal device may be obtained based on the preset shooting mode of the terminal device. The value of the target color temperature is equal to the white balance parameter set in the preset shooting mode of the terminal device, and the white balance parameter is expressed in color temperature. Exemplarily, the preset shooting mode may include: daylight mode, white balance (color temperature) 3000K; rainy day mode, white balance (color temperature) 4500K.

在一些实施例中,还可以基于用户在所述终端设备启动拍摄模式时所设置的白平衡参数,获取所述终端设备的目标色温。In some embodiments, the target color temperature of the terminal device may also be acquired based on the white balance parameters set by the user when the terminal device starts the shooting mode.

可以理解的是,所述终端设备可通过用户在显示屏上的操作或者用户输入终端设备的指令,得到用户所设置的白平衡参数,进而获得目标色温。It is understandable that the terminal device can obtain the white balance parameters set by the user through the user's operation on the display screen or the user's command input into the terminal device, and then obtain the target color temperature.

需要说明的是,所述终端设备的所述目标色温还可通过其他方式确定,本公开实施例对此不做具体限定。It should be noted that the target color temperature of the terminal device may also be determined by other methods, which is not specifically limited in the embodiments of the present disclosure.

在步骤S103中,若所述目标色温处于所述色温调节范围内,即表示所述环境光色温可以被补偿为目标色温时,从所述至少两个闪光灯中确定出实现该色温补偿的至少一个闪光灯,该至少一个闪光灯为目标闪光灯。In step S103, if the target color temperature is within the color temperature adjustment range, which means that the ambient light color temperature can be compensated to the target color temperature, at least one flash that realizes the color temperature compensation is determined from the at least two flashes, and the at least one flash is the target flash.

可以理解的是,所述目标色温处于所述色温调节范围内,是指所述目标色温位于所述闪光灯对当前拍摄环境进行色温补偿时的补偿色温范围内。那么,闪光灯对所述环境光色温补偿后,可以得到目标色温。It can be understood that the target color temperature is within the color temperature adjustment range, which means that the target color temperature is within the compensation color temperature range when the flash performs color temperature compensation on the current shooting environment. Then, after the flash compensates for the color temperature of the ambient light, the target color temperature can be obtained.

需要说明的是,所述目标色温至少处于一个闪光灯当前拍摄环境进行色温补偿时所形成的补偿色温范围内,因此,只需从所述至少两个闪光灯中确定出实现该色温补偿的至少一个闪光灯,以便利用所述至少一个目标闪光灯实现本公开实施例中的色温补偿。It should be noted that the target color temperature is at least within the compensated color temperature range formed when one flash performs color temperature compensation in the current shooting environment. Therefore, it is only necessary to determine at least one flash that realizes the color temperature compensation from the at least two flashes, so as to use the at least one target flash to realize the color temperature compensation in the embodiment of the present disclosure.

在步骤S104中,利用步骤S103中获得所述至少一个目标闪光灯,可以对当前拍摄环境进行色温补偿,使得补偿后的环境光色温与所述目标色温相同。In step S104, the at least one target flash light obtained in step S103 may be used to perform color temperature compensation on the current shooting environment, so that the color temperature of the compensated ambient light is the same as the target color temperature.

可以理解的是,步骤S103中获得至少一个目标闪光灯可以通过改变工作状态使得所述环境光色温被补偿为目标色温。其中,基于所述至少一个目标闪光灯补偿后的环境光色温应与所述目标色温相同。It is understandable that the at least one target flash obtained in step S103 can change the working state so that the color temperature of the ambient light is compensated to the target color temperature. The color temperature of the ambient light compensated by the at least one target flash should be the same as the target color temperature.

所述目标闪光灯的工作状态至少包括所述目标闪光灯的工作亮度。可以理解的是,所述目标闪光灯的工作亮度不同时,目标闪光灯发射的光线的色温也不同,基于所述目标闪光灯发射的光线进行色温补偿后的环境光色温也可能不同;那么,通过确定目标闪光灯的工作亮度,控制所述目标闪光灯切换至所述工作亮度,以利用处于所述工作亮度的目标闪光灯发射的光线对当前拍摄环境进行色温补偿,使得补偿后的环境光色温与所述目标色温相同,从而实现对当前拍摄环境的色温补偿。The working state of the target flashlight at least includes the working brightness of the target flashlight. It is understandable that when the working brightness of the target flashlight is different, the color temperature of the light emitted by the target flashlight is also different, and the color temperature of the ambient light after color temperature compensation based on the light emitted by the target flashlight may also be different; then, by determining the working brightness of the target flashlight, the target flashlight is controlled to switch to the working brightness, so as to use the light emitted by the target flashlight at the working brightness to perform color temperature compensation on the current shooting environment, so that the color temperature of the compensated ambient light is the same as the target color temperature, thereby achieving color temperature compensation for the current shooting environment.

在本公开实施例中,基于终端设备当前拍摄环境的环境光色温,可以确定终端设备内的至少两个不同颜色的单色闪光灯在当前拍摄环境下提供的色温调节范围;通过获取终端设备的目标色温,并在该目标色温处于色温调节范围内时,即说明环境光色温可调节至目标色温时,从至少两个闪光灯中确定出至少一个目标闪光灯,用以对当前拍摄环境进行色温补偿,使得补偿后的环境光色温与目标色温相同,以实现拍照所需的目标色温,满足所需的拍照效果。另外,相比于单色闪光灯所能提供的色温调节范围,至少两个不同颜色的单色闪光灯能够提供更大的色温补偿范围,满足用户的更多需求。In the disclosed embodiment, based on the ambient light color temperature of the current shooting environment of the terminal device, the color temperature adjustment range provided by at least two different colored monochromatic flashes in the terminal device under the current shooting environment can be determined; by obtaining the target color temperature of the terminal device, and when the target color temperature is within the color temperature adjustment range, that is, when the ambient light color temperature can be adjusted to the target color temperature, at least one target flash is determined from at least two flashes to perform color temperature compensation on the current shooting environment, so that the compensated ambient light color temperature is the same as the target color temperature, so as to achieve the target color temperature required for taking pictures and meet the required photographic effect. In addition, compared with the color temperature adjustment range that can be provided by a monochromatic flash, at least two different colored monochromatic flashes can provide a larger color temperature compensation range to meet more user needs.

可选的,图3是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图二。如图3所示,步骤S101中的基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围,包括:Optionally, FIG3 is a second flow chart of a color temperature compensation method according to an exemplary embodiment of the present disclosure. As shown in FIG3, step S101 determines the color temperature adjustment range provided by at least two flashlights in the terminal device under the current shooting environment based on the ambient light color temperature of the current shooting environment of the terminal device, including:

步骤S201,获取终端设备当前拍摄环境的环境光色温;Step S201, obtaining the ambient light color temperature of the current shooting environment of the terminal device;

步骤S202,检测至少两个所述闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温;Step S202, detecting the compensated color temperature of each of the at least two flashes when performing color temperature compensation for the current shooting environment at the maximum working brightness;

步骤S203,基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Step S203: determining the color temperature adjustment range that can be provided by the terminal device under the current shooting environment based on the obtained compensated color temperatures of at least two of the flashes and the color temperature of the ambient light.

在本公开实施例中,在步骤S201中,可通过终端设备中的检测模组,例如,色温传感器,来获取终端设备当前拍摄环境的环境光色温。In the embodiment of the present disclosure, in step S201, the color temperature of the ambient light of the current shooting environment of the terminal device can be obtained through a detection module in the terminal device, for example, a color temperature sensor.

可以理解的是,所述色温传感器是一种可以检测周围环境色温的传感器,可以直接采集当前拍摄环境的环境光的色温,相比于其他检测环境光的方法,能够得到更为准确的环境光色温。It can be understood that the color temperature sensor is a sensor that can detect the color temperature of the surrounding environment, and can directly collect the color temperature of the ambient light in the current shooting environment. Compared with other methods of detecting ambient light, it can obtain a more accurate color temperature of the ambient light.

在步骤S202中,同样可以通过终端设备中的检测模组,检测至少两个所述闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温。In step S202, the detection module in the terminal device can also detect the compensated color temperature when each of the at least two flashes performs color temperature compensation on the current shooting environment at the maximum working brightness.

需要说明的是,每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温,是指每一个所述闪光灯以最大工作亮度,单独对当前拍摄环境进行色温补偿后的环境光色温。It should be noted that the compensated color temperature when each of the flashes performs color temperature compensation on the current shooting environment at the maximum working brightness refers to the color temperature of the ambient light after each of the flashes performs color temperature compensation on the current shooting environment at the maximum working brightness.

示例性的,图4是根据本公开一示例性实施例示出的一种色温补偿方法的设备示意图。如图4所示,终端设备中可以包括摄像头21、三个不同颜色的闪光灯22(可以分别为红色闪光灯、绿色闪光灯和蓝色闪光灯)和色温传感器23。色温传感器23可以通过对环境光26照射下的被摄体24进行检测,获得当前拍摄环境的环境光色温。色温传感器23还可以通过对环境光26和三个不同颜色的闪光灯22照射下的被摄体24进行检测,获得三个不同颜色的闪光灯22对当前拍摄环境进行色温补偿时的补偿色温。Exemplarily, FIG4 is a schematic diagram of a device for a color temperature compensation method according to an exemplary embodiment of the present disclosure. As shown in FIG4 , the terminal device may include a camera 21, three flashes 22 of different colors (which may be a red flash, a green flash, and a blue flash) and a color temperature sensor 23. The color temperature sensor 23 may obtain the color temperature of the ambient light of the current shooting environment by detecting the subject 24 under the irradiation of the ambient light 26. The color temperature sensor 23 may also detect the subject 24 under the irradiation of the ambient light 26 and the three flashes 22 of different colors to obtain the compensated color temperature when the three flashes 22 of different colors perform color temperature compensation on the current shooting environment.

色温传感器23获得三个不同颜色的闪光灯22对当前拍摄环境进行色温补偿时的补偿色温的过程,包括:启动红色闪光灯以最大工作亮度发光,关闭绿色闪光灯和蓝色闪光灯。色温传感器23检测被摄体24在红色闪光灯和环境光26共同影响下,反射至色温检测器23的混合光25(红光加环境光)的色温,所述混合光25的色温即为所述红色闪光灯对当前拍摄环境进行色温补偿时的补偿色温。以此类推,分别开启绿色闪光灯和蓝色闪光灯,获得绿色闪光灯和蓝色闪光灯对当前拍摄环境进行色温补偿时的补偿色温,从而获得三个不同颜色的闪光灯22对当前拍摄环境进行色温补偿时的补偿色温。The process of the color temperature sensor 23 obtaining the compensated color temperature when the three flashes 22 of different colors perform color temperature compensation on the current shooting environment includes: starting the red flash to emit light at the maximum working brightness, and turning off the green flash and the blue flash. The color temperature sensor 23 detects the color temperature of the mixed light 25 (red light plus ambient light) reflected to the color temperature detector 23 by the subject 24 under the combined influence of the red flash and the ambient light 26. The color temperature of the mixed light 25 is the compensated color temperature when the red flash performs color temperature compensation on the current shooting environment. Similarly, the green flash and the blue flash are turned on respectively to obtain the compensated color temperature when the green flash and the blue flash perform color temperature compensation on the current shooting environment, thereby obtaining the compensated color temperature when the three flashes 22 of different colors perform color temperature compensation on the current shooting environment.

可以理解的是,所述色温传感器23检测到的混合光25,与入射所述摄像头21的混合光25相同。因此,色温传感器23检测到的色温等同于入射至所述摄像头21的环境光的色温,即所述终端设备当前拍摄环境进行色温补偿后的环境光色温。It is understandable that the mixed light 25 detected by the color temperature sensor 23 is the same as the mixed light 25 incident on the camera 21. Therefore, the color temperature detected by the color temperature sensor 23 is equivalent to the color temperature of the ambient light incident on the camera 21, that is, the color temperature of the ambient light after color temperature compensation of the current shooting environment of the terminal device.

在步骤S203中,基于获得的至少两个所述闪光灯中每个所述闪光灯的补偿色温以及所述环境光色温,可以获得每个所述闪光灯的补偿色温与所述环境光色温之间产生的可补偿色温范围;基于多个所述可补偿色温范围,可以确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。In step S203, based on the compensated color temperature of each of the at least two flashes and the color temperature of the ambient light, a compensable color temperature range between the compensated color temperature of each flash and the color temperature of the ambient light can be obtained; based on multiple compensable color temperature ranges, the color temperature adjustment range that the terminal device can provide under the current shooting environment can be determined.

可以理解的是,当每个闪光灯的颜色不同时,每个所述闪光灯相对于所述环境光产生的可补偿色温范围均不相同,将多个可补偿色温范围进行相应的处理,即可确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。It can be understood that when the color of each flash is different, the compensable color temperature range generated by each flash relative to the ambient light is different. By processing multiple compensable color temperature ranges accordingly, the color temperature adjustment range that the terminal device can provide under the current shooting environment can be determined.

在本公开实施例中,通过终端设备中的色温检测器可以直接检测当前拍摄环境的环境光色温和不同颜色闪光灯对当前拍摄环境进行色温补偿时的补偿色温,并基于所述补偿色温和所述环境光色温,可以获得所述终端设备在当前拍摄环境下提供的色温调节范围,方法简便易于实现。In the embodiment of the present disclosure, the color temperature detector in the terminal device can directly detect the ambient light color temperature of the current shooting environment and the compensated color temperature when different colored flashes perform color temperature compensation on the current shooting environment, and based on the compensated color temperature and the ambient light color temperature, the color temperature adjustment range provided by the terminal device in the current shooting environment can be obtained. The method is simple and easy to implement.

可选的,图5是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图三,如图5所示,步骤S101中的基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围,包括:Optionally, FIG5 is a flow chart of a color temperature compensation method according to an exemplary embodiment of the present disclosure. As shown in FIG5, the step S101 determines the color temperature adjustment range that can be provided by the terminal device under the current shooting environment based on the obtained compensated color temperatures of at least two flashes and the ambient light color temperature, including:

步骤S401,基于所述至少两个闪光灯的补偿色温和所述环境光色温,在预设颜色坐标系中分别确定所述至少两个补偿色温对应的第一坐标点和所述环境光色温对应的第二坐标点;Step S401, based on the compensated color temperatures of the at least two flashlights and the color temperature of the ambient light, respectively determining a first coordinate point corresponding to the at least two compensated color temperatures and a second coordinate point corresponding to the color temperature of the ambient light in a preset color coordinate system;

步骤S402,所述第二坐标点和所述至少两个第一坐标点中任意相邻两个所述第一坐标点围合形成至少一个色温调节子区域;所述至少一个色温调节子区域内的任意两个色温调节子区域互不重叠;Step S402: the second coordinate point and any adjacent two of the at least two first coordinate points enclose at least one color temperature adjustment sub-region; any two color temperature adjustment sub-regions in the at least one color temperature adjustment sub-region do not overlap each other;

步骤S403,基于至少一个色温调节子区域对应的色温范围,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Step S403: determining the color temperature adjustment range that can be provided by the terminal device under the current shooting environment based on the color temperature range corresponding to at least one color temperature adjustment sub-region.

在本公开实施例中,在步骤S401中,基于步骤S201至S202中获得的所述至少两个所述闪光灯的补偿色温以及所述环境光色温,可以通过色温转换公式,得到所述至少两个所述闪光灯的补偿色温在预设颜色坐标系中对应的第一坐标点以及所述环境光色温在预设颜色坐标系中对应的第二坐标点。In the embodiment of the present disclosure, in step S401, based on the compensated color temperatures of the at least two flash lights and the color temperature of the ambient light obtained in steps S201 to S202, a first coordinate point corresponding to the compensated color temperatures of the at least two flash lights in a preset color coordinate system and a second coordinate point corresponding to the color temperature of the ambient light in the preset color coordinate system can be obtained through a color temperature conversion formula.

其中,所述预设颜色坐标系可以为色坐标系,就是颜色的坐标系,也叫表色系。所述表色系包括:孟塞尔表色系、CIE(international commission on illumination,国际照明委员会)表色系等。The preset color coordinate system may be a color coordinate system, which is a color coordinate system, also called a colorimetric system, including a Munsell colorimetric system, a CIE (International Commission on Illumination) colorimetric system, and the like.

所述色温转换公式可用于将任意一个色温值转换至其在所述表色系中的坐标点,以在所述表色系中直观表示其颜色。The color temperature conversion formula can be used to convert any color temperature value to its coordinate point in the color system, so as to intuitively represent its color in the color system.

示例性的,当所述表色系为CIE-XYZ表色系时,所述色温转换公式可包括:Exemplarily, when the colorimetric system is the CIE-XYZ colorimetric system, the color temperature conversion formula may include:

色温大于7000K时,采用公式(1)计算色温的坐标点,When the color temperature is greater than 7000K, use formula (1) to calculate the coordinate point of the color temperature:

x=-2.0064*(109/cct3)+1.9018*(106/cct2)+0.2478*(103/cct)+0.237040x=-2.0064*(10 9 /cct 3 )+1.9018*(10 6 /cct 2 )+0.2478*(10 3 /cct)+0.237040

y=-3*x2+2.87*x-0.275 (1)y=-3*x 2 +2.87*x-0.275 (1)

色温小于或等于7000K时,和公式(2)计算色温的坐标点,When the color temperature is less than or equal to 7000K, the color temperature coordinate point is calculated using formula (2):

x=-4.607*(109/cct3)+2.9678*(106/cct2)+0.09911*(103/cct)+0.244063x=-4.607*(10 9 /cct 3 )+2.9678*(10 6 /cct 2 )+0.09911*(10 3 /cct)+0.244063

y=-3*x2+2.87*x-0.275 (2)y=-3*x 2 +2.87*x-0.275 (2)

上述公式(1)和公式(2)中的cct为色温,x为色温在CIE-XYZ表色系中的X色度坐标,y色温在CIE-XYZ表色系中的Y色度坐标。In the above formula (1) and formula (2), cct is the color temperature, x is the X chromaticity coordinate of the color temperature in the CIE-XYZ color system, and y is the Y chromaticity coordinate of the color temperature in the CIE-XYZ color system.

在步骤S402中,通过至少两个所述闪光灯的补偿色温在预设颜色坐标系中对应的第一坐标点以及所述环境光色温在预设颜色坐标系中对应的第二坐标点,可以获得第二坐标点与至少两个所述第一坐标点的分布位置。In step S402, the distribution positions of the second coordinate point and at least two of the first coordinate points can be obtained by using at least two first coordinate points corresponding to the compensated color temperature of the flash in the preset color coordinate system and the second coordinate point corresponding to the ambient light color temperature in the preset color coordinate system.

将所述至少两个第一坐标点中任意相邻的两个第一坐标点与第二坐标点,两两之间进行连线,可围合形成一个色温调节子区域。多组任意相邻的两个第一坐标点与第二坐标点,可围合形成多个互不重叠的色温调节子区域。Any two adjacent first coordinate points and the second coordinate point of the at least two first coordinate points are connected in pairs to form a color temperature adjustment sub-region. Multiple groups of any two adjacent first coordinate points and the second coordinate point can form multiple non-overlapping color temperature adjustment sub-regions.

示例性的,图6是根据本公开一示例性实施例示出的一种配置有三个不同颜色的单色闪光灯的终端设备的色温调节范围的示意图。如图6所示,CIE-XYZ表色系中的X色度坐标相当于红原色的比例,Y色度坐标相当于绿原色的比例。马蹄形的光谱轨迹各波长(图示的460nm-620nm)的位置可以看到:光谱的红色波段集中在轨迹的右下部,绿色波段集中在轨迹的上部,蓝色波段集中在轨迹的左下部。Exemplarily, FIG6 is a schematic diagram of a color temperature adjustment range of a terminal device equipped with three monochrome flash lamps of different colors according to an exemplary embodiment of the present disclosure. As shown in FIG6, the X chromaticity coordinate in the CIE-XYZ color system is equivalent to the proportion of the red primary color, and the Y chromaticity coordinate is equivalent to the proportion of the green primary color. The position of each wavelength (460nm-620nm in the figure) of the horseshoe-shaped spectrum track can be seen: the red band of the spectrum is concentrated in the lower right part of the track, the green band is concentrated in the upper part of the track, and the blue band is concentrated in the lower left part of the track.

坐标点a为环境光色温根据上述公式(1)和公式(2)获得的在预设颜色坐标系中对应的第二坐标点,坐标点b、坐标点c和坐标点d分别为三个补偿色温根据上述公式(1)和公式(2)获得的在预设颜色坐标系中对应的第一坐标点,任意相邻的两个第一坐标点与第二坐标点围合形成一个色温调节子区域(例如色温调节子区域A),三个第一坐标点与第二坐标点共围合形成三个色温调节子区域,如色温调节子区域A、色温调节子区域B和色温调节子区域C。Coordinate point a is the second coordinate point corresponding to the ambient light color temperature obtained according to the above formula (1) and formula (2) in the preset color coordinate system, coordinate point b, coordinate point c and coordinate point d are respectively the first coordinate points corresponding to the three compensated color temperatures obtained according to the above formula (1) and formula (2) in the preset color coordinate system, any two adjacent first coordinate points and the second coordinate point enclose a color temperature adjustment sub-region (for example, color temperature adjustment sub-region A), and the three first coordinate points and the second coordinate points enclose three color temperature adjustment sub-regions, such as color temperature adjustment sub-region A, color temperature adjustment sub-region B and color temperature adjustment sub-region C.

所述相邻的两个第一坐标点是指所述两个第一坐标点在预设坐标系中的位置之间不具有其他第一坐标点的两个第一坐标点,即所述相邻的两个第一坐标点的颜色比值相比于其他第一坐标点的颜色参数为最接近的颜色比值。The two adjacent first coordinate points refer to two first coordinate points between which there are no other first coordinate points in the preset coordinate system, that is, the color ratio of the two adjacent first coordinate points is the closest color ratio compared to the color parameters of other first coordinate points.

需要说明的是,所述颜色参数为所述预设颜色坐标系中的每个坐标点所对应唯一的光谱三刺激值,也即每个坐标点在RGB(红色、绿色和蓝色)三个参数上对应唯一比值。示例性的,如图6所示,坐标点b、坐标点d可以为绿色闪光灯和红色闪光灯分别以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温,坐标点b和坐标点d构成相邻的两个第一坐标点。It should be noted that the color parameter is a unique spectral tristimulus value corresponding to each coordinate point in the preset color coordinate system, that is, each coordinate point corresponds to a unique ratio on the three parameters of RGB (red, green and blue). Exemplarily, as shown in FIG6 , coordinate point b and coordinate point d can be the compensated color temperature when the green flash and the red flash are at the maximum working brightness respectively, and the color temperature compensation is performed on the current shooting environment, and the coordinate point b and the coordinate point d constitute two adjacent first coordinate points.

在确定任意相邻两个不同闪光灯对应的第一坐标点后,即相邻两个颜色不同的闪光灯各自打开时的补偿色温在预设坐标系中的坐标点后,基于两个第一坐标点和第二坐标点,确定封闭区域。该封闭区域内的坐标点就可以理解为两个颜色不同的闪光灯共同对所述环境光色温进行补偿时能够实现的补偿色温。After determining the first coordinate points corresponding to any two adjacent flashes of different colors, that is, the coordinate points of the compensated color temperature when the two adjacent flashes of different colors are turned on in the preset coordinate system, a closed area is determined based on the two first coordinate points and the second coordinate points. The coordinate points in the closed area can be understood as the compensated color temperature that can be achieved when the two flashes of different colors jointly compensate for the color temperature of the ambient light.

通过调整两个颜色不同的闪光灯的亮度,可以改变两个颜色不同的闪光灯发射的光线的颜色,从而根据两种不同颜色的光线产生的混色光线对当前拍摄环境进行色温补偿时的补偿色温,得到所述封闭区域内的坐标点。By adjusting the brightness of two flash lights of different colors, the colors of the light emitted by the two flash lights of different colors can be changed, so that the coordinate points in the closed area can be obtained by compensating the color temperature of the current shooting environment according to the mixed light generated by the two different colors of light.

示例性的,如图6所示,坐标点a、坐标点b和坐标点d之间围合形成的封闭区域内的坐标点可通过绿色闪光灯和红色闪光灯同时开启后获得。Exemplarily, as shown in FIG6 , the coordinate points in the closed area formed by the coordinate points a, b, and d can be obtained by turning on the green flash light and the red flash light at the same time.

在步骤S403中,基于步骤S402中获得的至少一个色温调节子区域,可以确定该色温调节子区域对应的色温范围,从而确定出所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。In step S403, based on the at least one color temperature adjustment sub-region obtained in step S402, the color temperature range corresponding to the color temperature adjustment sub-region can be determined, thereby determining the color temperature adjustment range that the terminal device can provide under the current shooting environment.

可以理解的是,根据所述色温调节子区域中所包含的所有坐标点,可以确定所述所有坐标点对应的色温,从而确定出所述色温调节子区域对应的色温范围;基于所有所述色温子区域对应的色温范围,可以确定出所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。It can be understood that, based on all the coordinate points contained in the color temperature adjustment sub-area, the color temperatures corresponding to all the coordinate points can be determined, thereby determining the color temperature range corresponding to the color temperature adjustment sub-area; based on the color temperature ranges corresponding to all the color temperature sub-areas, the color temperature adjustment range that the terminal device can provide under the current shooting environment can be determined.

在本公开实施例中,通过引入预设颜色坐标系,以及获取补偿色温和环境光色温在预设颜色坐标系中的坐标点,从而可以基于坐标点直观确定出所述终端设备在当前拍摄环境下能够提供的所述色温调节范围,显著提高获取色温调节范围的准确性,从而实现更准确的色温补偿。In the embodiment of the present disclosure, by introducing a preset color coordinate system and obtaining the coordinate points of the compensation color temperature and the ambient light color temperature in the preset color coordinate system, the color temperature adjustment range that the terminal device can provide under the current shooting environment can be intuitively determined based on the coordinate points, thereby significantly improving the accuracy of obtaining the color temperature adjustment range, thereby achieving more accurate color temperature compensation.

可选的,所述若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯,包括:Optionally, if the target color temperature is within the color temperature adjustment range, determining at least one target flash light from the at least two flash lights comprises:

确定所述目标色温在预设颜色坐标系中对应的目标坐标点;Determine a target coordinate point corresponding to the target color temperature in a preset color coordinate system;

确定所述目标坐标点与至少一个所述色温调节子区域的位置关系;Determining a positional relationship between the target coordinate point and at least one of the color temperature adjustment sub-regions;

若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located are determined as the target flashes.

在本公开实施例中,可采用同样的色温转换公式将目标色温转化为在预设颜色坐标系中对应的目标坐标点,并且基于确定出的目标坐标点与至少一个所述色温调节子区域的位置关系,采用不同的补偿方案进行色温补偿。In the embodiment of the present disclosure, the same color temperature conversion formula can be used to convert the target color temperature into a corresponding target coordinate point in a preset color coordinate system, and based on the determined positional relationship between the target coordinate point and at least one of the color temperature adjustment sub-areas, different compensation schemes can be used to perform color temperature compensation.

示例性的,图7是根据本公开一示例性实施例示出的色温在预设颜色坐标系中的示意图。如图7所示,曲线Tc(K)代表不同色温在CIE-XYZ表色系中的位置点(图中示出了色温1500K至色温10000K中部分色温在位置点)。For example, Fig. 7 is a schematic diagram of color temperature in a preset color coordinate system according to an exemplary embodiment of the present disclosure. As shown in Fig. 7, the curve Tc (K) represents the position points of different color temperatures in the CIE-XYZ color system (the figure shows the position points of some color temperatures from 1500K to 10000K).

若位置关系指示所述目标坐标点未位于所述色温调节子区域内,说明即使利用终端设备的至少两个闪光灯对当前拍摄环境进行色温补偿,补偿后的环境光色温也不能达到所述目标色温,此时可以选用其它的色温补偿方式对所述当前拍摄环境进行色温补偿。If the position relationship indicates that the target coordinate point is not located in the color temperature adjustment sub-area, it means that even if at least two flashes of the terminal device are used to compensate for the color temperature of the current shooting environment, the compensated ambient light color temperature cannot reach the target color temperature. At this time, other color temperature compensation methods can be used to compensate for the color temperature of the current shooting environment.

若位置关系指示所述目标坐标点位于所述色温调节子区域内(包括色温调节子区域的内部和色温调节子区域边缘连线上),将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-area (including the interior of the color temperature adjustment sub-area and the edge connection line of the color temperature adjustment sub-area), the two flashes corresponding to the color temperature adjustment sub-area where the target coordinate point is located are determined as the target flashes.

可以理解的是,所述色温调节子区域对应的两个闪光灯是指构成所述色温调节子区域的两个第一坐标点所对应的闪光灯。例如,图6所示的构成色温调节子区域A的坐标点b和坐标点d所对应的闪光灯。It is understandable that the two flashes corresponding to the color temperature adjustment sub-area refer to the flashes corresponding to the two first coordinate points constituting the color temperature adjustment sub-area, for example, the flashes corresponding to the coordinate points b and d constituting the color temperature adjustment sub-area A shown in FIG6 .

在本公开实施例中,通过确定目标坐标点的位置,以及确定目标坐标点的位置与至少一个色温调节子区域的位置关系,可以得到补偿所述环境光色温的闪光灯。In the embodiment of the present disclosure, by determining the position of the target coordinate point and determining the positional relationship between the position of the target coordinate point and at least one color temperature adjustment sub-region, a flash light that compensates for the color temperature of the ambient light can be obtained.

可选的,所述利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿,包括:Optionally, using the at least one target flash to perform color temperature compensation on the current shooting environment includes:

分别确定所述目标坐标点所在的色温调节子区域对应的两个第一坐标点与所述目标坐标点之间的距离;respectively determining the distances between the target coordinate point and two first coordinate points corresponding to the color temperature adjustment sub-region where the target coordinate point is located;

基于两个所述第一坐标点对应的距离之间的比值,确定两个所述目标闪光灯的颜色补偿参数;Determining color compensation parameters of the two target flash lights based on a ratio between the distances corresponding to the two first coordinate points;

基于所述颜色补偿参数,分别确定两个所述目标闪光灯的目标工作亮度;Based on the color compensation parameters, respectively determining the target working brightness of the two target flash lamps;

利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿。The color temperature of the current shooting environment is compensated by using the two target flash lamps at the target working brightness.

在本公开实施例中,在确定所述目标坐标点位于所述色温调节子区域内时,可以确定所述色温调节子区域对应的两个第一坐标点。再根据两个坐标点与目标坐标点的位置,确定所述目标坐标点分别与两个第一坐标点的距离。In the embodiment of the present disclosure, when it is determined that the target coordinate point is located in the color temperature adjustment sub-area, two first coordinate points corresponding to the color temperature adjustment sub-area may be determined, and then the distances between the target coordinate point and the two first coordinate points may be determined according to the positions of the two coordinate points and the target coordinate point.

假设目标坐标点与第一个第一坐标点的距离为第一值,与第二个第一坐标点的距离为第二值,第一值可以与第二值相同,第一值也可以与第二值不同。Assume that the distance between the target coordinate point and the first first coordinate point is a first value, and the distance between the target coordinate point and the second first coordinate point is a second value. The first value may be the same as the second value, or may be different from the second value.

基于第一值与第二值的比值,可以确定两个第一坐标点所对应的目标闪光灯的颜色补偿参数,第一值与第一个第一坐标点所对应的目标闪光灯的颜色补偿参数相关,第二值与二个第一坐标点所对应的目标闪光灯的颜色补偿参数相关。Based on the ratio of the first value to the second value, the color compensation parameters of the target flash lights corresponding to the two first coordinate points can be determined. The first value is related to the color compensation parameters of the target flash lights corresponding to the first first coordinate point, and the second value is related to the color compensation parameters of the target flash lights corresponding to the two first coordinate points.

可以理解的是,所述颜色补偿参数为所述目标闪光灯实现将环境光色温补偿为目标色温时需要呈现的颜色占该闪光灯最大颜色的比值。示例性的,当所述第一值与第二值的比值为4:6时,所述第一个第一坐标点所对应的目标闪光灯的颜色补偿参数可为40%,即所述目标闪光灯的开启颜色为该闪光灯最大颜色的40%;所述第二个第一坐标点所对应的目标闪光灯的颜色补偿参数可为60%,即所述目标闪光灯的开启颜色为该闪光灯最大颜色的60%。It can be understood that the color compensation parameter is the ratio of the color that the target flash needs to present when compensating the ambient light color temperature to the target color temperature to the maximum color of the flash. Exemplarily, when the ratio of the first value to the second value is 4:6, the color compensation parameter of the target flash corresponding to the first first coordinate point can be 40%, that is, the color of the target flash when it is turned on is 40% of the maximum color of the flash; the color compensation parameter of the target flash corresponding to the second first coordinate point can be 60%, that is, the color of the target flash when it is turned on is 60% of the maximum color of the flash.

在一些实施例中,可通过标定所述闪光灯的方法获得所述闪光灯最大颜色。所述标定方法可为:在全黑的环境中,以最大工作亮度打开闪光灯,启动检测模块获得所述闪光灯最大颜色。In some embodiments, the maximum color of the flashlight can be obtained by calibrating the flashlight. The calibration method can be: in a completely dark environment, turn on the flashlight at the maximum working brightness, and start the detection module to obtain the maximum color of the flashlight.

基于所述颜色补偿参数可分别确定两个所述目标闪光灯的目标工作亮度,利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿,即可将环境光色温补偿为所述目标色温。The target working brightness of the two target flash lamps can be determined respectively based on the color compensation parameters. The color temperature of the ambient light can be compensated to the target color temperature by using the two target flash lamps at the target working brightness to perform color temperature compensation on the current shooting environment.

其中,所述目标工作亮度是指所述目标闪光灯实现发出特定颜色时的工作亮度。The target working brightness refers to the working brightness of the target flash lamp when it emits a specific color.

可以理解的是,基于所述颜色补偿参数可以确定所述目标闪光灯的开启颜色为该闪光灯最大颜色的百分比,从而确定所述目标闪光灯的工作颜色。同时,基于所需的工作颜色,可以确定两个所述目标闪光灯的目标工作亮度。It is understandable that, based on the color compensation parameter, the percentage of the target flashlight's maximum color can be determined to determine the target flashlight's operating color. At the same time, based on the required operating color, the target operating brightness of the two target flashlights can be determined.

在本公开实施例中,通过确定所述目标闪光灯距离所在色温调节子区域对应的两个第一坐标点的距离,可以量化所述目标闪光灯的目标工作亮度,从而实现对环境光色温进行补偿。In the embodiment of the present disclosure, by determining the distance between the target flash and the two first coordinate points corresponding to the color temperature adjustment sub-region, the target working brightness of the target flash can be quantified, thereby achieving compensation for the color temperature of ambient light.

可选的,所述若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯,包括:Optionally, if the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, determining two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located as the target flashes includes:

若位置关系指示所述目标坐标点位于所述色温调节子区域内,确定所述目标坐标点是否处于所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上;If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-area, determining whether the target coordinate point is located on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-area and the second coordinate point;

若所述目标坐标点不处于所述连线上,将所述色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the target coordinate point is not on the connecting line, the two flashes corresponding to the color temperature adjustment sub-area are determined as the target flashes.

在本公开实施例中,若位置关系指示所述目标坐标点位于一个所述色温调节子区域内,需要确定所述目标坐标点是否处于该所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上。这里,所述第一坐标点与所述第二坐标点的连线是指在预设颜色坐标系中,由所述第一坐标点到所述第二坐标点所形成的直线。In the embodiment of the present disclosure, if the position relationship indicates that the target coordinate point is located in one of the color temperature adjustment sub-areas, it is necessary to determine whether the target coordinate point is located on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-area and the second coordinate point. Here, the line connecting the first coordinate point and the second coordinate point refers to a straight line formed by the first coordinate point to the second coordinate point in a preset color coordinate system.

若所述目标坐标点不处于所述连线上,即位于所述色温调节子区域对应的两个第一坐标点和一个第二坐标点两两之间围合形成三角区域内,可以将形成所述色温调节子区域的两个第一坐标点对应的两个闪光灯确定为所述目标闪光灯。If the target coordinate point is not on the connecting line, that is, is located in a triangular area enclosed between two first coordinate points and one second coordinate point corresponding to the color temperature adjustment sub-area, the two flashes corresponding to the two first coordinate points forming the color temperature adjustment sub-area can be determined as the target flashes.

可以理解的是,所述目标坐标点位于所述色温调节子区域对应的两个第一坐标点和一个第二坐标点两两之间围合形成三角区域内,即仅用单色闪光灯对当前拍摄环境进行色温补偿后的环境光色温,不能达到所需的目标色温,需要利用两个不同颜色的单色闪光灯产生的混合颜色的光线对当前拍摄环境进行补偿,因此,将两个第一坐标点对应的闪光灯确定为目标闪光灯,基于目标闪光灯对所述环境光色温进行补偿,可以实现本公开实施例中的色温补偿方案。It can be understood that the target coordinate point is located in the triangular area enclosed by two first coordinate points and one second coordinate point corresponding to the color temperature adjustment sub-area, that is, the color temperature of the ambient light after color temperature compensation of the current shooting environment using only a monochrome flash cannot reach the required target color temperature, and it is necessary to use the mixed color light generated by two monochrome flashes of different colors to compensate for the current shooting environment. Therefore, the flashes corresponding to the two first coordinate points are determined as target flashes, and the color temperature of the ambient light is compensated based on the target flashes, so as to realize the color temperature compensation scheme in the embodiment of the present disclosure.

可选的,所述方法,包括:Optionally, the method comprises:

若所述目标坐标点处于所述连线上,将形成所述连线的所述第一坐标点对应的闪光灯,确定为所述目标闪光灯。If the target coordinate point is on the connection line, the flash corresponding to the first coordinate point forming the connection line is determined as the target flash.

在本公开实施例中,若所述目标坐标点处于所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上,可以将形成所述连线的所述第一坐标点对应的闪光灯确定为目标闪光灯。In an embodiment of the present disclosure, if the target coordinate point is on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-area and the second coordinate point, the flash corresponding to the first coordinate point forming the line can be determined as the target flash.

需要说明的是,若所述目标坐标点位于所述连线上,说明利用单色闪光灯产生的光线对当前拍摄环境进行色温补偿后的环境光色温,已经能够达到所需的目标色温,因此,将连线上的第一坐标点对应的闪光灯确定为目标闪光灯,基于目标闪光灯对所述环境光色温进行补偿,可以实现本公开实施例中的色温补偿方案。It should be noted that if the target coordinate point is located on the connecting line, it means that the color temperature of the ambient light after color temperature compensation of the current shooting environment using the light generated by the monochromatic flash has been able to reach the required target color temperature. Therefore, the flash corresponding to the first coordinate point on the connecting line is determined as the target flash, and the color temperature of the ambient light is compensated based on the target flash, so as to realize the color temperature compensation scheme in the embodiment of the present disclosure.

在本公开实施例中,相比于两个目光闪光灯对环境光色温补偿的方案,一个目标闪光灯对环境光色温进行补偿,能够节能且高效。In the embodiment of the present disclosure, compared with the solution of using two eye flashes to compensate for the color temperature of ambient light, one target flash compensates for the color temperature of ambient light, which is energy-saving and highly efficient.

本公开还提供以下实施例:The present disclosure also provides the following embodiments:

图8是根据本公开一示例性实施例示出的一种色温补偿方法的流程示意图四,所述方法包括:FIG8 is a fourth flow chart of a color temperature compensation method according to an exemplary embodiment of the present disclosure, wherein the method includes:

S701,检测终端设备当前拍摄环境的环境光色温;S701, detecting the color temperature of the ambient light in the current shooting environment of the terminal device;

S702,检测RGB闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的三个补偿色温;S702, detecting three compensated color temperatures when each of the RGB flash lamps performs color temperature compensation for the current shooting environment at the maximum working brightness;

S703,获取所述终端设备的目标色温;S703, obtaining a target color temperature of the terminal device;

S704,确定环境光色温、三个补偿色温和目标色温在CIE-XYZ表色系中分别对应的第二坐标点、三个第一坐标点和目标坐标点;S704, determining the second coordinate point, three first coordinate points and the target coordinate point corresponding to the ambient light color temperature, the three compensation color temperatures and the target color temperature in the CIE-XYZ color system;

S705,若目标坐标点位于第一坐标点与三个第二坐标点中任意两个第二坐标点围合的色温调节子区域内,确定目标坐标点是否处于色温调节子区域对应的两个第一坐标点中任意一个第一坐标点与第二坐标点的连线上;S705, if the target coordinate point is located in the color temperature adjustment sub-region enclosed by the first coordinate point and any two of the three second coordinate points, determine whether the target coordinate point is on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-region and the second coordinate point;

S706,若目标坐标点不处于连线上,将色温调节子区域对应的两个闪光灯,确定为目标闪光灯;S706, if the target coordinate point is not on the connecting line, two flashes corresponding to the color temperature adjustment sub-area are determined as target flashes;

S707,确定目标坐标点所在的色温调节子区域对应的两个第一坐标点与所述目标坐标点之间的距离;S707, determining the distance between the target coordinate point and two first coordinate points corresponding to the color temperature adjustment sub-region where the target coordinate point is located;

S708,基于两个所述第一坐标点对应的距离之间的比值,分别确定两个所述目标闪光灯的目标工作亮度;S708, determining target working brightness of the two target flash lights respectively based on the ratio between the distances corresponding to the two first coordinate points;

S709,利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿。S709: Perform color temperature compensation on the current shooting environment by using the two target flash lamps at the target working brightness.

在本公开实施例中,通过终端设备当前拍摄环境的环境光色温和RGB闪光灯在当前拍摄环境下能够提供的补偿色温,以及终端设备的目标色温,可以确定出目标色温是否位于RGB闪光灯在当前拍摄环境下提供的色温调节范围。并在该目标色温处于色温调节范围内,说明环境光色温可调节至目标色温时,确定两个一个目标闪光灯,用以对当前拍摄环境进行色温补偿,使得补偿后的环境光色温与目标色温相同,随即实现拍照所需的目标色温,满足所需的拍照效果。另外,相比于单色闪光灯所能提供的色温调节范围,RGB闪光灯能够提供更大的色温补偿范围,满足用户的更多需求。In the disclosed embodiment, by using the ambient light color temperature of the current shooting environment of the terminal device, the compensated color temperature that the RGB flash can provide in the current shooting environment, and the target color temperature of the terminal device, it can be determined whether the target color temperature is within the color temperature adjustment range provided by the RGB flash in the current shooting environment. And when the target color temperature is within the color temperature adjustment range, indicating that the ambient light color temperature can be adjusted to the target color temperature, two target flashes are determined to perform color temperature compensation on the current shooting environment, so that the compensated ambient light color temperature is the same as the target color temperature, and then the target color temperature required for taking pictures is achieved to meet the required photographic effect. In addition, compared with the color temperature adjustment range that can be provided by a monochrome flash, the RGB flash can provide a larger color temperature compensation range to meet more user needs.

本申请实施例提供了一种色温补偿装置800,图9是根据本公开一示例性实施例示出的一种色温补偿装置的结构示意图,如图9所示,所述色温补偿装置800设置于包含有至少两个不同颜色的单色闪光灯的终端设备,包括:The embodiment of the present application provides a color temperature compensation device 800. FIG9 is a schematic diagram of the structure of a color temperature compensation device according to an exemplary embodiment of the present disclosure. As shown in FIG9 , the color temperature compensation device 800 is provided in a terminal device including at least two monochrome flash lamps of different colors, including:

第一确定模块830,用于基于所述终端设备当前拍摄环境的环境光色温,确定所述终端设备内的至少两个所述闪光灯在当前拍摄环境下提供的色温调节范围;A first determination module 830 is used to determine the color temperature adjustment range provided by at least two flash lamps in the terminal device under the current shooting environment based on the color temperature of the ambient light in the current shooting environment of the terminal device;

获取模块840,用于获取所述终端设备的目标色温;An acquisition module 840 is used to acquire a target color temperature of the terminal device;

第二确定模块850,用于若所述目标色温处于所述色温调节范围内,从所述至少两个闪光灯中确定至少一个目标闪光灯;A second determination module 850 is configured to determine at least one target flash light from the at least two flash lights if the target color temperature is within the color temperature adjustment range;

补偿模块860,用于利用所述至少一个目标闪光灯,对当前拍摄环境进行色温补偿;其中,基于所述至少一个目标闪光灯补偿后的环境光色温与所述目标色温相同。The compensation module 860 is used to use the at least one target flash to perform color temperature compensation on the current shooting environment; wherein the color temperature of the ambient light after compensation based on the at least one target flash is the same as the target color temperature.

可选的,所述第一确定模块830,还用于获取终端设备当前拍摄环境的环境光色温;Optionally, the first determining module 830 is further used to obtain the color temperature of the ambient light of the current shooting environment of the terminal device;

检测至少两个所述闪光灯中的每一个所述闪光灯以最大工作亮度,对当前拍摄环境进行色温补偿时的补偿色温;Detecting the compensated color temperature of each of the at least two flashes when performing color temperature compensation for the current shooting environment at the maximum working brightness;

基于获得的至少两个所述闪光灯的补偿色温以及所述环境光色温,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the obtained compensated color temperatures of at least two of the flashes and the color temperature of the ambient light, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述第一确定模块830,还用于基于所述至少两个闪光灯的补偿色温和所述环境光色温,在预设颜色坐标系中分别确定所述至少两个补偿色温对应的第一坐标点和所述环境光色温对应的第二坐标点;Optionally, the first determination module 830 is further configured to respectively determine, in a preset color coordinate system, first coordinate points corresponding to the at least two compensated color temperatures and a second coordinate point corresponding to the ambient light color temperature based on the compensated color temperatures of the at least two flashes and the ambient light color temperature;

所述第二坐标点和所述至少两个第一坐标点中任意相邻两个所述第一坐标点围合形成至少一个色温调节子区域;所述至少一个色温调节子区域内的任意两个色温调节子区域互不重叠;The second coordinate point and any adjacent two of the at least two first coordinate points enclose at least one color temperature adjustment sub-region; any two color temperature adjustment sub-regions in the at least one color temperature adjustment sub-region do not overlap each other;

基于至少一个色温调节子区域对应的色温范围,确定所述终端设备在当前拍摄环境下能够提供的所述色温调节范围。Based on the color temperature range corresponding to at least one color temperature adjustment sub-area, the color temperature adjustment range that can be provided by the terminal device under the current shooting environment is determined.

可选的,所述第二确定模块850,用于确定所述目标色温在预设颜色坐标系中对应的目标坐标点;Optionally, the second determination module 850 is used to determine a target coordinate point corresponding to the target color temperature in a preset color coordinate system;

确定所述目标坐标点与至少一个所述色温调节子区域的位置关系;Determining a positional relationship between the target coordinate point and at least one of the color temperature adjustment sub-regions;

若位置关系指示所述目标坐标点位于所述色温调节子区域内,将所述目标坐标点所在的色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region, two flashes corresponding to the color temperature adjustment sub-region where the target coordinate point is located are determined as the target flashes.

可选的,补偿模块860,还用于分别确定所述目标坐标点所在的色温调节子区域对应的两个第一坐标点与所述目标坐标点之间的距离;Optionally, the compensation module 860 is further configured to respectively determine the distances between the target coordinate point and two first coordinate points corresponding to the color temperature adjustment sub-region where the target coordinate point is located;

基于两个所述第一坐标点对应的距离之间的比值,确定两个所述目标闪光灯的颜色补偿参数;Determining color compensation parameters of the two target flash lights based on a ratio between the distances corresponding to the two first coordinate points;

基于所述颜色补偿参数,分别确定两个所述目标闪光灯的目标工作亮度;Based on the color compensation parameters, respectively determining the target working brightness of the two target flash lamps;

利用处于所述目标工作亮度的两个所述目标闪光灯,对当前拍摄环境进行色温补偿。The color temperature of the current shooting environment is compensated by using the two target flash lamps at the target working brightness.

可选的,所述第二确定模块850,用于若位置关系指示所述目标坐标点位于所述色温调节子区域内,确定所述目标坐标点是否处于所述色温调节子区域对应的两个所述第一坐标点中任意一个所述第一坐标点与所述第二坐标点的连线上;Optionally, the second determination module 850 is configured to determine whether the target coordinate point is located on a line connecting any one of the two first coordinate points corresponding to the color temperature adjustment sub-region and the second coordinate point if the position relationship indicates that the target coordinate point is located within the color temperature adjustment sub-region;

若所述目标坐标点不处于所述连线上,将所述色温调节子区域对应的两个闪光灯,确定为所述目标闪光灯。If the target coordinate point is not on the connecting line, the two flashes corresponding to the color temperature adjustment sub-area are determined as the target flashes.

可选的,所述第二确定模块850,用于若所述目标坐标点处于所述连线上,将形成所述连线的所述第一坐标点对应的闪光灯,确定为所述目标闪光灯。Optionally, the second determination module 850 is configured to determine the flash corresponding to the first coordinate point forming the connection line as the target flash if the target coordinate point is on the connection line.

图10是根据本公开一示例性实施例示出的一种终端设备的框图。例如,终端设备80可以是移动电话,移动电脑等。终端设备80,包括:至少两个不同颜色的单色闪光灯。Fig. 10 is a block diagram of a terminal device according to an exemplary embodiment of the present disclosure. For example, the terminal device 80 may be a mobile phone, a mobile computer, etc. The terminal device 80 includes: at least two monochrome flashlights of different colors.

参照图10,终端设备80可以包括以下一个或多个组件:处理组件83,存储器84,电源组件85,多媒体组件86,音频组件87,输入/输出(I/O)的接口88,传感器组件89,以及通信组件810。10 , the terminal device 80 may include one or more of the following components: a processing component 83 , a memory 84 , a power component 85 , a multimedia component 86 , an audio component 87 , an input/output (I/O) interface 88 , a sensor component 89 , and a communication component 810 .

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

存储器84被配置为存储各种类型的数据以支持在终端设备80的操作。这些数据的示例包括用于在终端设备80上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器84可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 84 is configured to store various types of data to support operations on the terminal device 80. Examples of such data include instructions for any application or method operating on the terminal device 80, contact data, phone book data, messages, pictures, videos, etc. The memory 84 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.

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

多媒体组件86包括在所述终端设备80和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件86包括一个前置摄像头和/或后置摄像头。当终端设备80处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 86 includes a screen that provides an output interface between the terminal device 80 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 86 includes a front camera and/or a rear camera. When the terminal device 80 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 the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

音频组件87被配置为输出和/或输入音频信号。例如,音频组件87包括一个麦克风(MIC),当终端设备80处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器84或经由通信组件810发送。在一些实施例中,音频组件87还包括一个扬声器,用于输出音频信号。The audio component 87 is configured to output and/or input audio signals. For example, the audio component 87 includes a microphone (MIC), and when the terminal device 80 is in an operation 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 84 or sent via the communication component 810. In some embodiments, the audio component 87 also includes a speaker for outputting audio signals.

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

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

通信组件810被配置为便于终端设备80和其他设备之间有线或无线方式的通信。终端设备80可以接入基于通信标准的无线网络,如Wi-Fi,4G或5G,或它们的组合。在一个示例性实施例中,通信组件810经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件810还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 810 is configured to facilitate wired or wireless communication between the terminal device 80 and other devices. The terminal device 80 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 810 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 810 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.

在示例性实施例中,终端设备80可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the terminal device 80 can 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 method.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由终端设备80的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of the terminal device 80 to complete 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.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. 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 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 (10)

1. A color temperature compensation method applied to a terminal device including at least two monochromatic flashlights of different colors, comprising:
Determining a color temperature adjusting range provided by at least two flash lamps in the terminal equipment under the current shooting environment based on the ambient light color temperature of the current shooting environment of the terminal equipment;
acquiring a target color temperature of the terminal equipment;
if the target color temperature is within the color temperature adjusting range, determining at least one target flash lamp from the at least two flash lamps;
performing color temperature compensation on the current shooting environment by using the at least one target flash lamp; wherein the color temperature of the ambient light compensated based on the at least one target flash is the same as the target color temperature.
2. The method according to claim 1, wherein said determining a color temperature adjustment range provided by at least two of said flash lamps in said terminal device in a current shooting environment based on an ambient light color temperature of a current shooting environment of said terminal device comprises:
Acquiring the ambient light color temperature of the current shooting environment of the terminal equipment;
Detecting a compensated color temperature when each of at least two flash lamps performs color temperature compensation on a current photographing environment at a maximum working brightness;
And determining the color temperature adjusting range which can be provided by the terminal equipment under the current shooting environment based on the obtained compensated color temperatures of the at least two flashlights and the ambient light color temperature.
3. The method according to claim 2, wherein said determining the color temperature adjustment range that the terminal device is able to provide in the current shooting environment based on the obtained compensated color temperatures of the at least two flash lamps and the ambient light color temperature comprises:
Based on the compensation color temperatures of the at least two flash lamps and the ambient light color temperature, respectively determining a first coordinate point corresponding to the at least two compensation color temperatures and a second coordinate point corresponding to the ambient light color temperature in a preset color coordinate system;
the second coordinate point and any adjacent two first coordinate points in the at least two first coordinate points are enclosed to form at least one color temperature adjusting sub-area; any two color temperature adjustment subareas in the at least one color temperature adjustment subarea are not overlapped with each other;
And determining the color temperature adjusting range which can be provided by the terminal equipment under the current shooting environment based on the color temperature range corresponding to the at least one color temperature adjusting subarea.
4. The method of claim 3, wherein determining at least one target flash from the at least two flashes if the target color temperature is within the color temperature adjustment range comprises:
Determining a corresponding target coordinate point of the target color temperature in a preset color coordinate system;
Determining the position relation between the target coordinate point and at least one color temperature regulation subarea;
And if the position relation indicates that the target coordinate point is positioned in the color temperature adjustment subarea, determining two flashlamps corresponding to the color temperature adjustment subarea in which the target coordinate point is positioned as the target flashlamp.
5. The method of claim 4, wherein said compensating for the color temperature of the current photographic environment using said at least one target flash comprises:
Respectively determining the distance between two first coordinate points corresponding to the color temperature regulation subareas where the target coordinate points are located and the target coordinate points;
Determining color compensation parameters of the two target flashlights based on the ratio between the distances corresponding to the two first coordinate points;
determining target working brightness of the two target flashlights respectively based on the color compensation parameters;
and performing color temperature compensation on the current shooting environment by using the two target flashlamps at the target working brightness.
6. The method of claim 4, wherein determining two flashlamps corresponding to the color temperature adjustment sub-region in which the target coordinate point is located as the target flashlamp if the positional relationship indicates that the target coordinate point is located in the color temperature adjustment sub-region comprises:
if the position relationship indicates that the target coordinate point is located in the color temperature adjustment sub-area, determining whether the target coordinate point is located on a connecting line of any one of the first coordinate point and the second coordinate point in the two first coordinate points corresponding to the color temperature adjustment sub-area;
And if the target coordinate point is not located on the connecting line, determining the two flash lamps corresponding to the color temperature adjusting sub-region as the target flash lamp.
7. The method according to claim 6, characterized in that the method comprises:
And if the target coordinate point is on the connecting line, determining a flash lamp corresponding to the first coordinate point forming the connecting line as the target flash lamp.
8. A color temperature compensation apparatus provided in a terminal device including at least two monochromatic flashlights of different colors, comprising:
The first determining module is used for determining a color temperature adjusting range provided by at least two flash lamps in the terminal equipment under the current shooting environment based on the ambient light color temperature of the current shooting environment of the terminal equipment;
The acquisition module is used for acquiring the target color temperature of the terminal equipment;
the second determining module is used for determining at least one target flash lamp from the at least two flash lamps if the target color temperature is in the color temperature adjusting range;
The compensation module is used for compensating the color temperature of the current shooting environment by utilizing the at least one target flash lamp; wherein the color temperature of the ambient light compensated based on the at least one target flash is the same as the target color temperature.
9. A terminal device, comprising:
at least two monochromatic flashlights of different colors;
A memory for storing processor-executable instructions;
a processor connected to the memory;
wherein the processor is configured to perform the color temperature compensation method of any one of claims 1 to 7.
10. A non-transitory computer readable storage medium, which when executed by a processor of a terminal device, causes the terminal device to perform the color temperature compensation method of any one of claims 1 to 7.
CN202310147354.8A 2023-02-20 2023-02-20 Color temperature compensation method, device, terminal equipment and storage medium Pending CN118524299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310147354.8A CN118524299A (en) 2023-02-20 2023-02-20 Color temperature compensation method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310147354.8A CN118524299A (en) 2023-02-20 2023-02-20 Color temperature compensation method, device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118524299A true CN118524299A (en) 2024-08-20

Family

ID=92272810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310147354.8A Pending CN118524299A (en) 2023-02-20 2023-02-20 Color temperature compensation method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118524299A (en)

Similar Documents

Publication Publication Date Title
CN111508450B (en) Screen color conversion method, device, storage medium and electronic device
CN108111772B (en) Shooting method and terminal
CN105744174A (en) A Selfie method, device and mobile terminal
US11191144B2 (en) Light supplement module, light supplement control method and terminal for light supplement module
CN105651381B (en) light sensor calibration method and device
CN107797361B (en) Flash lamp adjusting method and device and storage medium
US10574876B2 (en) Photography environment control
US10469723B2 (en) Photography lighting control
EP3477374B1 (en) Method and device for correcting color temperature of flash lamp
CN106134189A (en) Image processing apparatus, camera head, image processing method and program
CN113973163A (en) Image acquisition module, electronic device, image acquisition method and storage medium
CN111294576A (en) Automatic white balance processing method and device and electronic equipment
CN106251369B (en) Image processing method and device
CN111696479B (en) Color gamut adjusting method and device
CN115731836A (en) Display effect control method and device of display screen, terminal equipment and medium
CN118524299A (en) Color temperature compensation method, device, terminal equipment and storage medium
CN112397039A (en) Color temperature adjusting method and device, terminal and storage medium
CN106375678A (en) Method, device and system for adjusting shooting parameters
CN115546035A (en) Data processing method and device, electronic device and storage medium
CN115002437B (en) White balance processing method and device and storage medium
CN112188111B (en) Photographing method and device, terminal and storage medium
CN117636799A (en) Screen brightness correction method, screen control method, screen brightness correction device and storage medium
CN114414042A (en) Ambient light detection method, device, storage medium and electronic device
JP2015106887A (en) Image-capturing apparatus system
CN115527511B (en) A screen brightness adjustment method, a screen brightness adjustment device, and a storage medium.

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