WO2019041493A1 - White balance adjustment method and device - Google Patents

White balance adjustment method and device Download PDF

Info

Publication number
WO2019041493A1
WO2019041493A1 PCT/CN2017/107333 CN2017107333W WO2019041493A1 WO 2019041493 A1 WO2019041493 A1 WO 2019041493A1 CN 2017107333 W CN2017107333 W CN 2017107333W WO 2019041493 A1 WO2019041493 A1 WO 2019041493A1
Authority
WO
WIPO (PCT)
Prior art keywords
white balance
gain value
balance gain
image
value
Prior art date
Application number
PCT/CN2017/107333
Other languages
French (fr)
Chinese (zh)
Inventor
袁全
Original Assignee
广东欧珀移动通信有限公司
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
Priority claimed from CN201710775995.2A external-priority patent/CN107580205B/en
Priority claimed from CN201710776063.XA external-priority patent/CN107396079B/en
Application filed by 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2019041493A1 publication Critical patent/WO2019041493A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Abstract

The present invention provides a white balance adjustment method and device. The method comprises: calculating a first white balance gain value of an image by means of a human face white balance algorithm; calculating a plurality of second white balance gain values separately corresponding to the image if the image is separately obtained by imaging under a plurality of light sources; according to the first white balance gain value, selecting, from the plurality of second white balance gain values, a target white balance gain value close to the first white balance gain value; and carrying out white balance adjustment on the image according to the target white balance gain value. The present invention resolves the technical problem in the prior art of sudden change in a white balance gain value when there is a human face or there is no human face in the image the same scene.

Description

白平衡调整方法和装置White balance adjustment method and device
相关申请的交叉引用Cross-reference to related applications
本申请要求广东欧珀移动通信有限公司于2017年08月31日提交的、发明名称为“白平衡调整方法和装置”的、中国专利申请号“201710776063.X”和于2017年08月31日提交的、发明名称为“白平衡调整方法和装置”的、中国专利申请号“201710775995.2”优先权。This application claims the Chinese patent application number “201710776063.X” submitted by Guangdong Opal Mobile Communication Co., Ltd. on August 31, 2017, and the invention name is “White Balance Adjustment Method and Device” and on August 31, 2017. The Chinese patent application number "201710775995.2", which is submitted under the name "White Balance Adjustment Method and Apparatus", has priority.
技术领域Technical field
本发明涉及成像技术领域,尤其涉及一种白平衡调整方法和装置。The present invention relates to the field of imaging technologies, and in particular, to a white balance adjustment method and apparatus.
背景技术Background technique
相关技术中,在使用终端设备的拍摄设备进行拍照时,在实际的彩色图像采集得到的色彩值和物体的真实色彩会产生偏差,造成该偏差的原因主要有两个,一个是光源环境的色温变化,不同色温情况下,同一个物体的反射的光谱不一样,从而导致物体在不同色温的光源照射下呈现的颜色不同,例如白色物体在高色温环境下呈现蓝色,而在低色温的环境中呈现红色。另一个是由于拍摄设备本身所固有的色彩通道的增益的偏差,比如对于GC0307的B通道的manual gain值是0x98,而R,G通道的manual gain值为0x80。In the related art, when the photographing device using the terminal device performs photographing, the color value obtained by the actual color image collection and the real color of the object may be deviated, and the cause of the deviation is mainly two, one is the color temperature of the light source environment. Change, different color temperature conditions, the same object's reflection spectrum is not the same, resulting in different colors of objects under different color temperature illumination, such as white objects appear blue in high color temperature environment, and in low color temperature environment In red. The other is due to the deviation of the gain of the color channel inherent in the shooting device itself. For example, the manual gain value of the B channel of GC0307 is 0x98, and the manual gain value of the R, G channel is 0x80.
因而,相关技术中,为了补偿这种色彩的偏差,通过相关的白平衡算法改变拍摄设备的色彩增益通道的白平衡增益值,对色温环境所造成的颜色偏差和拍摄设备本身所固有的色彩通道增益的偏差进行统一补偿,从而让获取的图像能正确的反应物体的真实色彩。Therefore, in the related art, in order to compensate for such color deviation, the white balance gain value of the color gain channel of the photographing device is changed by the related white balance algorithm, the color deviation caused by the color temperature environment, and the color channel inherent to the photographing device itself. The deviation of the gain is uniformly compensated, so that the acquired image can correctly reflect the true color of the object.
其中,白平衡算法有多种,均可用于计算出白平衡增益值,在人像拍摄现场进行下,为了起到较好的处理效果,基于有人脸和没有人脸采用不同的白平衡算法进行白平衡处理,导致当在进行拍照时,在相同场景下,有人脸和没有人脸时,得到的白平衡增益值变化明显,从而导致图像色彩突变。Among them, there are various white balance algorithms, which can be used to calculate the white balance gain value. In the scene shooting, in order to achieve better processing effect, different white balance algorithms are used for whitening based on human face and no face. The balance processing results in a significant change in the white balance gain value when the face is photographed and there is no face in the same scene when taking a picture, resulting in a sudden change in image color.
发明内容Summary of the invention
本发明提供一种白平衡调整方法和装置,以解决现有技术中,在相同的场景下,图像中有人脸和没人脸时,白平衡增益值突变的,从而导致色彩突变的技术问题。The invention provides a white balance adjustment method and device, which solves the technical problem that the white balance gain value is abrupt when the human face and the no-face are in the image in the same scene in the same scene, thereby causing color mutation.
本发明实施例提供一种白平衡调整方法,包括以下步骤:采用人脸白平衡算法,计算得到图像的第一白平衡增益值;计算若分别在多种光源下成像得到所述图像时,所述图像 所分别对应的多个第二白平衡增益值;根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值;采用所述目标白平衡增益值,对所述图像进行白平衡调整。An embodiment of the present invention provides a white balance adjustment method, including the following steps: using a face white balance algorithm to calculate a first white balance gain value of an image; and calculating if the image is obtained by imaging under multiple light sources, respectively Image Corresponding plurality of second white balance gain values respectively; selecting, according to the first white balance gain value, a target white that is close to the first white balance gain value from the plurality of second white balance gain values Balancing the gain value; using the target white balance gain value to perform white balance adjustment on the image.
本发明另一实施例提供一种白平衡调整装置,包括:第一计算模块,用于采用人脸白平衡算法,计算得到图像的第一白平衡增益值;第二计算模块,用于计算分别在多种光源下成像得到所述图像时,所述图像所分别对应的多个第二白平衡增益值;第一选取模块,用于根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值;第一调整模块,用于采用所述目标白平衡增益值,对所述图像进行白平衡调整。Another embodiment of the present invention provides a white balance adjustment apparatus, including: a first calculation module, configured to calculate a first white balance gain value of an image by using a human face white balance algorithm; and a second calculation module, configured to calculate respectively a plurality of second white balance gain values respectively corresponding to the image when the image is obtained by using a plurality of light sources; and a first selecting module, configured to: according to the first white balance gain value, from the plurality of Selecting a second white balance gain value to obtain a target white balance gain value that is close to the first white balance gain value; and a first adjustment module, configured to perform white balance adjustment on the image by using the target white balance gain value .
本发明又一实施例提供一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行本发明上述实施例所述的白平衡调整方法。A further embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the processor performs the above implementation of the present invention. The white balance adjustment method described in the example.
本发明还一实施例提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如本发明上述实施例所述的白平衡调整方法。Still another embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements a white balance adjustment method as described in the above embodiments of the present invention.
本发明实施例提供一种白平衡调整方法,包括以下步骤:采用人脸白平衡算法,计算得到图像的第三白平衡增益值;计算若分别在多种光源下成像得到所述图像时,所述图像所对应的多个第四白平衡增益值;根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值;采用简单灰度世界算法,计算得到所述图像的第五白平衡增益值;根据所述目标平衡增益值目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整。An embodiment of the present invention provides a white balance adjustment method, including the following steps: using a human face white balance algorithm to calculate a third white balance gain value of an image; and calculating if the image is obtained by imaging under multiple light sources, respectively a plurality of fourth white balance gain values corresponding to the image; and selecting, from the plurality of fourth white balance gain values, a target close to the third white balance gain value according to the third white balance gain value a white balance gain value; a fifth gray balance gain value of the image is calculated using a simple gray world algorithm; and the target balance gain value target white balance gain value and the fifth white balance gain value are The image is white balance adjusted.
本发明另一实施例提供一种白平衡调整装置,包括:第三计算模块,用于采用人脸白平衡算法,计算得到图像的第三白平衡增益值;第四计算模块,用于计算若分别在多种光源下成像得到所述图像时,所述图像所对应的多个第四白平衡增益值;第二选取模块,用于根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值;第五计算模块,用于采用简单灰度世界算法,计算得到所述图像的第五白平衡增益值;第二调整模块,用于根据所述目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整。Another embodiment of the present invention provides a white balance adjustment apparatus, including: a third calculation module, configured to calculate a third white balance gain value of an image by using a human face white balance algorithm; and a fourth calculation module, configured to calculate And a plurality of fourth white balance gain values corresponding to the image when the image is obtained by using a plurality of light sources, and a second selecting module, configured to: according to the third white balance gain value, from the plurality of Selecting a fourth white balance gain value to obtain a target white balance gain value close to the third white balance gain value; and a fifth calculation module, configured to calculate a fifth white balance of the image by using a simple gray world algorithm a gain value; a second adjustment module, configured to perform white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
本发明又一实施例提供一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行本发明上述实施例所述的白平衡调整方法。A further embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and when the instructions are executed by the processor, the processor performs the above implementation of the present invention. The white balance adjustment method described in the example.
本发明还一实施例提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如本发明上述实施例所述的白平衡调整方法。 Still another embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements a white balance adjustment method as described in the above embodiments of the present invention.
本发明实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。It suppresses the problem that the white balance gain value abruptly causes the screen to flicker when the face and the face are not in the same scene, and the damage to the human eye is avoided.
附图说明DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1是根据本发明一个实施例的白平衡调整方法的流程图;1 is a flow chart of a white balance adjustment method according to an embodiment of the present invention;
图2是根据本发明另一个实施例的白平衡调整方法的流程图;2 is a flow chart of a white balance adjustment method according to another embodiment of the present invention;
图3是根据本发明一个实施例的白平衡调整装置的结构示意图;3 is a schematic structural view of a white balance adjusting device according to an embodiment of the present invention;
图4是根据本发明另一个实施例的白平衡调整装置的结构示意图;4 is a schematic structural view of a white balance adjusting device according to another embodiment of the present invention;
图5是根据本发明又一个实施例的白平衡调整装置的结构示意图;FIG. 5 is a schematic structural diagram of a white balance adjusting apparatus according to still another embodiment of the present invention; FIG.
图6是本发明一实施例提出的计算机设备中的图像处理电路的结构示意图;6 is a schematic structural diagram of an image processing circuit in a computer device according to an embodiment of the present invention;
图7是根据本发明一个实施例的白平衡调整方法的流程图;7 is a flow chart of a white balance adjustment method according to an embodiment of the present invention;
图8是根据本发明另一个实施例的白平衡调整方法的流程图;FIG. 8 is a flowchart of a white balance adjustment method according to another embodiment of the present invention; FIG.
图9是根据本发明一个实施例的白平衡调整装置的结构示意图。9 is a schematic structural view of a white balance adjusting device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
可以理解,在实际应用中的很多应用场景下,用户使用智能手机等终端设备中的应用程序进行拍照,其中,在终端设备的前置拍照模式或人像拍照模式等拍人像的模式下拍照,和,在使用后置拍照模式等非人像拍照模式下进行拍照时,所采用的白平衡算法是不同的,这是因为在人脸拍照模式下和非人脸模式下图像的色彩组成是不同的。具体而言,在人像拍照模式下采用人脸白平衡(Face Automatic White Balance,FaceAWB)算法,当图像中存在人物时,由于一类人种的肤色变化很小,在一个可估算的范围内。因此,可以根据人脸肤色的特征,确定对应的校正算子,进而得到更准确的白平衡计算结果。尤其在大面积纯色背景和/或混光条件下,能有效改善图像的白平衡效果。It can be understood that in many application scenarios in a practical application, a user performs a photograph using an application in a terminal device such as a smart phone, wherein a photograph is taken in a portrait mode such as a front photographing mode or a portrait photographing mode of the terminal device, and When the photograph is taken in a non-portrait photographing mode such as a rear photographing mode, the white balance algorithm used is different because the color composition of the image is different in the face photographing mode and the non-face mode. Specifically, the Face Automatic White Balance (FaceAWB) algorithm is used in the portrait photographing mode. When there is a person in the image, the skin color change of one type of race is small, within an estimable range. Therefore, the corresponding correction operator can be determined according to the characteristics of the skin color of the face, thereby obtaining a more accurate white balance calculation result. Especially in large-area solid background and/or mixed light conditions, the white balance effect of the image can be effectively improved.
在非人像拍照模式下采用灰度世界(Simple Gray World)算法,灰度世界(Simple Gray World)算法是以灰度世界假设为基础,该假设认为:对于一幅有着大量色彩变化的图像,红色(Red,R)、绿色(Green,G)和蓝色(Blue,B)三个分量的饱和度的平均值趋于同 一灰度值。即灰度世界算法假设自然界景物对于光线的平均反射的均值在总体上是个定值,这个定值中R、G、B三个分量的饱和度趋于一致。当图像中存在丰富的色彩时,通过该灰度世界算法对图像进行处理,可以更好地消除环境光的影响。In the non-portrait camera mode, the Simple Gray World algorithm is used. The Simple Gray World algorithm is based on the gray world assumption. The assumption is that for an image with a large number of color changes, red The average values of the saturations of the three components (Red, R), green (Green), and blue (Blue, B) tend to be the same. A gray value. That is, the gray world algorithm assumes that the mean value of the average reflection of the natural scene for the light is generally constant, and the saturation of the three components R, G, and B tends to be uniform. When there are rich colors in the image, the image is processed by the gray world algorithm, and the influence of the ambient light can be better eliminated.
然而,采用不同的白平衡算法所获取的白平衡增益值差距较大,在同样的应用场景下,当终端设备从有人脸的场景移动到没有人脸的场景下时,所获得的白平衡增益值差距较大,从而导致色彩发生突变,对人眼具有伤害,视觉效果不好。However, the white balance gain values obtained by using different white balance algorithms have a large difference. In the same application scenario, when the terminal device moves from a scene with a human face to a scene without a human face, the obtained white balance gain is obtained. The value difference is large, which leads to a sudden change in color, which is harmful to the human eye and has a poor visual effect.
为了解决上述技术问题,本发明提出了一种白平衡调整方法和装置,可以抑制白平衡增益值突变的问题。In order to solve the above technical problem, the present invention proposes a white balance adjustment method and apparatus which can suppress the problem of sudden change of the white balance gain value.
下面参考附图描述本发明实施例的白平衡调整方法和装置。A white balance adjustment method and apparatus according to an embodiment of the present invention will be described below with reference to the drawings.
图1是根据本发明一个实施例的白平衡调整方法的流程图,如图1所示,该方法包括以下步骤:1 is a flow chart of a white balance adjustment method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
步骤101,采用人脸白平衡算法,计算得到图像的第一白平衡增益值。In step 101, a first white balance gain value of the image is calculated by using a face white balance algorithm.
具体地,为了为人脸图像选用合适的增益值对图像进行白平衡处理,使得图像处理结果中,人脸的颜色和肤色比较吻合,可以先根据该人脸白平衡算法,对图像计算得到第一增益值以作备用。Specifically, in order to select a suitable gain value for the face image to perform white balance processing on the image, the color and the skin color of the face are consistent in the image processing result, and the image may be first calculated according to the face white balance algorithm. The gain value is used as a backup.
步骤102,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值。Step 102: Calculate a plurality of second white balance gain values corresponding to the images respectively when the images are imaged under a plurality of light sources.
其中,光源包括:日光光源、荧光光源、钨丝灯光源和F-A-H光源中的一个或多个组合,其中,F-A-H光源是A光和H光之间的光源,A光色温为2850K,H光色温为2350K。The light source comprises: one or more combinations of a sunlight source, a fluorescent light source, a tungsten light source and a FAH light source, wherein the FAH light source is a light source between the A light and the H light, and the A light color temperature is 2850K, and the H light color temperature is It is 2350K.
具体地,为了为非人脸图像选用合适的增益值对图像进行白平衡处理,使得图像处理结果中,非人脸区域的颜色和自然色比较吻合,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值以作备用,该第二白平衡增益值与灰度世界的算法结果较为接近。Specifically, in order to select a suitable gain value for the non-face image to perform white balance processing on the image, the color of the non-face region is consistent with the natural color in the image processing result, and the image is obtained by imaging under various light sources respectively. When the images respectively correspond to a plurality of second white balance gain values for standby, the second white balance gain values are closer to the algorithm results of the grayscale world.
步骤103,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值。Step 103: Select, according to the first white balance gain value, a target white balance gain value that is close to the first white balance gain value from the plurality of second white balance gain values.
步骤104,采用目标白平衡增益值,对图像进行白平衡调整。In step 104, white balance adjustment is performed on the image by using the target white balance gain value.
具体地,为了避免在人脸拍照模式和非人脸拍照模式下的白平衡增益值差异较大,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,从而,根据该目标白平衡增益值对图像进行白平衡调整,一方面考量了人脸肤色,另一方面考量了自然界丰富的色彩(灰度世界),不仅可以提高图像处理的视觉效果,而且基于目标白平衡增益值与灰度世界的白平衡增益值较为接近,避免了白平衡增益值突变从而导致屏幕闪烁的问题。 Specifically, in order to avoid a large difference in white balance gain values in the face photographing mode and the non-face photographing mode, the first white balance gain value is selected from the plurality of second white balance gain values and the first white Balancing the target white balance gain value close to the gain value, thereby adjusting the white balance of the image according to the target white balance gain value, on the one hand, considering the skin color of the face, and on the other hand, considering the rich color of the natural world (the grayscale world), Not only can the visual effect of image processing be improved, but also the target white balance gain value is closer to the white balance gain value of the grayscale world, avoiding the problem that the white balance gain value is abrupt and causing screen flicker.
需要说明的是,根据应用场景的不同,可采用不同的实现方式,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,举例说明如下:It should be noted that, according to different application scenarios, different implementation manners may be adopted, and according to the first white balance gain value, a target white balance close to the first white balance gain value is selected from the plurality of second white balance gain values. The gain value is illustrated as follows:
第一种示例,确定第一白平衡增益值中,各颜色分量的第一增益值,针对每一个第二白平衡增益值,确定各颜色分量的第二增益值,对每一个第二白平衡增益值与第一白平衡增益值之间的差异值进行计算,差异值是对同颜色分量中第一增益值与第二增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的,从多个第二白平衡增益值中,选取与第一增益值之间的差异值最小的目标白平衡增益值。In a first example, determining a first gain value of each color component in the first white balance gain value, and determining, for each second white balance gain value, a second gain value of each color component, for each second white balance Calculating the difference value between the gain value and the first white balance gain value, wherein the difference value is obtained by calculating the absolute difference between the first gain value and the second gain value in the same color component, and determining the absolute difference of each color component And obtaining, from among the plurality of second white balance gain values, selecting a target white balance gain value that is the smallest difference value from the first gain value.
第二种示例,根据第一白平衡增益值在各颜色分量上的第一增益值,生成第一向量,根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量,计算第一向量和每一个第二向量之间的向量距离,向量距离包括欧几里得距离,根据向量距离,从多个第二白平衡增益值中,选取得到向量距离最小的目标白平衡增益值。In a second example, a first vector is generated according to a first gain value of the first white balance gain value on each color component, and a second gain value is generated according to each second white balance gain value on each color component. a plurality of second vectors, calculating a vector distance between the first vector and each of the second vectors, the vector distance including a Euclidean distance, and selecting a vector from the plurality of second white balance gain values according to the vector distance The minimum target white balance gain value.
综上所述,本发明实施例的白平衡调整方法,采用人脸白平衡算法,计算得到图像的第一白平衡增益值,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,采用目标白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the white balance adjustment method of the embodiment of the present invention uses the face white balance algorithm to calculate the first white balance gain value of the image, and if the images are respectively imaged under a plurality of light sources, the images respectively correspond to the images. a plurality of second white balance gain values, according to the first white balance gain value, selecting a target white balance gain value close to the first white balance gain value from the plurality of second white balance gain values, using the target white balance gain Value, white balance adjustment of the image. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
基于以上实施例,为了进一步详细的描述,如何根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,下面结合上述第二种示例示出的基于增益值的向量确定目标白平衡增益值为例,进行说明。Based on the above embodiment, for further detailed description, how to obtain a target white balance gain value close to the first white balance gain value from the plurality of second white balance gain values according to the first white balance gain value, The second example shows a gain-based vector determining target white balance gain value as an example for explanation.
图2是根据本发明另一个实施例的白平衡调整方法的流程图,如图2所示,该方法包括:2 is a flow chart of a white balance adjustment method according to another embodiment of the present invention. As shown in FIG. 2, the method includes:
步骤201,采用人脸白平衡算法,计算得到图像的第一白平衡增益值。In step 201, the first white balance gain value of the image is calculated by using a face white balance algorithm.
具体地,可以通过人脸识别技术,对图像进行人脸识别,以确定图像中包含人脸区域,比如,可以先通过人脸识别技术,对图像中的人脸进行识别,得到人脸区域的坐标区间,其中,人脸识别算法,现有技术中有很多种实现方式,例如,采用Adaboost模型算法来进行人脸识别,还可以采用其他能快递识别人脸区域的算法,进行人脸区域的识别。对应人脸识别的实现方式,本实施例中不做限定。Specifically, the face recognition technology may be used to perform face recognition on the image to determine that the image includes a face region. For example, the face recognition method may be used to identify the face in the image to obtain a face region. Coordinate interval, wherein the face recognition algorithm has many implementations in the prior art, for example, the Adaboost model algorithm is used for face recognition, and other algorithms capable of expressly identifying the face region can be used to perform the face region. Identification. The implementation manner of the face recognition is not limited in this embodiment.
在得到人脸区域后,由于一类人种的肤色变化很小。例如,据统计,肤色RGB色彩空间转换到YCbCr空间后,人脸的Cb、Cr范围分别为[133,173],[77,127]。即只要能确定出人的肤色范围,就可以根据该肤色范围校正图像。因此,可以通过对比该图像中人脸 区域的颜色与预设的肤色范围,计算出该图像的第一增益值。After getting the face area, the skin color of a group of people changes little. For example, according to statistics, after the skin color RGB color space is converted to the YCbCr space, the Cb and Cr ranges of the face are [133, 173], [77, 127], respectively. That is, as long as the human skin color range can be determined, the image can be corrected according to the skin color range. Therefore, you can compare the faces in the image The color of the area and the preset skin color range are used to calculate the first gain value of the image.
当然,上述实施例进行人脸识别确定第一增益值的目的,是为了获取在人脸拍照模式下基于肤色进行白平衡处理时的第一增益值,事实上,在前置摄像头拍照模式或者在后置摄像头的拍照模式下,都是基于人脸白平衡算法进行白平衡处理,因此,还可以确定图像采用前置摄像头成像时,采用人脸白平衡算法,计算得到图像的第一白平衡增益值,或者,确定图像采用后置摄像头的人像模式成像时,采用人脸白平衡算法,计算得到图像的第一白平衡增益值等。Of course, the purpose of the foregoing embodiment for performing face recognition to determine the first gain value is to obtain a first gain value when performing white balance processing based on skin color in the face photographing mode, in fact, in the front camera photographing mode or in In the camera mode of the rear camera, the white balance processing is performed based on the face white balance algorithm. Therefore, it is also possible to determine the first white balance gain of the image by using the face white balance algorithm when the image is imaged by the front camera. Value, or, when determining that the image is imaged by the portrait mode of the rear camera, the first white balance gain value of the image is calculated by using the face white balance algorithm.
步骤202,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值。Step 202: Calculate a plurality of second white balance gain values corresponding to the images respectively when the images are imaged under a plurality of light sources.
具体地,分别在多种光源下,采用灰度世界算法进行白平衡处理,其中,灰度世界算法所基于的假设为:对于一幅有着大量色彩变化的图像,R、G、B三个分量的饱和度的平均值趋于同一灰度值G。在实际应用中,通常有两种方法确定该灰度值G。Specifically, the white balance processing is performed by using a gray world algorithm under various light sources respectively, wherein the gray world algorithm is based on the assumption that for an image with a large number of color changes, three components of R, G, and B. The average of the saturations tends to the same gray value G. In practical applications, there are usually two ways to determine the gray value G.
作为一种可能的实现方式,可以取固定值。例如,可以取最亮灰度值的一半,即当最亮灰度值为255时,该灰度值G可以为128。作为另一种可能的实现方式,可以通过计算图像中R、G、B三种颜色各自的平均值,取这三个平均值的均值作为该灰度值G。在确定该灰度值G后,可以通过将该灰度值G与R、G、B三种颜色各自的平均值分别进行比较,从而计算出对应光源下该图像的第二增益值。As a possible implementation, a fixed value can be taken. For example, one half of the brightest gray value may be taken, that is, when the brightest gray value is 255, the gray value G may be 128. As another possible implementation manner, the average value of the three average values of R, G, and B in the image may be calculated as the gray value G. After determining the gradation value G, the second gain value of the image under the corresponding light source can be calculated by comparing the gradation value G with the average values of the three colors of R, G, and B, respectively.
步骤203,根据第一白平衡增益值在各颜色分量上的第一增益值,生成第一向量。Step 203: Generate a first vector according to the first gain value of the first white balance gain value on each color component.
步骤204,根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量。Step 204: Generate a corresponding plurality of second vectors according to the second gain value of each second white balance gain value on each color component.
在实际应用中,可以利用色彩空间中的向量精确地表征该第一增益值和该第二增益值。色彩空间可以由多种,例如:RGB(red,green,blue)颜色空间,即基于设备三基色的颜色空间。另外,还可以是HSI色彩空间,该HSI色彩空间是从人的视觉系统出发,用色调(Hue)、色饱和度(Saturation或Chroma)和亮度(Intensity或Brightness)来描述色彩。HSI色彩空间可以用一个圆锥空间模型来描述。当然,还可以采用其他色彩空间进行描述,本实施例中对此不再赘述。作为一种可能的实现方式,可以采用色彩空间中的RGB模型表征第一增益值和第二增益值。In practical applications, the first gain value and the second gain value can be accurately characterized using vectors in the color space. The color space can be varied, for example: RGB (red, green, blue) color space, that is, based on the color space of the device's three primary colors. In addition, it may also be an HSI color space, which is derived from a human visual system, and describes colors by Hue, Saturation or Chroma, and Intensity or Brightness. The HSI color space can be described by a conical space model. Certainly, other color spaces may be used for description, which are not described in this embodiment. As a possible implementation, the first gain value and the second gain value may be characterized by an RGB model in the color space.
具体地,在RGB模型中,每种颜色出现在R、G、B三个颜色分量中,这个模型基于笛卡尔坐标系统,所考虑的彩色空间是一个立方体。立方体的一个顶点可以作为原点,黑色位于该原点处,白色位于该立方体中离原点最远的顶点处。在该模型中,不同的颜色处在立方体上或者处在立方体内部,并可用从原点分布的向量来表征。Specifically, in the RGB model, each color appears in three color components of R, G, and B. This model is based on a Cartesian coordinate system, and the color space considered is a cube. One vertex of the cube can be used as the origin, black is at the origin, and white is at the vertex that is farthest from the origin in the cube. In this model, different colors are on the cube or inside the cube and can be characterized by a vector distributed from the origin.
作为一种可能的实现方式,假定所有的颜色都归一化了,则该立方体为一个单位立方 体,即所有R、G、B的值都在[0,1]的范围内取值。因此,该第一增益值和第二增益值在R、G、B中每一颜色分量上的取值也可以都在[0,1]的范围内取值。将第一增益值在每一颜色分量上的取值组合在一起,便可以生成第一向量,将第二增益值在每一颜色分量上的取值组合在一起,便可以生成第二向量。例如,若第一增益值在R分量上的取值为0.1,在G分量上的取值为0.2,在B分量上的取值为0.3,则可以根据第一增益值在每一颜色分量上的取值,生成第一向量[0.1,0.2,0.3]。若第二增益值在R分量上的取值为0.2,在G分量上的取值为0.2,在B分量上的取值为0.2,则可以根据第二增益值在每一颜色分量上的取值,生成第一向量[0.2,0.2,0.2]。As a possible implementation, assuming that all colors are normalized, the cube is a unit cube The body, that is, all R, G, and B values are in the range of [0, 1]. Therefore, the values of the first gain value and the second gain value on each of the R, G, and B color components may also take values in the range of [0, 1]. By combining the values of the first gain value on each color component, a first vector can be generated, and the values of the second gain value on each color component can be combined to generate a second vector. For example, if the first gain value has a value of 0.1 on the R component, a value of 0.2 on the G component, and a value of 0.3 on the B component, it can be on each color component according to the first gain value. The value of the first vector [0.1, 0.2, 0.3] is generated. If the second gain value has a value of 0.2 on the R component, a value of 0.2 on the G component, and a value of 0.2 on the B component, the second gain value can be taken on each color component. The value produces the first vector [0.2, 0.2, 0.2].
步骤205,计算第一向量和每一个第二向量之间的向量距离,其中,向量距离包括欧几里得距离。Step 205: Calculate a vector distance between the first vector and each of the second vectors, wherein the vector distance includes a Euclidean distance.
具体地,在生成第一向量和第二向量后,便实现了对第一增益值和第二增益值的量化表征。在计算第一向量和第二向量之间的向量距离时,可以采用欧几里得距离描述这两个向量之间的向量距离,也可以采用余弦距离、皮尔逊相关系数等方式描述这两个向量之间的向量距离。以采用欧几里得距离描述第一向量和第二向量之间的向量距离为例,可以通过如下欧几里得距离公式:Specifically, after generating the first vector and the second vector, a quantized representation of the first gain value and the second gain value is achieved. When calculating the vector distance between the first vector and the second vector, the Euclidean distance can be used to describe the vector distance between the two vectors, or the cosine distance and the Pearson correlation coefficient can be used to describe the two vectors. Vector distance between vectors. Taking the vector distance between the first vector and the second vector using the Euclidean distance as an example, the following Euclidean distance formula can be used:
Figure PCTCN2017107333-appb-000001
Figure PCTCN2017107333-appb-000001
计算第一向量和第二向量之间的向量距离。其中,d(x,y)为第一向量和第二向量之间的向量距离,xR、xG、xB分别为第一向量中每一颜色分量上的取值,yR、yG、yB分别为第二向量中每一颜色分量上的取值。A vector distance between the first vector and the second vector is calculated. Where d(x, y) is the vector distance between the first vector and the second vector, and x R , x G , and x B are the values on each color component in the first vector, respectively, y R , y G And y B are the values on each color component in the second vector, respectively.
进而,在计算得到第一向量和第二向量之间的向量距离后,可以判断该第一向量和该第二向量之间的向量距离,第一向量和该第二向量之间的向量距离越大,可以确定第一增益值和第二增益值越不相似。若该第一向量和该第二向量之间的向量距离越接近,则可以确定第一增益值和第二增益值相似。Furthermore, after calculating the vector distance between the first vector and the second vector, the vector distance between the first vector and the second vector can be determined, and the vector distance between the first vector and the second vector is more Large, it can be determined that the first gain value and the second gain value are less similar. If the vector distance between the first vector and the second vector is closer, it may be determined that the first gain value and the second gain value are similar.
步骤206,根据向量距离,从多个第二白平衡增益值中,选取得到向量距离最小的目标白平衡增益值。Step 206: Select, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of second white balance gain values.
步骤207,采用目标白平衡增益值,对图像进行白平衡调整。In step 207, the white balance adjustment is performed on the image by using the target white balance gain value.
具体地,根据向量距离,从多个第二白平衡增益值中,选取得到向量距离最小的目标白平衡增益值,利用灰度世界算法计算得到的目标白平衡增益值对图像进行准确的白平衡处理,一方面考量了人脸肤色,另一方面考量了自然界丰富的色彩,不仅可以提高图像处理的视觉效果,而且基于统一的目标白平衡增益值进行图像处理,避免了白平衡增益值突变从而导致屏幕闪烁的问题。Specifically, according to the vector distance, the target white balance gain value with the smallest vector distance is selected from the plurality of second white balance gain values, and the target white balance gain value calculated by the gray world algorithm is used to accurately white balance the image. Processing, on the one hand, considers the face color, on the other hand, considers the rich colors of nature, not only can improve the visual effect of image processing, but also based on the unified target white balance gain value for image processing, avoiding the white balance gain value mutation The problem that caused the screen to flicker.
综上所述,本发明实施例的白平衡调整方法,在根据用于将图像中的人脸调整至肤色 的人脸白平衡算法,对该图像计算第一增益值,以及计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值,根据第一白平衡增益值在各颜色分量上的第一增益值,生成第一向量,根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量,并计算第一向量和每一个第二向量之间的向量距离;向量距离包括欧几里得距离,根据向量距离,从多个第二白平衡增益值中,选取得到向量距离最小的目标白平衡增益值,进而,采用目标白平衡增益值,对图像进行白平衡调整,从而,配合较慢的白平衡收敛速度,可有效改善采用人脸白平衡算法进行白平衡调整时,有无人脸时闪烁的问题。In summary, the white balance adjustment method according to the embodiment of the present invention is based on adjusting a face in an image to a skin color. a face white balance algorithm, calculating a first gain value for the image, and calculating a plurality of second white balance gain values respectively corresponding to the image if the images are imaged under a plurality of light sources, respectively, according to the first white balance gain Generating, by the first gain value on each color component, a first vector, generating a corresponding plurality of second vectors according to a second gain value of each second white balance gain value on each color component, and calculating the first a vector distance between the vector and each of the second vectors; the vector distance includes a Euclidean distance, and from the plurality of second white balance gain values, the target white balance gain value having the smallest vector distance is selected according to the vector distance, and further The target white balance gain value is used to adjust the white balance of the image, so that the slow white balance convergence speed can effectively improve the problem of flickering when the white balance is adjusted by the white balance algorithm.
为了实现上述实施例,本发明还提出一种白平衡调整装置,图3是根据本发明一个实施例的白平衡调整装置的结构示意图,如图3所示,该白平衡调整装置包括第一计算模块100、第二计算模块200、第一选取模块300和第一调整模块400。In order to achieve the above embodiment, the present invention also provides a white balance adjusting device. FIG. 3 is a schematic structural view of a white balance adjusting device according to an embodiment of the present invention. As shown in FIG. 3, the white balance adjusting device includes a first calculation. The module 100, the second calculation module 200, the first selection module 300, and the first adjustment module 400.
其中,第一计算模块100,用于采用人脸白平衡算法,计算得到图像的第一白平衡增益值。The first calculation module 100 is configured to calculate a first white balance gain value of the image by using a human face white balance algorithm.
第二计算模块200,用于计算分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值。The second calculating module 200 is configured to calculate a plurality of second white balance gain values respectively corresponding to the images when the images are respectively imaged under a plurality of light sources.
第一选取模块300,用于根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值。The first selection module 300 is configured to select, from the plurality of second white balance gain values, a target white balance gain value that is close to the first white balance gain value according to the first white balance gain value.
第一调整模块400,用于采用目标白平衡增益值,对图像进行白平衡调整。The first adjustment module 400 is configured to perform white balance adjustment on the image by using the target white balance gain value.
基于上述实施例,图4是根据本发明另一个实施例的白平衡调整装置的结构示意图,如图4所示,在如图3所示的基础上,该第一选取模块300包括第一计算单元310和第一选取单元320。4 is a schematic structural diagram of a white balance adjusting apparatus according to another embodiment of the present invention. As shown in FIG. 4, the first selecting module 300 includes a first calculation. Unit 310 and first selection unit 320.
其中,第一计算单元310,用于确定第一白平衡增益值中,各颜色分量的第一增益值;针对每一个第二白平衡增益值,确定各颜色分量的第二增益值;对每一个第二白平衡增益值与第一白平衡增益值之间的差异值进行计算,差异值是对同颜色分量中第一增益值与第二增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的。The first calculating unit 310 is configured to determine a first gain value of each color component in the first white balance gain value, and determine a second gain value of each color component for each second white balance gain value; Calculating a difference value between a second white balance gain value and a first white balance gain value, wherein the difference value is an absolute difference between the first gain value and the second gain value in the same color component, and each color component is calculated The absolute difference is summed.
第一选取单元320,用于从多个第二白平衡增益值中,选取与第一增益值之间的差异值最小的目标白平衡增益值。The first selecting unit 320 is configured to select, from among the plurality of second white balance gain values, a target white balance gain value that is the smallest difference value from the first gain value.
基于上述实施例,图5是根据本发明又一个实施例的白平衡调整装置的结构示意图,如图5所示,在如图3所示的基础上,该第一选取模块300包括第二计算单元330和第二选取单元340。Based on the above embodiment, FIG. 5 is a schematic structural diagram of a white balance adjusting apparatus according to still another embodiment of the present invention. As shown in FIG. 5, the first selecting module 300 includes a second calculating, as shown in FIG. Unit 330 and second selection unit 340.
其中,第二计算单元330,用于根据第一白平衡增益值在各颜色分量上的第一增益值, 生成第一向量;根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量;计算第一向量和每一个第二向量之间的向量距离。The second calculating unit 330 is configured to determine, according to the first white balance gain value, a first gain value on each color component. Generating a first vector; generating a corresponding plurality of second vectors according to a second gain value of each second white balance gain value on each color component; calculating a vector distance between the first vector and each of the second vectors.
第二选取单元340,用于根据向量距离,从多个第二白平衡增益值中,选取得到向量距离最小的目标白平衡增益值。The second selecting unit 340 is configured to select, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of second white balance gain values.
需要说明的是,前述对方法实施例的描述,也适用于本发明实施例的装置,其实现原理类似,在此不再赘述。It should be noted that the foregoing description of the method embodiments is also applicable to the device in the embodiment of the present invention, and the implementation principle is similar, and details are not described herein again.
上述白平衡调整装置中各个模块的划分仅用于举例说明,在其他实施例中,可将白平衡调整装置按照需要划分为不同的模块,以完成上述白平衡调整装置的全部或部分功能。The division of each module in the white balance adjustment device is for illustrative purposes only. In other embodiments, the white balance adjustment device may be divided into different modules as needed to complete all or part of the functions of the white balance adjustment device.
综上所述,本发明实施例的白平衡调整装置,采用人脸白平衡算法,计算得到图像的第一白平衡增益值,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,采用目标白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the white balance adjusting device of the embodiment of the present invention uses the face white balance algorithm to calculate the first white balance gain value of the image, and if the images are respectively imaged under a plurality of light sources, the images respectively correspond to the images. a plurality of second white balance gain values, according to the first white balance gain value, selecting a target white balance gain value close to the first white balance gain value from the plurality of second white balance gain values, using the target white balance gain Value, white balance adjustment of the image. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
为实现上述目的,本发明实施例还提供一种计算机设备。上述计算机设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图6为一个实施例中图像处理电路的示意图。如图6所示,为便于说明,仅示出与本发明实施例相关的图像处理技术的各个方面。To achieve the above objective, an embodiment of the present invention further provides a computer device. The above computer device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing) pipeline. Figure 6 is a schematic illustration of an image processing circuit in one embodiment. As shown in FIG. 6, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present invention are shown.
如图6所示,图像处理电路包括ISP处理器1040和控制逻辑器1050。成像设备1010捕捉的图像数据首先由ISP处理器1040处理,ISP处理器1040对图像数据进行分析以捕捉可用于确定和/或成像设备1010的一个或多个控制参数的图像统计信息。成像设备1010可包括具有一个或多个透镜1012和图像传感器1014的照相机。图像传感器1014可包括色彩滤镜阵列(如Bayer滤镜),图像传感器1014可获取用图像传感器1014的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1040处理的一组原始图像数据。传感器1020可基于传感器1020接口类型把原始图像数据提供给ISP处理器1040。传感器1020接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。As shown in FIG. 6, the image processing circuit includes an ISP processor 1040 and a control logic 1050. The image data captured by imaging device 1010 is first processed by ISP processor 1040, which analyzes the image data to capture image statistical information that may be used to determine and/or control one or more control parameters of imaging device 1010. Imaging device 1010 can include a camera having one or more lenses 1012 and image sensors 1014. Image sensor 1014 may include a color filter array (such as a Bayer filter) that may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 1014 and provide a set of primitives that may be processed by ISP processor 1040 Image data. Sensor 1020 can provide raw image data to ISP processor 1040 based on sensor 1020 interface type. The sensor 1020 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
ISP处理器1040按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器1040可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 1040 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel can have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1040 can perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, image processing operations can be performed with the same or different bit depth precision.
ISP处理器1040还可从图像存储器1030接收像素数据。例如,从传感器1020接口将 原始像素数据发送给图像存储器1030,图像存储器1030中的原始像素数据再提供给ISP处理器1040以供处理。图像存储器1030可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。 ISP processor 1040 can also receive pixel data from image memory 1030. For example, the interface from sensor 1020 will The raw pixel data is sent to image memory 1030, and the raw pixel data in image memory 1030 is then provided to ISP processor 1040 for processing. Image memory 1030 can be part of a memory device, a storage device, or a separate dedicated memory within an electronic device, and can include DMA (Direct Memory Access) features.
当接收到来自传感器1020接口或来自图像存储器1030的原始图像数据时,ISP处理器1040可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器1030,以便在被显示之前进行另外的处理。ISP处理器1040从图像存储器1030接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器1070,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1040的输出还可发送给图像存储器1030,且显示器1070可从图像存储器1030读取图像数据。在一个实施例中,图像存储器1030可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1040的输出可发送给编码器/解码器1060,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1070设备上之前解压缩。编码器/解码器1060可由CPU或GPU或协处理器实现。When receiving raw image data from sensor 1020 interface or from image memory 1030, ISP processor 1040 can perform one or more image processing operations, such as time domain filtering. The processed image data can be sent to image memory 1030 for additional processing prior to being displayed. The ISP processor 1040 receives the processed data from the image memory 1030 and performs image data processing in the original domain and in the RGB and YCbCr color spaces. The processed image data may be output to display 1070 for viewing by a user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit). Additionally, the output of ISP processor 1040 can also be sent to image memory 1030, and display 1070 can read image data from image memory 1030. In one embodiment, image memory 1030 can be configured to implement one or more frame buffers. Additionally, the output of ISP processor 1040 can be sent to encoder/decoder 1060 to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 1070 device. Encoder/decoder 1060 can be implemented by a CPU or GPU or coprocessor.
ISP处理器1040确定的统计数据可发送给控制逻辑器1050单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜1012阴影校正等图像传感器1014统计信息。控制逻辑器1050可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备1010的控制参数以及的控制参数。例如,控制参数可包括传感器1020控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜1012控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜1012阴影校正参数。The statistics determined by the ISP processor 1040 can be sent to the control logic 1050 unit. For example, the statistical data may include image sensor 1014 statistical information such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 1012 shading correction, and the like. Control logic 1050 can include a processor and/or a microcontroller that executes one or more routines, such as firmware, and one or more routines can determine control parameters and control of imaging device 1010 based on received statistical data. parameter. For example, the control parameters may include sensor 1020 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 1012 control parameters (eg, focus or zoom focal length), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), as well as lens 1012 shading correction parameters.
以下为运用图6中图像处理技术实现白平衡调整方法的步骤:The following are the steps to implement the white balance adjustment method using the image processing technique in FIG. 6:
步骤101’,采用人脸白平衡算法,计算得到图像的第一白平衡增益值。In step 101', the first white balance gain value of the image is calculated by using a face white balance algorithm.
步骤102’,计算若分别在多种光源下成像得到所述图像时,所述图像所分别对应的多个第二白平衡增益值。Step 102' calculates a plurality of second white balance gain values corresponding to the images respectively when the images are imaged under a plurality of light sources.
步骤103’,根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值。Step 103', selecting, according to the first white balance gain value, a target white balance gain value that is close to the first white balance gain value from the plurality of second white balance gain values.
步骤104’,采用所述目标白平衡增益值,对所述图像进行白平衡调整。Step 104', using the target white balance gain value, to perform white balance adjustment on the image.
需要说明的是,前述对方法实施例的解释说明也适用于本实施例的终端设备,其实现原理类似,此处不再赘述。It should be noted that the foregoing description of the method embodiment is also applicable to the terminal device in this embodiment, and the implementation principle is similar, and details are not described herein again.
综上所述,本发明实施例的终端设备,采用人脸白平衡算法,计算得到图像的第一白 平衡增益值,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第二白平衡增益值,根据第一白平衡增益值,从多个第二白平衡增益值中选取得到与第一白平衡增益值接近的目标白平衡增益值,采用目标白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the terminal device in the embodiment of the present invention uses the face white balance algorithm to calculate the first white of the image. Balancing the gain value, and calculating a plurality of second white balance gain values respectively corresponding to the image when the images are imaged under a plurality of light sources respectively, and selecting from the plurality of second white balance gain values according to the first white balance gain value A target white balance gain value close to the first white balance gain value is obtained, and the image is subjected to white balance adjustment using the target white balance gain value. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
本发明实施例还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,当该计算机程序被处理器执行时能够实现如前述实施例所述的白平衡调整方法。The embodiment of the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program capable of implementing the white balance adjustment method as described in the foregoing embodiments when the computer program is executed by the processor.
为了解决上述技术问题,本发明还提出了一种白平衡调整方法和装置,可以抑制白平衡增益值突变的问题。In order to solve the above technical problem, the present invention also proposes a white balance adjustment method and apparatus, which can suppress the problem of sudden change of the white balance gain value.
下面参考附图描述本发明实施例的白平衡调整方法和装置。A white balance adjustment method and apparatus according to an embodiment of the present invention will be described below with reference to the drawings.
图7是根据本发明一个实施例的白平衡调整方法的流程图,如图7所示,该方法包括以下步骤:FIG. 7 is a flowchart of a white balance adjustment method according to an embodiment of the present invention. As shown in FIG. 7, the method includes the following steps:
步骤301,采用人脸白平衡算法,计算得到图像的第三白平衡增益值。In step 301, a third white balance gain value of the image is calculated by using a face white balance algorithm.
具体地,为了为人脸图像选用合适的增益值对图像进行白平衡处理,使得图像处理结果中,人脸的颜色和肤色比较吻合,可以先根据该人脸白平衡算法,对图像计算得到第三增益值以作备用。Specifically, in order to select a suitable gain value for the face image to perform white balance processing on the image, the color of the face and the skin color are consistent in the image processing result, and the image may be calculated according to the face white balance algorithm. The gain value is used as a backup.
步骤302,计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值。Step 302: Calculate a plurality of fourth white balance gain values corresponding to the image when the images are imaged under a plurality of light sources, respectively.
其中,光源包括:日光光源、荧光光源、钨丝灯光源和F-A-H光源中的一个或多个组合,其中,F-A-H光源是A光和H光之间的光源,A光色温为2850K,H光色温为2350K。The light source comprises: one or more combinations of a sunlight source, a fluorescent light source, a tungsten light source and a FAH light source, wherein the FAH light source is a light source between the A light and the H light, and the A light color temperature is 2850K, and the H light color temperature is It is 2350K.
具体地,为了为非人脸图像选用合适的增益值对图像进行白平衡处理,使得图像处理结果中,非人脸区域的颜色和自然色比较吻合,计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第四白平衡增益值以作备用,该第四白平衡增益值与灰度世界的算法结果较为接近。Specifically, in order to select a suitable gain value for the non-face image to perform white balance processing on the image, the color of the non-face region is consistent with the natural color in the image processing result, and the image is obtained by imaging under various light sources respectively. When the images respectively correspond to a plurality of fourth white balance gain values for standby, the fourth white balance gain value is closer to the algorithm result of the grayscale world.
步骤303,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值。Step 303: Select, according to the third white balance gain value, a target white balance gain value that is close to the third white balance gain value from the plurality of fourth white balance gain values.
具体地,为了避免在人脸拍照模式和非人脸拍照模式下的白平衡增益值差异较大,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,从而,根据该目标白平衡增益值一方面考量了人脸肤色,另一方面考量了自然界丰富的色彩(灰度世界),不仅可以提高图像处理的视觉效果,而且基于目标白平 衡增益值与灰度世界的白平衡增益值较为接近,避免了白平衡增益值突变从而导致屏幕闪烁的问题。Specifically, in order to avoid a large difference in white balance gain values in the face photographing mode and the non-face photographing mode, the third white balance gain value is selected from the plurality of fourth white balance gain values and the third white Balance the gain value of the target white balance gain value. Therefore, according to the target white balance gain value, the face color is considered on the one hand, and the rich color (grayscale world) of the natural world is considered on the other hand, which can not only improve the visual processing of the image processing. Effect, and based on the target Bai Ping The balance gain value is closer to the white balance gain value of the grayscale world, avoiding the problem that the white balance gain value is abrupt and causes the screen to flicker.
需要说明的是,根据应用场景的不同,可采用不同的实现方式,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,举例说明如下:It should be noted that, according to different application scenarios, different implementation manners may be adopted, and according to the third white balance gain value, the target white balance close to the third white balance gain value is selected from the plurality of fourth white balance gain values. The gain value is illustrated as follows:
第一种示例,确定第三白平衡增益值中,各颜色分量的第三增益值,针对每一个第四白平衡增益值,确定各颜色分量的第四增益值,对每一个第四白平衡增益值与第三白平衡增益值之间的差异值进行计算,差异值是对同颜色分量中第三增益值与第四增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的,从多个第四白平衡增益值中,选取与第三增益值之间的差异值最小的目标白平衡增益值。In a first example, a third gain value of each color component in the third white balance gain value is determined, and for each fourth white balance gain value, a fourth gain value of each color component is determined, for each fourth white balance The difference value between the gain value and the third white balance gain value is calculated, and the difference value is obtained by calculating the absolute difference between the third gain value and the fourth gain value in the same color component, and the absolute difference of each color component is obtained. And obtaining, from among the plurality of fourth white balance gain values, selecting a target white balance gain value that is the smallest difference value from the third gain value.
第二种示例,根据第三白平衡增益值在各颜色分量上的第三增益值,生成第三向量,根据每一个第四白平衡增益值在各颜色分量上的第四增益值,生成对应的多个第四向量,计算第三向量和每一个第四向量之间的向量距离,向量距离包括欧几里得距离,根据向量距离,从多个第四白平衡增益值中,选取得到向量距离最小的目标白平衡增益值。In a second example, a third vector is generated according to a third gain value of the third white balance gain value on each color component, and a fourth gain value is generated according to each fourth white balance gain value on each color component. a plurality of fourth vectors, calculating a vector distance between the third vector and each of the fourth vectors, the vector distance including a Euclidean distance, and selecting a vector from the plurality of fourth white balance gain values according to the vector distance The minimum target white balance gain value.
步骤304,采用简单灰度世界算法,计算得到图像的第五白平衡增益值。In step 304, a fifth gray balance gain value of the image is calculated using a simple gray world algorithm.
应当理解的是,灰度世界算法所基于的假设为:对于一幅有着大量色彩变化的图像,R、G、B三个分量的饱和度的平均值趋于同一灰度值G。在实际应用中,通常有两种方法确定该灰度值G。It should be understood that the gray world algorithm is based on the assumption that for an image with a large number of color variations, the average of the saturations of the three components R, G, and B tends to the same gray value G. In practical applications, there are usually two ways to determine the gray value G.
作为一种可能的实现方式,可以取固定值。例如,可以取最亮灰度值的一半,即当最亮灰度值为255时,该灰度值G可以为128。As a possible implementation, a fixed value can be taken. For example, one half of the brightest gray value may be taken, that is, when the brightest gray value is 255, the gray value G may be 128.
作为另一种可能的实现方式,可以通过计算图像中R、G、B三种颜色各自的平均值,取这三个平均值的均值作为该灰度值G。在确定该灰度值G后,可以通过将该灰度值G与R、G、B三种颜色各自的平均值分别进行比较,从而计算出该图像的第四增益值。As another possible implementation manner, the average value of the three average values of R, G, and B in the image may be calculated as the gray value G. After determining the gradation value G, the fourth gain value of the image can be calculated by comparing the gradation value G with the average values of the three colors of R, G, and B, respectively.
步骤305,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。Step 305: Perform white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
具体地,由于目标白平衡值为与第三增益值差异较小的增益值,可能较大程度的考虑了对人脸的处理效果,在由包含人脸到不包含人脸场景进行切换时,可能认为由于色彩的组成变化较大,而导致出现色彩突变,因此,在本发明的实施例中,进一步,综合考量目标白平衡增益值和基于灰度世界运算的第五白平衡增益值,对图像进行白平衡调整,使得在包含人脸场景到不包含人脸场景进行切换时,由于白平衡增益值与灰度世界的白平衡增益值更为接近,有效避免了白平衡增益值突变而导致色彩突变的问题。Specifically, since the target white balance value is a gain value that is slightly different from the third gain value, the processing effect on the face may be considered to a large extent, and when switching from including a face to a scene containing no face, It may be considered that a color change occurs due to a large change in the composition of the color. Therefore, in the embodiment of the present invention, further, the target white balance gain value and the fifth white balance gain value based on the gray world calculation are comprehensively considered. The image is white balance adjusted, so that when the face scene is changed to include no face scene, since the white balance gain value is closer to the white balance gain value of the gray world, the white balance gain value is effectively avoided. The problem of sudden color changes.
需要说明的是,根据应用场景的不同,可采用不同的实现方式,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整,举例说明如下: It should be noted that, according to different application scenarios, different implementation manners may be adopted, and white balance adjustment is performed on the image according to the target white balance gain value and the fifth white balance gain value, as illustrated below:
第一种示例:The first example:
计算目标白平衡增益值和第五白平衡增益值的加权平均值,根据加权平均值,对图像进行白平衡调整。A weighted average of the target white balance gain value and the fifth white balance gain value is calculated, and the image is white balance adjusted according to the weighted average value.
第二种示例:The second example:
根据图像中人脸区域的面积占比,确定目标白平衡增益值的权重和第五白平衡增益值的权重,其中,由于人脸区域占比越大,目标白平衡增益值与灰度世界的第五白平衡增益值的差异越大,因此,为了保证拍摄人脸区域原色与肤色符合,设置目标白平衡增益值的权重与面积占比之间为正向关系,根据目标白平衡增益值的权重和第五白平衡增益值的权重,计算得到加权平均值。Determining the weight of the target white balance gain value and the weight of the fifth white balance gain value according to the area ratio of the face area in the image, wherein the target white balance gain value and the gray world are determined due to the larger the face area ratio The difference of the fifth white balance gain value is larger. Therefore, in order to ensure that the primary color of the photographed face area matches the skin color, the weight between the target white balance gain value and the area ratio is positive, according to the target white balance gain value. The weights and the weights of the fifth white balance gain values are calculated to obtain a weighted average.
综上所述,本发明实施例的白平衡调整方法,采用人脸白平衡算法,计算得到图像的第三白平衡增益值,计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,采用简单灰度世界算法,计算得到图像的第五白平衡增益值,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the white balance adjustment method of the embodiment of the present invention uses a face white balance algorithm to calculate a third white balance gain value of an image, and calculates an image corresponding to an image obtained by imaging under multiple light sources. a plurality of fourth white balance gain values, and selecting a target white balance gain value close to the third white balance gain value from the plurality of fourth white balance gain values according to the third white balance gain value, using a simple gray world algorithm The fifth white balance gain value of the image is calculated, and the image is white balance adjusted according to the target white balance gain value and the fifth white balance gain value. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
基于以上实施例,为了进一步详细的描述,如何根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,下面结合上述第二种示例示出的基于增益值的向量确定目标白平衡增益值为例,进行说明。Based on the above embodiment, for further detailed description, how to obtain a target white balance gain value close to the third white balance gain value from the plurality of fourth white balance gain values according to the third white balance gain value, which is combined with the above The second example shows a gain-based vector determining target white balance gain value as an example for explanation.
图8是根据本发明另一个实施例的白平衡调整方法的流程图,如图8所示,该方法包括:FIG. 8 is a flowchart of a white balance adjustment method according to another embodiment of the present invention. As shown in FIG. 8, the method includes:
步骤401,采用人脸白平衡算法,计算得到图像的第三白平衡增益值。In step 401, a third white balance gain value of the image is calculated by using a face white balance algorithm.
具体地,可以通过人脸识别技术,对图像进行人脸识别,以确定图像中包含人脸区域,比如,可以先通过人脸识别技术,对图像中的人脸进行识别,得到人脸区域的坐标区间,其中,人脸识别算法,现有技术中有很多种实现方式,例如,采用Adaboost模型算法来进行人脸识别,还可以采用其他能快递识别人脸区域的算法,进行人脸区域的识别。对应人脸识别的实现方式,本实施例中不做限定。Specifically, the face recognition technology may be used to perform face recognition on the image to determine that the image includes a face region. For example, the face recognition method may be used to identify the face in the image to obtain a face region. Coordinate interval, wherein the face recognition algorithm has many implementations in the prior art, for example, the Adaboost model algorithm is used for face recognition, and other algorithms capable of expressly identifying the face region can be used to perform the face region. Identification. The implementation manner of the face recognition is not limited in this embodiment.
在得到人脸区域后,由于一类人种的肤色变化很小。例如,据统计,肤色RGB色彩空间转换到YCbCr空间后,人脸的Cb、Cr范围分别为[133,173],[77,127]。即只要能确定出人的肤色范围,就可以根据该肤色范围校正图像。因此,可以通过对比该图像中人脸区域的颜色与预设的肤色范围,计算出该图像的第三增益值。 After getting the face area, the skin color of a group of people changes little. For example, according to statistics, after the skin color RGB color space is converted to the YCbCr space, the Cb and Cr ranges of the face are [133, 173], [77, 127], respectively. That is, as long as the human skin color range can be determined, the image can be corrected according to the skin color range. Therefore, the third gain value of the image can be calculated by comparing the color of the face region in the image with the preset skin color range.
当然,上述实施例进行人脸识别确定第三增益值的目的,是为了获取在人脸拍照模式下基于肤色进行白平衡处理时的第三增益值,事实上,在前置摄像头拍照模式或者在后置摄像头的拍照模式下,都是基于人脸白平衡算法进行白平衡处理,因此,还可以确定图像采用前置摄像头成像时,采用人脸白平衡算法,计算得到图像的第三白平衡增益值,或者,确定图像采用后置摄像头的人像模式成像时,采用人脸白平衡算法,计算得到图像的第三白平衡增益值等。Of course, the purpose of the foregoing embodiment for performing face recognition to determine the third gain value is to obtain a third gain value when the white balance processing is performed based on the skin color in the face photographing mode, in fact, in the front camera photographing mode or In the camera mode of the rear camera, the white balance processing is performed based on the white balance algorithm of the face. Therefore, it is also possible to determine the third white balance gain of the image by using the face white balance algorithm when the image is imaged by the front camera. Value, or, when determining that the image is imaged by the portrait mode of the rear camera, the face white balance algorithm is used to calculate the third white balance gain value of the image.
步骤402,计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值。Step 402: Calculate a plurality of fourth white balance gain values corresponding to the image when the images are imaged under a plurality of light sources, respectively.
步骤403,根据第三白平衡增益值在各颜色分量上的第三增益值,生成第三向量。Step 403: Generate a third vector according to the third gain value of the third white balance gain value on each color component.
步骤404,根据每一个第四白平衡增益值在各颜色分量上的第四增益值,生成对应的多个第四向量。Step 404: Generate a corresponding plurality of fourth vectors according to the fourth gain value of each fourth white balance gain value on each color component.
在实际应用中,可以利用色彩空间中的向量精确地表征该第三增益值和该第四增益值。色彩空间可以由多种,例如:RGB(red,green,blue)颜色空间,即基于设备三基色的颜色空间。另外,还可以是HSI色彩空间,该HSI色彩空间是从人的视觉系统出发,用色调(Hue)、色饱和度(Saturation或Chroma)和亮度(Intensity或Brightness)来描述色彩。HSI色彩空间可以用一个圆锥空间模型来描述。当然,还可以采用其他色彩空间进行描述,本实施例中对此不再赘述。作为一种可能的实现方式,可以采用色彩空间中的RGB模型表征第三增益值和第四增益值。In practical applications, the third gain value and the fourth gain value can be accurately characterized using vectors in the color space. The color space can be varied, for example: RGB (red, green, blue) color space, that is, based on the color space of the device's three primary colors. In addition, it may also be an HSI color space, which is derived from a human visual system, and describes colors by Hue, Saturation or Chroma, and Intensity or Brightness. The HSI color space can be described by a conical space model. Certainly, other color spaces may be used for description, which are not described in this embodiment. As a possible implementation, the third gain value and the fourth gain value may be characterized by an RGB model in the color space.
具体地,在RGB模型中,每种颜色出现在R、G、B三个颜色分量中,这个模型基于笛卡尔坐标系统,所考虑的彩色空间是一个立方体。立方体的一个顶点可以作为原点,黑色位于该原点处,白色位于该立方体中离原点最远的顶点处。在该模型中,不同的颜色处在立方体上或者处在立方体内部,并可用从原点分布的向量来表征。Specifically, in the RGB model, each color appears in three color components of R, G, and B. This model is based on a Cartesian coordinate system, and the color space considered is a cube. One vertex of the cube can be used as the origin, black is at the origin, and white is at the vertex that is farthest from the origin in the cube. In this model, different colors are on the cube or inside the cube and can be characterized by a vector distributed from the origin.
作为一种可能的实现方式,假定所有的颜色都归一化了,则该立方体为一个单位立方体,即所有R、G、B的值都在[0,1]的范围内取值。因此,该第三增益值和第四增益值在R、G、B中每一颜色分量上的取值也可以都在[0,1]的范围内取值。将第三增益值在每一颜色分量上的取值组合在一起,便可以生成第三向量,将第四增益值在每一颜色分量上的取值组合在一起,便可以生成第四向量。例如,若第三增益值在R分量上的取值为0.1,在G分量上的取值为0.2,在B分量上的取值为0.3,则可以根据第三增益值在每一颜色分量上的取值,生成第三向量[0.1,0.2,0.3]。若第四增益值在R分量上的取值为0.2,在G分量上的取值为0.2,在B分量上的取值为0.2,则可以根据第四增益值在每一颜色分量上的取值,生成第三向量[0.2,0.2,0.2]。As a possible implementation, assuming that all colors are normalized, the cube is a unit cube, that is, all R, G, and B values are in the range of [0, 1]. Therefore, the values of the third gain value and the fourth gain value on each of the R, G, and B color components may also take values in the range of [0, 1]. By combining the values of the third gain value on each color component, a third vector can be generated, and the values of the fourth gain value on each color component are combined to generate a fourth vector. For example, if the third gain value has a value of 0.1 on the R component, a value of 0.2 on the G component, and a value of 0.3 on the B component, it can be on each color component according to the third gain value. The value of the third vector [0.1, 0.2, 0.3] is generated. If the fourth gain value has a value of 0.2 on the R component, a value of 0.2 on the G component, and a value of 0.2 on the B component, it can be taken on each color component according to the fourth gain value. The value produces a third vector [0.2, 0.2, 0.2].
步骤405,计算第三向量和每一个第四向量之间的向量距离;向量距离包括欧几里得 距离。 Step 405, calculating a vector distance between the third vector and each of the fourth vectors; the vector distance includes Euclidean distance.
具体地,在生成第三向量和第四向量后,便实现了对第三增益值和第四增益值的量化表征。在计算第三向量和第四向量之间的向量距离时,可以采用欧几里得距离描述这两个向量之间的向量距离,也可以采用余弦距离、皮尔逊相关系数等方式描述这两个向量之间的向量距离。以采用欧几里得距离描述第三向量和第四向量之间的向量距离为例,可以通过如下欧几里得距离公式:Specifically, after generating the third vector and the fourth vector, quantitative characterization of the third gain value and the fourth gain value is achieved. When calculating the vector distance between the third vector and the fourth vector, the Euclidean distance can be used to describe the vector distance between the two vectors, or the cosine distance and the Pearson correlation coefficient can be used to describe the two vectors. Vector distance between vectors. Taking the vector distance between the third vector and the fourth vector using the Euclidean distance as an example, the following Euclidean distance formula can be used:
Figure PCTCN2017107333-appb-000002
Figure PCTCN2017107333-appb-000002
计算第三向量和第四向量之间的向量距离。其中,d(x,y)为第三向量和第四向量之间的向量距离,xR、xG、xB分别为第三向量中每一颜色分量上的取值,yR、yG、yB分别为第四向量中每一颜色分量上的取值。A vector distance between the third vector and the fourth vector is calculated. Where d(x, y) is the vector distance between the third vector and the fourth vector, and x R , x G , and x B are the values on each color component in the third vector, respectively, y R , y G And y B are the values on each color component in the fourth vector, respectively.
进而,在计算得到第三向量和第四向量之间的向量距离后,可以判断该第三向量和该第四向量之间的向量距离,第三向量和该第四向量之间的向量距离越大,可以确定第三增益值和第四增益值越不相似。若该第三向量和该第四向量之间的向量距离越接近,则可以确定第三增益值和第四增益值相似。Furthermore, after calculating the vector distance between the third vector and the fourth vector, the vector distance between the third vector and the fourth vector can be determined, and the vector distance between the third vector and the fourth vector is more Large, it can be determined that the third gain value and the fourth gain value are less similar. If the vector distance between the third vector and the fourth vector is closer, it may be determined that the third gain value and the fourth gain value are similar.
步骤406,根据向量距离,从多个第四白平衡增益值中,选取得到向量距离最小的目标白平衡增益值。Step 406: Select, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of fourth white balance gain values.
步骤407,采用简单灰度世界算法,计算得到图像的第五白平衡增益值。 Step 407, using a simple gray world algorithm, calculating a fifth white balance gain value of the image.
步骤408,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。Step 408: Perform white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
具体地,根据向量距离,从多个第四白平衡增益值中,选取得到向量距离最小的目标白平衡增益值,结合灰度世界算法计算得到的第五白平衡增益值和目标白平衡增益值对图像进行准确的白平衡处理,一方面考量了人脸肤色,另一方面考量了自然界丰富的色彩,不仅可以提高图像处理的视觉效果,避免了白平衡增益值突变从而导致屏幕闪烁的问题。Specifically, according to the vector distance, the target white balance gain value with the smallest vector distance is selected from the plurality of fourth white balance gain values, and the fifth white balance gain value and the target white balance gain value calculated by the gray world algorithm are combined. Accurate white balance processing on the image, on the one hand considers the face color, on the other hand considers the rich colors of nature, not only can improve the visual effect of image processing, avoiding the problem of white balance gain value abrupt and causing screen flicker.
综上所述,本发明实施例的白平衡调整方法,在根据用于将图像中的人脸调整至肤色的人脸白平衡算法,对该图像计算第三增益值,以及计算若分别在多种光源下成像得到图像时,图像所分别对应的多个第四白平衡增益值,根据第三白平衡增益值在各颜色分量上的第三增益值,生成第三向量,根据每一个第四白平衡增益值在各颜色分量上的第四增益值,生成对应的多个第四向量,并计算第三向量和每一个第四向量之间的向量距离;向量距离包括欧几里得距离,根据向量距离,从多个第四白平衡增益值中,选取得到向量距离最小的目标白平衡增益值,进而,采用简单灰度世界算法,计算得到图像的第五白平衡增益值,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。由此,配合较慢的白平衡收敛速度,可有效改善采用人脸白平衡算法进行白平衡调整时,有无人脸时闪烁的问题。 In summary, the white balance adjustment method of the embodiment of the present invention calculates a third gain value for the image according to a face white balance algorithm for adjusting a face in an image to a skin color, and if the calculation is respectively When imaging the image under the light source, the image respectively corresponds to a plurality of fourth white balance gain values, and according to the third gain value of the third white balance gain value on each color component, a third vector is generated, according to each fourth a fourth gain value of the white balance gain value on each color component, generating a corresponding plurality of fourth vectors, and calculating a vector distance between the third vector and each of the fourth vectors; the vector distance includes a Euclidean distance, According to the vector distance, the target white balance gain value with the smallest vector distance is selected from the plurality of fourth white balance gain values, and then the fifth white balance gain value of the image is calculated by using the simple gray world algorithm, according to the target white The balance gain value and the fifth white balance gain value are used to adjust the white balance of the image. Therefore, with the slower white balance convergence speed, the problem of flickering when there is no face can be effectively improved when the white balance adjustment is performed by the face white balance algorithm.
为了实现上述实施例,本发明还提出一种白平衡调整装置,图9是根据本发明一个实施例的白平衡调整装置的结构示意图,如图9所示,该白平衡调整装置包括第三计算模块10、第四计算模块20、第二选取模块30、第五计算模块40和第二调整模块50。In order to achieve the above embodiment, the present invention also provides a white balance adjusting device. FIG. 9 is a schematic structural view of a white balance adjusting device according to an embodiment of the present invention. As shown in FIG. 9, the white balance adjusting device includes a third calculating. The module 10, the fourth calculation module 20, the second selection module 30, the fifth calculation module 40, and the second adjustment module 50.
其中,第三计算模块10,用于采用人脸白平衡算法,计算得到图像的第三白平衡增益值。The third calculation module 10 is configured to calculate a third white balance gain value of the image by using a face white balance algorithm.
第四计算模块20,用于计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值。The fourth calculating module 20 is configured to calculate a plurality of fourth white balance gain values corresponding to the image when the images are respectively imaged under a plurality of light sources.
第二选取模块30,用于根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值;The second selecting module 30 is configured to select, according to the third white balance gain value, a target white balance gain value that is close to the third white balance gain value from the plurality of fourth white balance gain values;
第五计算模块40,用于采用简单灰度世界算法,计算得到图像的第五白平衡增益值。The fifth calculating module 40 is configured to calculate a fifth white balance gain value of the image by using a simple gray world algorithm.
第二调整模块50,用于根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。The second adjustment module 50 is configured to perform white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
需要说明的是,前述对方法实施例的描述,也适用于本发明实施例的装置,其实现原理类似,在此不再赘述。It should be noted that the foregoing description of the method embodiments is also applicable to the device in the embodiment of the present invention, and the implementation principle is similar, and details are not described herein again.
上述白平衡调整装置中各个模块的划分仅用于举例说明,在其他实施例中,可将白平衡调整装置按照需要划分为不同的模块,以完成上述白平衡调整装置的全部或部分功能。The division of each module in the white balance adjustment device is for illustrative purposes only. In other embodiments, the white balance adjustment device may be divided into different modules as needed to complete all or part of the functions of the white balance adjustment device.
综上所述,本发明实施例的白平衡调整装置,采用人脸白平衡算法,计算得到图像的第三白平衡增益值,计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,采用简单灰度世界算法,计算得到图像的第五白平衡增益值,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the white balance adjusting device of the embodiment of the present invention uses a human face white balance algorithm to calculate a third white balance gain value of an image, and calculates an image corresponding to an image obtained by imaging under multiple light sources. a plurality of fourth white balance gain values, and selecting a target white balance gain value close to the third white balance gain value from the plurality of fourth white balance gain values according to the third white balance gain value, using a simple gray world algorithm The fifth white balance gain value of the image is calculated, and the image is white balance adjusted according to the target white balance gain value and the fifth white balance gain value. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
为实现上述目的,本发明实施例还提供一种计算机设备。上述计算机设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。继续参照图6示出的一个实施例中图像处理电路的示意图。如图6所示,为便于说明,仅示出与本发明实施例相关的图像处理技术的各个方面。To achieve the above objective, an embodiment of the present invention further provides a computer device. The above computer device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing) pipeline. Continuing to refer to the schematic diagram of the image processing circuit of one embodiment shown in FIG. As shown in FIG. 6, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present invention are shown.
如图6所示,图像处理电路包括ISP处理器1040和控制逻辑器1050。成像设备1010捕捉的图像数据首先由ISP处理器1040处理,ISP处理器1040对图像数据进行分析以捕捉 可用于确定和/或成像设备1010的一个或多个控制参数的图像统计信息。成像设备1010可包括具有一个或多个透镜1012和图像传感器1014的照相机。图像传感器1014可包括色彩滤镜阵列(如Bayer滤镜),图像传感器1014可获取用图像传感器1014的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1040处理的一组原始图像数据。传感器1020可基于传感器1020接口类型把原始图像数据提供给ISP处理器1040。传感器1020接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。As shown in FIG. 6, the image processing circuit includes an ISP processor 1040 and a control logic 1050. The image data captured by imaging device 1010 is first processed by ISP processor 1040, which analyzes the image data to capture Image statistics may be used to determine and/or image one or more control parameters of imaging device 1010. Imaging device 1010 can include a camera having one or more lenses 1012 and image sensors 1014. Image sensor 1014 may include a color filter array (such as a Bayer filter) that may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 1014 and provide a set of primitives that may be processed by ISP processor 1040 Image data. Sensor 1020 can provide raw image data to ISP processor 1040 based on sensor 1020 interface type. The sensor 1020 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
ISP处理器1040按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器1040可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 1040 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel can have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1040 can perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, image processing operations can be performed with the same or different bit depth precision.
ISP处理器1040还可从图像存储器1030接收像素数据。例如,从传感器1020接口将原始像素数据发送给图像存储器1030,图像存储器1030中的原始像素数据再提供给ISP处理器1040以供处理。图像存储器1030可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。 ISP processor 1040 can also receive pixel data from image memory 1030. For example, raw pixel data is sent from the sensor 1020 interface to the image memory 1030, and the raw pixel data in the image memory 1030 is then provided to the ISP processor 1040 for processing. Image memory 1030 can be part of a memory device, a storage device, or a separate dedicated memory within an electronic device, and can include DMA (Direct Memory Access) features.
当接收到来自传感器1020接口或来自图像存储器1030的原始图像数据时,ISP处理器1040可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器1030,以便在被显示之前进行另外的处理。ISP处理器1040从图像存储器1030接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器1070,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1040的输出还可发送给图像存储器1030,且显示器1070可从图像存储器1030读取图像数据。在一个实施例中,图像存储器1030可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1040的输出可发送给编码器/解码器1060,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1070设备上之前解压缩。编码器/解码器1060可由CPU或GPU或协处理器实现。When receiving raw image data from sensor 1020 interface or from image memory 1030, ISP processor 1040 can perform one or more image processing operations, such as time domain filtering. The processed image data can be sent to image memory 1030 for additional processing prior to being displayed. The ISP processor 1040 receives the processed data from the image memory 1030 and performs image data processing in the original domain and in the RGB and YCbCr color spaces. The processed image data may be output to display 1070 for viewing by a user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit). Additionally, the output of ISP processor 1040 can also be sent to image memory 1030, and display 1070 can read image data from image memory 1030. In one embodiment, image memory 1030 can be configured to implement one or more frame buffers. Additionally, the output of ISP processor 1040 can be sent to encoder/decoder 1060 to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 1070 device. Encoder/decoder 1060 can be implemented by a CPU or GPU or coprocessor.
ISP处理器1040确定的统计数据可发送给控制逻辑器1050单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜1012阴影校正等图像传感器1014统计信息。控制逻辑器1050可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备1010的控制参数以及的控制参数。例如,控制参数可包括传感器1020控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜1012控制参数(例如聚焦或变焦用焦距)、或这些参数的组 合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜1012阴影校正参数。The statistics determined by the ISP processor 1040 can be sent to the control logic 1050 unit. For example, the statistical data may include image sensor 1014 statistical information such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 1012 shading correction, and the like. Control logic 1050 can include a processor and/or a microcontroller that executes one or more routines, such as firmware, and one or more routines can determine control parameters and control of imaging device 1010 based on received statistical data. parameter. For example, the control parameters may include sensor 1020 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 1012 control parameters (eg, focus or zoom focal length), or groups of these parameters Hehe. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), as well as lens 1012 shading correction parameters.
以下为运用图6中图像处理技术实现白平衡调整方法的步骤:The following are the steps to implement the white balance adjustment method using the image processing technique in FIG. 6:
步骤201’,采用人脸白平衡算法,计算得到图像的第三白平衡增益值。In step 201', a third white balance gain value of the image is calculated by using a face white balance algorithm.
步骤202’,计算若分别在多种光源下成像得到所述图像时,所述图像所对应的多个第四白平衡增益值。Step 202' calculates a plurality of fourth white balance gain values corresponding to the image when the images are imaged under a plurality of light sources, respectively.
步骤203’,根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值。Step 203', selecting, according to the third white balance gain value, a target white balance gain value that is close to the third white balance gain value from the plurality of fourth white balance gain values.
步骤204’,采用简单灰度世界算法,计算得到所述图像的第五白平衡增益值。Step 204', using a simple grayscale world algorithm, calculates a fifth white balance gain value for the image.
步骤205’,根据所述目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整。Step 205', performing white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
需要说明的是,前述对方法实施例的解释说明也适用于本实施例的终端设备,其实现原理类似,此处不再赘述。It should be noted that the foregoing description of the method embodiment is also applicable to the terminal device in this embodiment, and the implementation principle is similar, and details are not described herein again.
综上所述,本发明实施例的终端设备,采用人脸白平衡算法,计算得到图像的第三白平衡增益值,计算若分别在多种光源下成像得到图像时,图像所对应的多个第四白平衡增益值,根据第三白平衡增益值,从多个第四白平衡增益值中选取得到与第三白平衡增益值接近的目标白平衡增益值,采用简单灰度世界算法,计算得到图像的第五白平衡增益值,根据目标白平衡增益值和第五白平衡增益值,对图像进行白平衡调整。由此,抑制了在同样的场景下,有人脸和没有人脸时,白平衡增益值突变从而导致屏幕闪烁的问题,避免了对人眼的伤害。In summary, the terminal device in the embodiment of the present invention uses a face white balance algorithm to calculate a third white balance gain value of an image, and calculates multiple images corresponding to images obtained by imaging under multiple light sources. The fourth white balance gain value is selected from the plurality of fourth white balance gain values according to the third white balance gain value to obtain a target white balance gain value close to the third white balance gain value, and is calculated by using a simple gray world algorithm. The fifth white balance gain value of the image is obtained, and the image is white balance adjusted according to the target white balance gain value and the fifth white balance gain value. Thereby, the problem that the white balance gain value is abruptly caused by the sudden change of the white balance gain value when the face and the face are not in the same scene is suppressed, and the damage to the human eye is avoided.
本发明实施例还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,当该计算机程序被处理器执行时能够实现如前述实施例所述的白平衡调整方法。The embodiment of the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program capable of implementing the white balance adjustment method as described in the foregoing embodiments when the computer program is executed by the processor.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms is not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, various embodiments or examples described in the specification and features of various embodiments or examples may be combined and combined without departing from the scope of the invention.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或 者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or The implied indicates the number of technical features indicated. Thus, features defining "first" and "second" may include at least one of the features, either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality" is at least two, such as two, three, etc., unless specifically defined otherwise.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logic function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware and in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既 可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated module is It can be implemented in the form of hardware or in the form of a software function module. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。 The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to variations, modifications, substitutions and variations.

Claims (20)

  1. 一种白平衡调整方法,其特征在于,包括以下步骤:A white balance adjustment method, comprising the steps of:
    采用人脸白平衡算法,计算得到图像的第一白平衡增益值;Using the face white balance algorithm, the first white balance gain value of the image is calculated;
    计算若分别在多种光源下成像得到所述图像时,所述图像所分别对应的多个第二白平衡增益值;Calculating a plurality of second white balance gain values corresponding to the images respectively when the images are imaged under a plurality of light sources;
    根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值;Determining, according to the first white balance gain value, a target white balance gain value that is close to the first white balance gain value from the plurality of second white balance gain values;
    采用所述目标白平衡增益值,对所述图像进行白平衡调整。The image is subjected to white balance adjustment using the target white balance gain value.
  2. 根据权利要求1所述的白平衡调整方法,其特征在于,所述根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值,包括:The white balance adjustment method according to claim 1, wherein the first white balance gain is selected from the plurality of second white balance gain values according to the first white balance gain value The target white balance gain value close to the value, including:
    确定所述第一白平衡增益值中,各颜色分量的第一增益值;Determining, in the first white balance gain value, a first gain value of each color component;
    针对每一个第二白平衡增益值,确定各颜色分量的第二增益值;Determining, for each of the second white balance gain values, a second gain value of each color component;
    对每一个第二白平衡增益值与所述第一白平衡增益值之间的差异值进行计算,所述差异值是对同颜色分量中所述第一增益值与所述第二增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的;Calculating a difference value between each of the second white balance gain values and the first white balance gain value, the difference value being the first gain value and the second gain value in the same color component After the absolute difference is calculated, the absolute difference of each color component is summed;
    从多个所述第二白平衡增益值中,选取与第一增益值之间的差异值最小的目标白平衡增益值。From among the plurality of the second white balance gain values, a target white balance gain value having a smallest difference value from the first gain value is selected.
  3. 根据权利要求1或2所述的白平衡调整方法,其特征在于,所述根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值,包括:The white balance adjustment method according to claim 1 or 2, wherein the first white balance gain value is selected from the plurality of second white balance gain values and the first white A target white balance gain value that approximates the gain value, including:
    根据所述第一白平衡增益值在各颜色分量上的第一增益值,生成第一向量;Generating a first vector according to the first gain value of the first white balance gain value on each color component;
    根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量;Generating a corresponding plurality of second vectors according to a second gain value of each second white balance gain value on each color component;
    计算所述第一向量和每一个所述第二向量之间的向量距离;所述向量距离包括欧几里得距离;Calculating a vector distance between the first vector and each of the second vectors; the vector distance includes a Euclidean distance;
    根据所述向量距离,从所述多个第二白平衡增益值中,选取得到所述向量距离最小的目标白平衡增益值。And selecting, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of second white balance gain values.
  4. 根据权利要求1-3任一项所述的白平衡调整方法,其特征在于,所述采用人脸白平衡算法,计算得到图像的第一白平衡增益值之前,还包括: The white balance adjustment method according to any one of claims 1 to 3, wherein before the calculating the first white balance gain value of the image by using the face white balance algorithm, the method further comprises:
    对所述图像进行人脸识别,以确定所述图像中包含人脸区域;Performing face recognition on the image to determine that the image includes a face region;
    或,确定所述图像采用前置摄像头成像得到;Or determining that the image is obtained by using a front camera;
    或,确定所述图像采用后置摄像头的人像模式成像得到。Alternatively, it is determined that the image is imaged using a portrait mode of a rear camera.
  5. 根据权利要求1-4任一项所述的白平衡调整方法,其特征在于,所述光源包括:日光光源、荧光光源、钨丝灯光源和F-A-H光源中的一个或多个组合。The white balance adjustment method according to any one of claims 1 to 4, wherein the light source comprises one or more combinations of a daylight source, a fluorescent source, a tungsten filament source, and an F-A-H source.
  6. 一种白平衡调整装置,其特征在于,包括:A white balance adjusting device, comprising:
    第一计算模块,用于采用人脸白平衡算法,计算得到图像的第一白平衡增益值;a first calculating module, configured to calculate a first white balance gain value of the image by using a human face white balance algorithm;
    第二计算模块,用于计算分别在多种光源下成像得到所述图像时,所述图像所分别对应的多个第二白平衡增益值;a second calculating module, configured to calculate a plurality of second white balance gain values respectively corresponding to the images when the images are obtained under a plurality of light sources respectively;
    第一选取模块,用于根据所述第一白平衡增益值,从所述多个第二白平衡增益值中选取得到与所述第一白平衡增益值接近的目标白平衡增益值;a first selecting module, configured to select, according to the first white balance gain value, a target white balance gain value that is close to the first white balance gain value from the plurality of second white balance gain values;
    第一调整模块,用于采用所述目标白平衡增益值,对所述图像进行白平衡调整。The first adjustment module is configured to perform white balance adjustment on the image by using the target white balance gain value.
  7. 根据权利要求6所述的白平衡调整装置,其特征在于,所述第一选取模块,包括:The white balance adjustment device according to claim 6, wherein the first selection module comprises:
    第一计算单元,用于确定所述第一白平衡增益值中,各颜色分量的第一增益值;针对每一个第二白平衡增益值,确定各颜色分量的第二增益值;对每一个第二白平衡增益值与所述第一白平衡增益值之间的差异值进行计算,所述差异值是对同颜色分量中所述第一增益值与所述第二增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的;a first calculating unit, configured to determine a first gain value of each color component in the first white balance gain value; and determine, for each second white balance gain value, a second gain value of each color component; Calculating a difference value between the second white balance gain value and the first white balance gain value, the difference value being an absolute difference between the first gain value and the second gain value in the same color component After calculation, the sum of the absolute differences of the color components is obtained;
    第一选取单元,用于从多个所述第二白平衡增益值中,选取与第一增益值之间的差异值最小的目标白平衡增益值。And a first selecting unit, configured to select, from among the plurality of the second white balance gain values, a target white balance gain value that is the smallest difference value from the first gain value.
  8. 根据权利要求6或7所述的白平衡调整装置,其特征在于,所述第一选取模块,包括:The white balance adjustment device according to claim 6 or 7, wherein the first selection module comprises:
    第二计算单元,用于根据所述第一白平衡增益值在各颜色分量上的第一增益值,生成第一向量;根据每一个第二白平衡增益值在各颜色分量上的第二增益值,生成对应的多个第二向量;计算所述第一向量和每一个所述第二向量之间的向量距离;a second calculating unit, configured to generate a first vector according to the first gain value of the first white balance gain value on each color component; and a second gain on each color component according to each second white balance gain value a value, generating a corresponding plurality of second vectors; calculating a vector distance between the first vector and each of the second vectors;
    第二选取单元,用于根据所述向量距离,从所述多个第二白平衡增益值中,选取得到所述向量距离最小的目标白平衡增益值。a second selecting unit, configured to select, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of second white balance gain values.
  9. 一种白平衡调整方法,其特征在于,包括以下步骤:A white balance adjustment method, comprising the steps of:
    采用人脸白平衡算法,计算得到图像的第三白平衡增益值;Using the face white balance algorithm, the third white balance gain value of the image is calculated;
    计算若分别在多种光源下成像得到所述图像时,所述图像所对应的多个第四白平衡增益值;Calculating a plurality of fourth white balance gain values corresponding to the image if the image is obtained by imaging under a plurality of light sources, respectively;
    根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值; Determining, according to the third white balance gain value, a target white balance gain value that is close to the third white balance gain value from the plurality of fourth white balance gain values;
    采用简单灰度世界算法,计算得到所述图像的第五白平衡增益值;Calculating a fifth white balance gain value of the image using a simple gray world algorithm;
    根据所述目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整。And white balance adjustment is performed on the image according to the target white balance gain value and the fifth white balance gain value.
  10. 根据权利要求9所述的白平衡调整方法,其特征在于,所述根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值,包括:The white balance adjustment method according to claim 9, wherein the third white balance gain is selected from the plurality of fourth white balance gain values according to the third white balance gain value. The target white balance gain value close to the value, including:
    确定所述第三白平衡增益值中,各颜色分量的第三增益值;Determining, in the third white balance gain value, a third gain value of each color component;
    针对每一个第四白平衡增益值,确定各颜色分量的第四增益值;Determining a fourth gain value of each color component for each fourth white balance gain value;
    对每一个第四白平衡增益值与所述第三白平衡增益值之间的差异值进行计算,所述差异值是对同颜色分量中所述第三增益值与所述第四增益值之绝对差值计算后,对各颜色分量的绝对差值求和得到的;Calculating a difference value between each of the fourth white balance gain value and the third white balance gain value, wherein the difference value is for the third gain value and the fourth gain value of the same color component After the absolute difference is calculated, the absolute difference of each color component is summed;
    从多个所述第四白平衡增益值中,选取与第三增益值之间的差异值最小的目标白平衡增益值。From among the plurality of the fourth white balance gain values, a target white balance gain value having a smallest difference value from the third gain value is selected.
  11. 根据权利要求9或10所述的白平衡调整方法,其特征在于,所述根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值,包括:The white balance adjustment method according to claim 9 or 10, wherein the third white balance gain value is selected from the plurality of fourth white balance gain values and the third white A target white balance gain value that approximates the gain value, including:
    根据所述第三白平衡增益值在各颜色分量上的第三增益值,生成第三向量;Generating a third vector according to the third gain value of the third white balance gain value on each color component;
    根据每一个第四白平衡增益值在各颜色分量上的第四增益值,生成对应的多个第四向量;Generating a corresponding plurality of fourth vectors according to a fourth gain value of each fourth white balance gain value on each color component;
    计算所述第三向量和每一个所述第四向量之间的向量距离;所述向量距离包括欧几里得距离;Calculating a vector distance between the third vector and each of the fourth vectors; the vector distance comprising a Euclidean distance;
    根据所述向量距离,从所述多个第四白平衡增益值中,选取得到所述向量距离最小的目标白平衡增益值。And selecting, according to the vector distance, a target white balance gain value that is the smallest vector distance from the plurality of fourth white balance gain values.
  12. 根据权利要求9-11任一项所述的白平衡调整方法,其特征在于,所述采用人脸白平衡算法,计算得到图像的第三白平衡增益值之前,还包括:The white balance adjustment method according to any one of claims 9 to 11, wherein before the third white balance gain value of the image is calculated by using the face white balance algorithm, the method further includes:
    对所述图像进行人脸识别,以确定所述图像中包含人脸区域;Performing face recognition on the image to determine that the image includes a face region;
    或,确定所述图像采用前置摄像头成像得到;Or determining that the image is obtained by using a front camera;
    或,确定所述图像采用后置摄像头的人像模式成像得到。Alternatively, it is determined that the image is imaged using a portrait mode of a rear camera.
  13. 根据权利要求9-12任一项所述的白平衡调整方法,其特征在于,所述光源包括:日光光源、荧光光源、钨丝灯光源和F-A-H光源中的一个或多个组合。The white balance adjustment method according to any one of claims 9 to 12, wherein the light source comprises one or more combinations of a daylight source, a fluorescent source, a tungsten filament source, and an F-A-H source.
  14. 根据权利要求9-13任一项所述的白平衡调整方法,其特征在于,所述根据所述目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整,包括:The white balance adjustment method according to any one of claims 9 to 13, wherein the image is white balance adjusted according to the target white balance gain value and the fifth white balance gain value, include:
    计算所述目标白平衡增益值和所述第五白平衡增益值的加权平均值; Calculating a weighted average of the target white balance gain value and the fifth white balance gain value;
    根据所述加权平均值,对所述图像进行白平衡调整。The image is subjected to white balance adjustment based on the weighted average.
  15. 根据权利要求9-14任一所述的白平衡调整方法,其特征在于,所述计算所述目标白平衡增益值和所述第五白平衡增益值的加权平均值,包括:The white balance adjustment method according to any one of claims 9-14, wherein the calculating a weighted average of the target white balance gain value and the fifth white balance gain value comprises:
    根据所述图像中人脸区域的面积占比,确定所述目标白平衡增益值的权重和所述第五白平衡增益值的权重;其中,所述目标白平衡增益值的权重与所述面积占比之间为正向关系;Determining a weight of the target white balance gain value and a weight of the fifth white balance gain value according to an area ratio of a face area in the image; wherein a weight of the target white balance gain value and the area The ratio between the ratios is positive;
    根据所述目标白平衡增益值的权重和所述第五白平衡增益值的权重,计算得到所述加权平均值。And calculating the weighted average according to the weight of the target white balance gain value and the weight of the fifth white balance gain value.
  16. 一种白平衡调整装置,其特征在于,包括:A white balance adjusting device, comprising:
    第三计算模块,用于采用人脸白平衡算法,计算得到图像的第三白平衡增益值;a third calculating module, configured to calculate a third white balance gain value of the image by using a face white balance algorithm;
    第四计算模块,用于计算若分别在多种光源下成像得到所述图像时,所述图像所对应的多个第四白平衡增益值;a fourth calculating module, configured to calculate a plurality of fourth white balance gain values corresponding to the image when the image is obtained by imaging under a plurality of light sources respectively;
    第二选取模块,用于根据所述第三白平衡增益值,从所述多个第四白平衡增益值中选取得到与所述第三白平衡增益值接近的目标白平衡增益值;a second selecting module, configured to select, according to the third white balance gain value, a target white balance gain value that is close to the third white balance gain value from the plurality of fourth white balance gain values;
    第五计算模块,用于采用简单灰度世界算法,计算得到所述图像的第五白平衡增益值;a fifth calculating module, configured to calculate a fifth white balance gain value of the image by using a simple gray world algorithm;
    第二调整模块,用于根据所述目标白平衡增益值和所述第五白平衡增益值,对所述图像进行白平衡调整。And a second adjusting module, configured to perform white balance adjustment on the image according to the target white balance gain value and the fifth white balance gain value.
  17. 一种计算机设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如权利要求1-5中任一所述的白平衡调整方法。A computer device, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the program, implementing any one of claims 1-5 The white balance adjustment method.
  18. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5中任一所述的白平衡调整方法。A computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the white balance adjustment method according to any one of claims 1-5.
  19. 一种计算机设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如权利要求9-15中任一所述的白平衡调整方法。A computer device, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the program, implementing any one of claims 9-15 The white balance adjustment method.
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求9-15中任一所述的白平衡调整方法。 A computer readable storage medium having stored thereon a computer program, characterized in that the program is executed by a processor to implement the white balance adjustment method according to any one of claims 9-15.
PCT/CN2017/107333 2017-08-31 2017-10-23 White balance adjustment method and device WO2019041493A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201710775995.2A CN107580205B (en) 2017-08-31 2017-08-31 White balance adjustment method and device
CN201710776063.X 2017-08-31
CN201710776063.XA CN107396079B (en) 2017-08-31 2017-08-31 White balance adjustment method and device
CN201710775995.2 2017-08-31

Publications (1)

Publication Number Publication Date
WO2019041493A1 true WO2019041493A1 (en) 2019-03-07

Family

ID=65524780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107333 WO2019041493A1 (en) 2017-08-31 2017-10-23 White balance adjustment method and device

Country Status (1)

Country Link
WO (1) WO2019041493A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006295303A (en) * 2005-04-06 2006-10-26 Fuji Photo Film Co Ltd Image processing method, apparatus and program
US20070085911A1 (en) * 2005-10-17 2007-04-19 Fujifilm Corporation Apparatus for color correction of subject-image data, and method of controlling same
CN101166286A (en) * 2006-10-20 2008-04-23 索尼株式会社 Imaging pickup apparatus, image pickup method, image processing apparatus, image processing method, and image processing program
CN101179746A (en) * 2006-11-06 2008-05-14 索尼株式会社 Image processing apparatus, image processing method, and program
CN101272505A (en) * 2007-03-19 2008-09-24 株式会社理光 Pick-up device and pick-up method
CN101350883A (en) * 2007-07-17 2009-01-21 富士胶片株式会社 Auto white balance correction value calculation device, method, program, and image pickup device
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN103139573A (en) * 2011-11-22 2013-06-05 三星电子株式会社 Apparatus and method for adjusting white balance
CN103686114A (en) * 2012-09-10 2014-03-26 索尼公司 Image processing apparatus, method, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006295303A (en) * 2005-04-06 2006-10-26 Fuji Photo Film Co Ltd Image processing method, apparatus and program
US20070085911A1 (en) * 2005-10-17 2007-04-19 Fujifilm Corporation Apparatus for color correction of subject-image data, and method of controlling same
CN101166286A (en) * 2006-10-20 2008-04-23 索尼株式会社 Imaging pickup apparatus, image pickup method, image processing apparatus, image processing method, and image processing program
CN101179746A (en) * 2006-11-06 2008-05-14 索尼株式会社 Image processing apparatus, image processing method, and program
CN101272505A (en) * 2007-03-19 2008-09-24 株式会社理光 Pick-up device and pick-up method
CN101350883A (en) * 2007-07-17 2009-01-21 富士胶片株式会社 Auto white balance correction value calculation device, method, program, and image pickup device
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN103139573A (en) * 2011-11-22 2013-06-05 三星电子株式会社 Apparatus and method for adjusting white balance
CN103686114A (en) * 2012-09-10 2014-03-26 索尼公司 Image processing apparatus, method, and program

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
US10237527B2 (en) Convolutional color correction in digital images
CN107451969B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN110022469B (en) Image processing method, image processing device, storage medium and electronic equipment
EP3542347B1 (en) Fast fourier color constancy
US9852499B2 (en) Automatic selection of optimum algorithms for high dynamic range image processing based on scene classification
EP2426928B1 (en) Image processing apparatus, image processing method and program
US8902328B2 (en) Method of selecting a subset from an image set for generating high dynamic range image
WO2019011147A1 (en) Human face region processing method and apparatus in backlight scene
CN109191403A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN107800965B (en) Image processing method, device, computer readable storage medium and computer equipment
CN108616700B (en) Image processing method and device, electronic equipment and computer readable storage medium
WO2019105254A1 (en) Background blur processing method, apparatus and device
CN107396079B (en) White balance adjustment method and device
WO2019011148A1 (en) White balance processing method and apparatus
US10796418B2 (en) Image processing apparatus, image processing method, and program
US20170154437A1 (en) Image processing apparatus for performing smoothing on human face area
WO2019019904A1 (en) White balance processing method and apparatus, and terminal
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
JP2015154102A (en) Image processing apparatus and method, image processing program, imaging device
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
CN107580205B (en) White balance adjustment method and device
CN107945106B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113411554A (en) Underwater image color restoration method and device
JP7114335B2 (en) IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM

Legal Events

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

Ref document number: 17923840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17923840

Country of ref document: EP

Kind code of ref document: A1