WO2019085698A1 - 白平衡处理方法及装置、电子装置和计算机可读存储介质 - Google Patents

白平衡处理方法及装置、电子装置和计算机可读存储介质 Download PDF

Info

Publication number
WO2019085698A1
WO2019085698A1 PCT/CN2018/107936 CN2018107936W WO2019085698A1 WO 2019085698 A1 WO2019085698 A1 WO 2019085698A1 CN 2018107936 W CN2018107936 W CN 2018107936W WO 2019085698 A1 WO2019085698 A1 WO 2019085698A1
Authority
WO
WIPO (PCT)
Prior art keywords
light source
white balance
image
balance processing
brightness
Prior art date
Application number
PCT/CN2018/107936
Other languages
English (en)
French (fr)
Inventor
王会朝
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019085698A1 publication Critical patent/WO2019085698A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a white balance processing method and apparatus, an electronic device, and a computer readable storage medium.
  • the white balance method of the related art cannot accurately select the main light source from the plurality of light sources of the image, thereby causing the image after the white balance correction according to the color temperature of the main light source to have poor effect and affecting the use experience.
  • Embodiments of the present application provide a white balance processing method, a white balance processing apparatus, an electronic apparatus, and a computer readable storage medium.
  • the white balance processing method of the embodiment of the present invention is configured to perform white balance processing on an image of a multi-light source scene, wherein the white balance processing method includes:
  • a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes a time when the image is captured and a signal strength of the GPS, where the brightness parameter includes Corresponding brightness of the plurality of light sources and average brightness of the image;
  • the image is subjected to white balance processing according to the color temperature of the main light source.
  • the white balance processing apparatus of the embodiment of the present invention is configured to perform white balance processing on an image of a multi-light source scene, where the white balance processing apparatus includes:
  • the detection module for detecting a plurality of light sources of the image
  • a first determining module configured to determine a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes capturing the image Time and GPS signal strength, the brightness parameter including a corresponding brightness of the plurality of light sources and an average brightness of the image;
  • a processing module configured to perform white balance processing on the image according to a color temperature of the main light source.
  • One or more processors are One or more processors;
  • One or more programs wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the program including the white balance processing method instruction.
  • a computer readable storage medium of an embodiment of the present application includes a computer program for use with an electronic device, the computer program being executable by a processor to perform the white balance processing method.
  • the white balance processing method, the white balance processing device, the electronic device, and the computer readable storage medium of the embodiment of the present application when the plurality of light sources are included in the image, according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources One determines the main light source, and thus, the selected main light source is more accurate, and the white balance effect of the user is better satisfied when the image is white balance processed.
  • FIG. 1 is a schematic flow chart of a white balance processing method according to an embodiment of the present application.
  • FIG. 2 is a schematic block diagram of a white balance processing apparatus according to an embodiment of the present application.
  • FIG. 3 is a schematic flow chart of a white balance processing method according to an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a detection module according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a scenario of a white balance processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a scenario of a white balance processing method according to an embodiment of the present application.
  • FIG. 8 is a schematic flow chart of a white balance processing method according to an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of a processing module according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a scenario of a white balance processing method according to an embodiment of the present application.
  • 11 is a color temperature graph of a white balance processing method according to an embodiment of the present application.
  • FIG. 12 is a schematic flow chart of a white balance processing method according to an embodiment of the present application.
  • FIG. 13 is a schematic block diagram of a white balance processing apparatus according to an embodiment of the present application.
  • FIG. 14 is a schematic block diagram of an electronic device according to an embodiment of the present application.
  • 15 is a schematic diagram of connection between an electronic device and a computer readable storage medium according to an embodiment of the present application.
  • White balance processing device 10 detection module 11, division unit 111, first determination unit 112, second determination unit 113, first determination unit 114, second determination unit 115, first determination module 12, processing module 13, second The determination module 14, the electronic device 20, the processor 21, the memory 22, and the computer readable storage medium 30 are determined.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include one or more of the described features either explicitly or implicitly.
  • the meaning of "a plurality” is two or more unless specifically and specifically defined otherwise.
  • a white balance processing method is used to perform white balance processing on an image of a multi-light source scene.
  • White balance processing methods include:
  • S12 determining a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes a time of capturing the image and a signal strength of the GPS, and the brightness parameter includes a corresponding brightness of the plurality of light sources. And the average brightness of the image; and
  • S13 Perform white balance processing on the image according to the color temperature of the main light source.
  • the white balance processing apparatus 10 of the embodiment of the present application is configured to perform white balance processing on an image of a multi-light source scene.
  • the white balance processing device 10 includes a detection module 11, a first determination module 12, and a processing module 13.
  • the white balance processing method of the embodiment of the present application can be realized by the white balance processing device 10 of the embodiment of the present application.
  • S11 can be implemented by detection module 11
  • S12 can be implemented by first determination module 12
  • S13 can be implemented by processing module 13.
  • the detection module 11 can be used to detect a plurality of light sources of an image.
  • the first determining module 12 may be configured to determine a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes a time of capturing the image and a signal strength of the GPS, and the brightness parameter includes multiple The corresponding brightness of the light sources and the average brightness of the image.
  • the processing module 13 can be used to perform white balance processing on the image according to the color temperature of the main light source.
  • the main light source is determined according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources.
  • the selected main light source is more accurate, and the white balance effect of the user can be more satisfied when the image is white balanced.
  • the time of capturing the image it can be distinguished from which time period the current time is located, and by the user's work schedule and regular habits stored in the local database, it can be determined where the user may be in the current time period to perform the shooting activity. For example, at 12 o'clock noon, the user usually has lunch at the restaurant; after 8 pm, the user usually reads in the living room.
  • the time of capturing an image it is possible to roughly distinguish whether the user is in an indoor environment, an outdoor environment, or a specific scene.
  • the outdoor GPS signal strength is generally stronger than the indoor GPS signal strength. Therefore, according to the signal strength of the GPS, the user can be roughly distinguished from the indoor environment or the outdoor environment.
  • the color temperature of the indoor light source is generally 5000K or less.
  • the color temperature of the tungsten lamp is 2760-2900K
  • the color temperature of the flash is 3800K
  • the color temperature of the outdoor light source is generally above 5000K.
  • the color temperature of the noon sunlight is 5000K.
  • the color temperature of the blue sky is 10000K. In this way, according to whether the user is in an indoor environment or an outdoor environment, it can be roughly determined whether the current color temperature should be 5000K or more or 5000K or less, thereby being used for determining the main light source.
  • the light source having the largest area can be selected as the main light source by comparing the area sizes of the plurality of light sources. For example, in FIG. 6, the area of the light source R is larger than the area of the light source G, and larger than the area of the light source B, the light source R is determined as the main light source.
  • the main light source can be determined by comparing the brightness of the plurality of light sources with the average brightness of the image. It can be understood that the higher the brightness of the light source, the greater the impact on the image as a whole. When the brightness of a light source is high and matches the average brightness of the image, the light source is determined to be the primary light source.
  • the white balance processing method of the embodiment of the present application may determine the main light source according to a combination of the time of capturing the image of the plurality of light sources and the signal intensity of the GPS, or determine the main light source according to an area corresponding to the plurality of light sources; or according to the corresponding ones of the plurality of light sources
  • the combination of the brightness and the average brightness of the image determines the primary light source; or determines the primary light source according to a combination of the time of the captured image of the plurality of light sources and the signal strength of the GPS, and the area corresponding to the plurality of light sources; or according to the captured image of the plurality of light sources a combination of time and GPS signal strength, and a combination of a corresponding brightness of the plurality of light sources and an average brightness of the image to determine the primary light source; or an area corresponding to the plurality of light sources, and a corresponding brightness of the plurality of light sources and an average brightness of the image
  • the combination determines the primary light source; or determines the primary light source
  • the white balance processing method determines the main light source based on a combination of the time of capturing the image of the plurality of light sources and the signal intensity of the GPS, the corresponding area, and the combination of the corresponding brightness and the average brightness of the image.
  • the combination of the time of capturing the image of the plurality of light sources and the signal strength of the GPS, the corresponding area, and the combination of the corresponding brightness and the average brightness of the image may respectively set different weights. In this way, the selected main light source is more accurate, and the white balance effect of the user can be more satisfied when the image is white balance processed.
  • S11 includes:
  • S112 Determine, according to a histogram of each area, whether the area is a target area including a light source;
  • S113 determining whether there are multiple adjacent target areas when the area is the target area including the light source;
  • the detecting module 11 includes a dividing unit 111, a first determining unit 112, a second determining unit 113, a first determining unit 114, and a second determining unit 115.
  • S111 may be implemented by the dividing unit 111
  • S112 may be implemented by the first determining unit 112
  • S113 may be implemented by the second determining unit 113
  • S114 may be implemented by the first determining unit 114
  • S115 may be implemented by the second determining unit 115.
  • the dividing unit 111 can be used to divide an image into a plurality of regions.
  • the first determining unit 112 may be configured to determine whether the area is a target area including a light source according to a histogram of each area.
  • the second judging unit 113 may be configured to determine whether there are a plurality of adjacent target regions when the region is the target region including the light source.
  • the first determining unit 114 may be configured to splicing adjacent plurality of target regions into light sources when there are a plurality of adjacent target regions.
  • the second determining unit 115 may be configured to determine the target area as a light source when there are no adjacent plurality of target areas.
  • the white balance processing method first divides the image into multiple regions, for example, 4*5 regions. Each area can draw four histograms according to the channel values of R, Gr, Gb, and B, and then determine whether the area is the target area including the light source according to the four histograms of each area.
  • the images each include a plurality of target areas. For example, the image in FIG. 5 includes three target areas, and the image in FIG. 6 includes eight target areas.
  • the white balance processing method determines whether there are a plurality of adjacent target areas when the existing area is the target area including the light source, that is, whether there is one light source and covers the plurality of target areas at the same time, wherein the coverage may be partially covered or completely cover.
  • the white balance processing method splicing adjacent target regions into light sources when there are a plurality of adjacent target regions; and determining each target region as a light source when there are no adjacent plurality of target regions. Referring to FIG. 5, three non-adjacent target regions are respectively determined as a light source R, a light source G, and a light source B. Referring to FIG. 6, six adjacent target areas are spliced into one complete light source R, and the other two non-adjacent target areas are respectively determined as light source G and light source B.
  • the drawing method of the histogram of the region is merely an example, and the horizontal axis of the histogram in FIG. 7 is a pixel value, and the vertical axis is the number of pixels.
  • the horizontal axis of the histogram may also be the number of pixels, and the vertical axis is the pixel value; or the horizontal axis of the histogram is the ratio of the number of pixels, and the vertical axis is the pixel value; or the horizontal axis of the histogram is The pixel value, the vertical axis of the histogram is the ratio of the number of pixels.
  • determining whether the region is a target region including a light source according to a histogram of a certain region it may be implemented by determining whether the ratio of the number of pixels whose pixel value exceeds a predetermined value exceeds a predetermined ratio. For example, it can be realized by determining whether the pixel number of the pixel value exceeding 239 exceeds 5%. When the pixel value exceeds 239, the number of pixels exceeds 5%, indicating that the area is a target area including a light source; When the number of pixels whose value exceeds 239 does not exceed 5%, it indicates that the area is not the target area including the light source.
  • S13 includes:
  • S131 determining a highlight area and a medium light area according to a brightness distribution of the center of the main light source radially outward;
  • S132 subtracting, from the average value of the primary color channel pixels of the highlighted area, the average of the primary color channel pixels of the bright area to determine the color of the primary light source
  • S133 Determine the color temperature of the main light source according to the color of the main light source.
  • the processing module 13 includes a third determining unit 131 , a calculating unit 132 , and a fourth determining unit 133 .
  • S131 may be implemented by the third determining unit 131
  • S132 may be implemented by the calculating unit 132
  • S133 may be implemented by the fourth determining unit 133.
  • the third determining unit 131 can be used to determine the highlight area and the medium bright area according to the brightness distribution radially outward of the center of the main light source.
  • the calculation unit 132 can be configured to subtract the average of the primary color channel pixels of the highlighted region from the average of the primary color channel pixels of the highlighted region to determine the color of the primary light source.
  • the fourth determining unit 133 may be configured to determine the color temperature of the main light source according to the color of the main light source.
  • the shaded area in the middle of FIG. 10 is an overexposed area, generally a large white spot, and does not contain information of the color of the light source.
  • the light-emitting area H, the medium-light area M, and the low-light area L are sequentially arranged in the radial direction.
  • the highlight area H may be an area formed by pixels whose luminance values in the center of the main light source are radially outward in the first luminance range L1, and the first luminance range L1 is, for example, [200, 239).
  • the medium bright area M may be an area formed by pixels whose luminance values in the center of the light source are radially outward in the second luminance range L2, and the second luminance range L2 is, for example, [150, 200).
  • the specific values of the first brightness range L1 and the second brightness range L2 may be determined according to the brightness distribution of the center of the main light source along the radial direction. For example, the brightness of the light source is attenuated relatively quickly, and may be appropriately increased.
  • a luminance range L1 and a second luminance range L2 for example, the luminance of the light source is attenuated relatively slowly, and the first luminance range L1 and the second luminance range L2 may be appropriately reduced.
  • the average of the primary color channel pixels of the highlighted area is the average of the pixel values of all the pixels of the highlighted area
  • the average of the primary color channel pixels of the bright area is the average of the pixel values of all the pixels of the medium bright area.
  • the average of the primary color channel pixels in the highlighted area is:
  • the average of the primary color channel pixels in the bright area is:
  • the primary channel pixel average of the highlighted area Subtract the average of the primary channel pixels in the mid-light region which is To determine the color of the main light source, the color temperature of the main light source can be determined according to the color of the main light source. Specifically, referring to FIG. 11, in an embodiment, an image may be acquired under a standard light box with color temperatures of 3000K, 4000K, 5000K, 6000K, . . . , and correspondingly calculated at different color temperatures. Value, which can be formed A graph of the relationship between the color temperature of the light source (as shown in Figure 11) or a mapping table, and the relationship graph or mapping table can be saved in a local database. In the embodiment of the present application, the calculation is obtained.
  • the color temperature of the corresponding main light source can be obtained through the relationship graph or the mapping table. Then, according to the color temperature of the main light source and the corresponding relationship between the color temperature of the main light source and the white balance parameter, the corresponding white balance parameter can be found, so that the image can be white balanced according to the white balance parameter.
  • the white balance processing method further includes:
  • S14 Determine the main light source according to the operation assist of the user after the white balance processing image.
  • the white balance processing device 10 further includes a second determination module 14 .
  • S14 can be implemented by the second determining module 14.
  • the second determining module 14 can be used to determine the main light source according to the operation of the user after the white balance processed image.
  • the white balance processing method of the embodiment of the present invention may determine the main light source according to at least one of the scene parameter, the corresponding area, and the brightness parameter of the plurality of light sources, and may also perform the image after the white balance processing according to the user. Operation to assist in determining the primary source. The operation includes at least one of editing, saving, and deleting.
  • the image after the white balance processing may be some images stored in the local album after the white balance processing. It can be understood that the user generally selects an image that he thinks the white balance effect is better, and deletes the image with a poor white balance effect. In addition, when the user is at leisure, it is also possible to make some edits to the image, for example, to adjust the color temperature of the image. Thus, after long-term machine learning and feedback, the process of determining the main light source by the white balance processing method will become more and more accurate, and the white balance effect of the user will be more and more satisfied when the image is white balanced.
  • the electronic device 20 of the embodiment of the present application includes one or more processors 21, a memory 22, and one or more programs.
  • one or more programs are stored in the memory 22 and are configured to be executed by one or more processors 21.
  • the program includes instructions for performing the white balance processing method of any of the above embodiments.
  • the program includes instructions for performing the following white balance processing methods:
  • S12 determining a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes a time of capturing the image and a signal strength of the GPS, and the brightness parameter includes a corresponding brightness of the plurality of light sources. And the average brightness of the image; and
  • S13 Perform white balance processing on the image according to the color temperature of the main light source.
  • the main light source is determined according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources.
  • the selected main light source is more accurate,
  • the image is white balanced, it can better meet the user's expected white balance effect.
  • the electronic device 20 of the embodiment of the present application includes, but is not limited to, an electronic device having a photographing function such as a mobile phone, a tablet computer, a notebook computer, or a camera.
  • a computer readable storage medium 30 of an embodiment of the present application includes a computer program for use in conjunction with the electronic device 20.
  • the computer program can be executed by the processor 21 to perform the white balance processing method of any of the above embodiments.
  • a computer program can be executed by processor 21 to perform the following white balance processing method:
  • S12 determining a primary light source according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, wherein the scene parameter includes a time of capturing the image and a signal strength of the GPS, and the brightness parameter includes a corresponding brightness of the plurality of light sources. And the average brightness of the image; and
  • S13 Perform white balance processing on the image according to the color temperature of the main light source.
  • the main light source is determined according to at least one of a scene parameter, a corresponding area, and a brightness parameter of the plurality of light sources, so that the selected main light source is compared. Accurate, white balance processing of the image can better meet the user's expected white balance effect.
  • 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.
  • computer readable media include the following: electrical connections (IPM overcurrent protection circuits) with one or more wires, portable computer disk cartridges (magnetic devices), random access memories (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).
  • 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.
  • portions of the embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present application 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 modules can be implemented in the form of hardware or in the form of software functional modules.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Color Image Communication Systems (AREA)

Abstract

一种白平衡处理方法、白平衡处理装置(10)、电子装置(20)和计算机可读存储介质(30)。白平衡处理方法用于对多光源场景的图像进行白平衡处理。白平衡处理方法包括:(S11)检测图像的多个光源;(S12)根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,场景参数包括拍摄图像的时间和GPS的信号强度,亮度参数包括多个光源的对应的亮度和图像的平均亮度;和(S13)根据主光源的色温对图像进行白平衡处理。本申请实施方式的白平衡处理方法在图像中包括多个光源时,根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。

Description

白平衡处理方法及装置、电子装置和计算机可读存储介质
优先权信息
本申请请求2017年10月30日向中国国家知识产权局提交的、专利申请号为201711035586.5的专利申请的优先权和权益,并且通过参照将其全文并入此处。
技术领域
本申请涉及图像处理技术领域,特别涉及一种白平衡处理方法及装置、电子装置和计算机可读存储介质。
背景技术
在多光源场景中,相关技术的白平衡方法无法从图像的多个光源中准确地选取主光源,进而导致根据主光源的色温进行白平衡校正后的图像的效果不佳,影响使用体验。
发明内容
本申请实施方式提供一种白平衡处理方法、白平衡处理装置、电子装置和计算机可读存储介质。
本申请实施方式的白平衡处理方法,用于对多光源场景的图像进行白平衡处理,其特征在于,所述白平衡处理方法包括:
检测所述图像的多个光源;
根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
根据所述主光源的色温对所述图像进行白平衡处理。
本申请实施方式的白平衡处理装置,用于对多光源场景的图像进行白平衡处理,所述白平衡处理装置包括:
检测模块,所述检测模块用于检测所述图像的多个光源;和
第一确定模块,所述第一确定模块用于根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
处理模块,所述处理模块用于根据所述主光源的色温对所述图像进行白平衡处理。
本申请实施方式的电子装置,包括:
一个或多个处理器;
存储器;和
一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述程序包括用于所述白平衡处理方法的指令。
本申请实施方式的计算机可读存储介质,包括与电子装置结合使用的计算机程序,所述计算机程序可被处理器执行以完成所述白平衡处理方法。
本申请实施方式的白平衡处理方法、白平衡处理装置、电子装置和计算机可读存储介质,在图像中包括多个光源时,根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,如此,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。
本申请实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请的上述和/或附加的方面和优点可以从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:
图1是本申请实施方式的白平衡处理方法的流程示意图;
图2是本申请实施方式的白平衡处理装置的模块示意图;
图3是本申请实施方式的白平衡处理方法的流程示意图;
图4是本申请实施方式的检测模块的模块示意图;
图5是本申请实施方式的白平衡处理方法的场景示意图;
图6是本申请实施方式的白平衡处理方法的场景示意图;
图7是本申请实施方式的白平衡处理方法的每个区域形成的直方图;
图8是本申请实施方式的白平衡处理方法的流程示意图;
图9是本申请实施方式的处理模块的模块示意图;
图10是本申请实施方式的白平衡处理方法的场景示意图;
图11是本申请实施方式的白平衡处理方法的色温曲线图;
图12是本申请实施方式的白平衡处理方法的流程示意图;
图13是本申请实施方式的白平衡处理装置的模块示意图;
图14是本申请实施方式的电子装置的模块示意图;
图15是本申请实施方式的电子装置和计算机可读存储介质的连接示意图;
主要元件及符号说明:
白平衡处理装置10、检测模块11、划分单元111、第一判断单元112、第二判断单元113、第一确定单元114、第二确定单元115、第一确定模块12、处理模块13、第二确定模块14、电子装置20、处理器21、存储器22、计算机可读存储介质30。
具体实施方式
下面详细描述本申请的实施方式,所述实施方式的示例在附图中示出,其中,相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的实施方式的限制。
在本申请的实施方式的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请的实施方式和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的实施方式的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请的实施方式的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
下文的公开提供了许多不同的实施方式或例子用来实现本申请的实施方式的不同结构。为了简化本申请的实施方式的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本申请。此外,本申请的实施方式可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。
请参阅图1,本申请实施方式的白平衡处理方法用于对多光源场景的图像进行白平衡处理。白平衡处理方法包括:
S11:检测图像的多个光源;
S12:根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,场景参数包括拍摄图像的时间和GPS的信号强度,亮度参数包括多个光源的对应的亮度和图像的平均亮度;和
S13:根据主光源的色温对图像进行白平衡处理。
请参阅图2,本申请实施方式的白平衡处理装置10用于对多光源场景的图像进行白平衡处理。白平衡处理装置10包括检测模块11、第一确定模块12和处理模块13。本申请实 施方式的白平衡处理方法可由本申请实施方式的白平衡处理装置10实现。例如,S11可由检测模块11实现,S12可由第一确定模块12实现,S13可由处理模块13实现。
也即是说,检测模块11可以用于检测图像的多个光源。第一确定模块12可以用于根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,场景参数包括拍摄图像的时间和GPS的信号强度,亮度参数包括多个光源的对应的亮度和图像的平均亮度。处理模块13可以用于根据主光源的色温对图像进行白平衡处理。
本申请实施方式的白平衡处理方法和白平衡处理装置10,在图像中包括多个光源时,根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,如此,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。
具体地,根据拍摄图像的时间可以区分当前时间位于哪个时间段,通过保存在本地数据库的用户作息时间和常规习惯,可以判断用户在当前时间段可能处于什么地点进行拍摄活动。例如,在中午12点钟的时候,该用户一般在餐厅吃午饭;在晚上8点以后,用户一般在客厅看书。如此,根据拍摄图像的时间可以大致区分出用户处于室内环境、还是室外环境或者某个特定场景。另外,由于室外的GPS的信号强度一般比室内的GPS的信号强度更强。因此,根据GPS的信号强度也可以大致区分出用户处于室内环境或室外环境。可以理解,室内的光源的色温一般为5000K以下,例如,钨丝灯的色温为2760-2900K,闪光灯的色温为3800K;室外的光源的色温一般在5000K以上,例如,中午阳光的色温为5000K,蓝天的色温为10000K。如此,根据用户处于室内环境或室外环境可以大致判断当前色温应该在5000K以上还是5000K以下,由此,可以用于确定主光源。
当根据多个光源的对应的面积确定主光源时,可以通过比较多个光源的面积大小,选取面积最大的光源作为主光源。例如,在图6中,光源R的面积大于光源G的面积,且大于光源B的面积,则确定光源R作为主光源。
当根据多个光源对应的亮度和图像的平均亮度的组合确定主光源时,可以通过比较多个光源的亮度,并结合图像的平均亮度来确定主光源。可以理解,光源的亮度越高,对图像整体的影响一般越大。当某个光源的亮度较高且与图像的平均亮度匹配时,则确定该光源作为主光源。
本申请实施方式的白平衡处理方法可以根据多个光源的拍摄图像的时间和GPS的信号强度的组合确定主光源,或者根据多个光源对应的面积确定主光源;或者根据多个光源的对应的亮度和图像的平均亮度的组合确定主光源;或者根据多个光源的拍摄图像的时间和GPS的信号强度的组合、和多个光源对应的面积确定主光源;或者根据多个光源的拍摄图像的时间和GPS的信号强度的组合、和多个光源的对应的亮度和图像的平均亮度的组合确定主光源;或者根据多个光源对应的面积、和多个光源的对应的亮度和图像的平均亮度的 组合确定主光源;或者根据多个光源的拍摄图像的时间和GPS的信号强度的组合、对应的面积、和对应的亮度和图像的平均亮度的组合确定主光源。
较佳地,白平衡处理方法根据多个光源的拍摄图像的时间和GPS的信号强度的组合、对应的面积、和对应的亮度和图像的平均亮度的组合确定主光源。多个光源的拍摄图像的时间和GPS的信号强度的组合、对应的面积、和对应的亮度和图像的平均亮度的组合可以分别设置不同的权重。如此,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。
请参阅图3,在某些实施方式中,S11包括:
S111:将图像分成多个区域;
S112:根据每个区域的直方图,判断区域是否为包括光源的目标区域;
S113:在区域为包括光源的目标区域时,判断是否存在相邻的多个目标区域;
S114:在存在相邻的多个目标区域时,将相邻的多个目标区域拼接为光源;和
S115:在不存在相邻的多个目标区域时,将目标区域确定为光源。
请参阅图4,在某些实施方式中,检测模块11包括划分单元111、第一判断单元112、第二判断单元113、第一确定单元114和第二确定单元115。S111可由划分单元111实现,S112可由第一判断单元112实现,S113可由第二判断单元113实现,S114可由第一确定单元114实现,S115可由第二确定单元115实现。
也即是说,划分单元111可以用于将图像分成多个区域。第一判断单元112可以用于根据每个区域的直方图,判断区域是否为包括光源的目标区域。第二判断单元113可以用于在区域为包括光源的目标区域时,判断是否存在相邻的多个目标区域。第一确定单元114可以用于在存在相邻的多个目标区域时,将相邻的多个目标区域拼接为光源。第二确定单元115可以用于在不存在相邻的多个目标区域时,将目标区域确定为光源。
具体地,请参阅图5-图7,在一个实施例中,白平衡处理方法先将图像分成多个区域,例如,4*5个区域。每个区域按R、Gr、Gb、B的通道值可以绘制4张直方图,然后根据每个区域的4张直方图判断该区域是否为包括光源的目标区域。在图5和图6中,图像均包括多个目标区域。例如,图5中的图像包括3个目标区域,图6中的图像包括8个目标区域。白平衡处理方法在存在区域为包括光源的目标区域时,判断是否存在相邻的多个目标区域,即判断是否存在一个光源同时覆盖多个目标区域的情况,其中,覆盖可以为部分覆盖或者完全覆盖。白平衡处理方法在存在相邻的多个目标区域时,将相邻的多个目标区域拼接为光源;在不存在相邻的多个目标区域时,将每个目标区域都确定为光源。请参阅图5,3个互不相邻的目标区域分别确定为光源R、光源G、光源B。请参阅图6,其中6个相邻的目标区域拼接为一个完整的光源R,另外两个不相邻的目标区域分别确定为光源 G、光源B。
另外,需要指出的是,在图7中,区域的直方图的绘制方法仅为示例,图7中的直方图的横轴为像素值,纵轴为像素个数。在其他实施例中,直方图的横轴还可以为像素个数,纵轴为像素值;或者直方图的横轴为像素个数占比,纵轴为像素值;或者直方图的横轴为像素值,直方图的纵轴为像素个数占比。
在某些实施方式中,在根据某个区域的直方图来判断该区域是否为包括光源的目标区域时,可以通过判断像素值超过预定值的像素个数占比是否超过预定占比来实现。例如,可以通过判断像素值超过239的像素个数占比是否超过5%来实现,当像素值超过239的像素个数占比超过5%时,表明该区域为包括光源的目标区域;当像素值超过239的像素个数占比不超过5%时,表明该区域不为包括光源的目标区域。
请参阅图8,在某些实施方式中,S13包括:
S131:根据主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域;
S132:将高亮区域的基色通道像素平均值减去中亮区域的基色通道像素平均值以确定主光源的颜色;和
S133:根据主光源的颜色确定主光源的色温。
请参阅图9,在某些实施方式中,处理模块13包括第三确定单元131、计算单元132和第四确定单元133。S131可由第三确定单元131实现,S132可由计算单元132实现,S133可由第四确定单元133实现。
也即是说,第三确定单元131可以用于根据主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域。计算单元132可以用于将高亮区域的基色通道像素平均值减去中亮区域的基色通道像素平均值以确定主光源的颜色。第四确定单元133可以用于根据主光源的颜色确定主光源的色温。
具体地,请参阅图10,在图像中的主光源的位置确定后,图10中间的阴影区域为过曝区域,一般为大白斑,不包含光源颜色的信息。沿主光源的中心沿径向向外依次为高亮区域H、中亮区域M和低亮区域L。高亮区域H可以是指主光源的中心沿径向向外的亮度值处于第一亮度范围L1的像素所构成的区域,第一亮度范围L1例如为[200,239)。中亮区域M可以是指光源的中心沿径向向外的亮度值处于第二亮度范围L2的像素所构成的区域,第二亮度范围L2例如为[150,200)。需要说明的是,第一亮度范围L1和第二亮度范围L2的具体取值可以根据主光源的中心沿径向向外的亮度分布确定,例如光源的亮度衰减得比较快,可以适当增大第一亮度范围L1和第二亮度范围L2;例如光源的亮度衰减得比较慢,可以适当减小第一亮度范围L1和第二亮度范围L2。
高亮区域的基色通道像素平均值即为高亮区域的所有像素的像素值的平均值,中亮区 域的基色通道像素平均值即为中亮区域的所有像素的像素值的平均值。假设高亮区域的像素个数为C1,中亮区域的像素个数为C2,则
高亮区域的基色通道像素平均值为:
Figure PCTCN2018107936-appb-000001
中亮区域的基色通道像素平均值为:
Figure PCTCN2018107936-appb-000002
将高亮区域的基色通道像素平均值
Figure PCTCN2018107936-appb-000003
减去中亮区域的基色通道像素平均值
Figure PCTCN2018107936-appb-000004
Figure PCTCN2018107936-appb-000005
以确定主光源的颜色,根据主光源的颜色可以对应确定主光源的色温。具体地,请参阅图11,在一个实施例中,可以在色温分别为3000K、4000K、5000K、6000K、……的标准灯箱下,获取图像并通过计算得到在上述不同色温下对应的
Figure PCTCN2018107936-appb-000006
的值,由此可以形成
Figure PCTCN2018107936-appb-000007
与光源的色温之间的关系曲线图(如图11所示)或映射表,并可以将该关系曲线图或映射表保存在本地数据库。在本申请实施方式中,在计算得到
Figure PCTCN2018107936-appb-000008
后,可以通过该关系曲线图或映射表,查询得到对应的主光源的色温。然后,根据主光源的色温、以及主光源的色温和白平衡参数的对应关系可以查找获得相应的白平衡参数,从而可以根据白平衡参数对图像进行白平衡处理。
请参阅图12,在某些实施方式中,白平衡处理方法还包括:
S14:根据用户对经过白平衡处理后的图像的操作辅助确定主光源。
请参阅图13,在某些实施方式中,白平衡处理装置10还包括第二确定模块14。S14可由第二确定模块14实现。
也即是说,第二确定模块14可以用于根据用户对经过白平衡处理后的图像的操作辅助确定主光源。
本申请实施方式的白平衡处理方法,在根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源的同时,还可以根据用户平时对经过白平衡处理后的图像的操作来辅助确定主光源。该操作包括编辑、保存、删除中的至少一种。
具体地,经过白平衡处理后的图像可以为经过白平衡处理后存储在本地相册中的一些图像。可以理解,用户一般会选择自己认为白平衡效果较好的图像保存下来,而将白平衡效果不佳的图像删除。另外,用户在闲暇时,还可能对图像进行一些编辑,例如,调节图像的色温。如此,经过长期的机器学习和反馈,白平衡处理方法确定主光源的过程会越来越准确,对图像进行白平衡处理时会越来越满足用户预期的白平衡效果。
请参阅图14,本申请实施方式的电子装置20包括一个或多个处理器21、存储器22和一个或多个程序。其中,一个或多个程序被存储在存储器22中,并且被配置成由一个或多 个处理器21执行。程序包括用于执行上述任一实施方式的白平衡处理方法的指令。
例如,程序包括用于执行以下白平衡处理方法的指令:
S11:检测图像的多个光源;
S12:根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,场景参数包括拍摄图像的时间和GPS的信号强度,亮度参数包括多个光源的对应的亮度和图像的平均亮度;和
S13:根据主光源的色温对图像进行白平衡处理。
本申请实施方式的电子装置20在图像中包括多个光源时,根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,如此,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。
本申请实施方式的电子装置20包括但不限于手机、平板电脑、笔记本电脑、照相机等具有拍摄功能的电子装置。
请参阅图15,本申请实施方式的计算机可读存储介质30包括与电子装置20结合使用的计算机程序。计算机程序可被处理器21执行以完成上述任一实施方式的白平衡处理方法。
例如,计算机程序可被处理器21执行以完成以下白平衡处理方法:
S11:检测图像的多个光源;
S12:根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,场景参数包括拍摄图像的时间和GPS的信号强度,亮度参数包括多个光源的对应的亮度和图像的平均亮度;和
S13:根据主光源的色温对图像进行白平衡处理。
本申请实施方式的计算机可读存储介质30在图像中包括多个光源时,根据多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,如此,选取的主光源较为准确,对图像进行白平衡处理时更能满足用户预期的白平衡效果。
在本说明书的描述中,参考术语“某些实施方式”、“示例”等的描述意指结合所述实施方式或示例描述的具体特征、或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理模块的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(IPM过流保护电路),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本申请的实施方式的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请的各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。
尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施实施进行变化、修改、替换和变型。

Claims (20)

  1. 一种白平衡处理方法,用于对多光源场景的图像进行白平衡处理,其特征在于,所述白平衡处理方法包括:
    检测所述图像的多个光源;
    根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
    根据所述主光源的色温对所述图像进行白平衡处理。
  2. 根据权利要求1所述的白平衡处理方法,其特征在于,所述检测所述图像的多个光源的步骤包括:
    将所述图像分成多个区域;
    根据每个所述区域的直方图,判断所述区域是否为包括所述光源的目标区域;
    在所述区域为包括所述光源的目标区域时,判断是否存在相邻的多个所述目标区域;
    在存在相邻的多个所述目标区域时,将相邻的多个所述目标区域拼接为所述光源;和
    在不存在相邻的多个所述目标区域时,将所述目标区域确定为所述光源。
  3. 根据权利要求1所述的白平衡处理方法,其特征在于,所述白平衡处理方法还包括:
    根据用户对经过白平衡处理后的所述图像的操作辅助确定主光源。
  4. 根据权利要求3所述的白平衡处理方法,其特征在于,所述操作包括编辑、保存、删除中的至少一种。
  5. 根据权利要求1所述的白平衡处理方法,其特征在于,所述根据所述主光源的色温对所述图像进行白平衡处理的步骤包括:
    根据所述主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域;
    将所述高亮区域的基色通道像素平均值减去所述中亮区域的基色通道像素平均值以确定所述主光源的颜色;和
    根据所述主光源的颜色确定所述主光源的色温。
  6. 一种白平衡处理装置,用于对多光源场景的图像进行白平衡处理,其特征在于,所 述白平衡处理装置包括:
    检测模块,所述检测模块用于检测所述图像的多个光源;和
    第一确定模块,所述第一确定模块用于根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
    处理模块,所述处理模块用于根据所述主光源的色温对所述图像进行白平衡处理。
  7. 根据权利要求6所述的白平衡处理装置,其特征在于,所述检测模块包括:
    划分单元,所述划分单元用于将所述图像分成多个区域;
    第一判断单元,所述第一判断单元用于根据每个所述区域的直方图,判断所述区域是否为包括所述光源的目标区域;
    第二判断单元,所述第二判断单元用于在所述区域为包括所述光源的目标区域时,判断是否存在相邻的多个所述目标区域;
    第一确定单元,所述第一确定单元用于在存在相邻的多个所述目标区域时,将相邻的多个所述目标区域拼接为所述光源;和
    第二确定单元,所述第二确定单元用于在不存在相邻的多个所述目标区域时,将所述目标区域确定为所述光源。
  8. 根据权利要求6所述的白平衡处理装置,其特征在于,所述白平衡处理装置还包括:
    第二确定模块,所述第二确定模块用于根据用户对经过白平衡处理后的所述图像的操作辅助确定主光源。
  9. 根据权利要求8所述的白平衡处理装置,其特征在于,所述操作包括编辑、保存、删除中的至少一种。
  10. 根据权利要求6所述的白平衡处理方法,其特征在于,所述处理模块包括:
    第三确定单元,所述第三确定单元用于根据所述主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域;
    计算单元,所述计算单元用于将所述高亮区域的基色通道像素平均值减去所述中亮区域的基色通道像素平均值以确定所述主光源的颜色;和
    第四确定单元,所述第四确定单元用于根据所述主光源的颜色确定所述主光源的色温。
  11. 一种电子装置,其特征在于,包括:
    一个或多个处理器;
    存储器;和
    一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述程序包括用于执行以下对多光源场景的图像进行白平衡处理的白平衡处理方法的指令:
    检测所述图像的多个光源;
    根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
    根据所述主光源的色温对所述图像进行白平衡处理。
  12. 根据权利要求11所述的电子装置,其特征在于,所述程序包括用于执行以下白平衡处理方法的指令:
    将所述图像分成多个区域;
    根据每个所述区域的直方图,判断所述区域是否为包括所述光源的目标区域;
    在所述区域为包括所述光源的目标区域时,判断是否存在相邻的多个所述目标区域;
    在存在相邻的多个所述目标区域时,将相邻的多个所述目标区域拼接为所述光源;和
    在不存在相邻的多个所述目标区域时,将所述目标区域确定为所述光源。
  13. 根据权利要求11所述的电子装置,其特征在于,所述程序还包括用于执行以下白平衡处理方法的指令:
    根据用户对经过白平衡处理后的所述图像的操作辅助确定主光源。
  14. 根据权利要求13所述的电子装置,其特征在于,所述操作包括编辑、保存、删除中的至少一种。
  15. 根据权利要求11所述的电子装置,其特征在于,所述程序包括用于执行以下白平衡处理方法的指令:
    根据所述主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域;
    将所述高亮区域的基色通道像素平均值减去所述中亮区域的基色通道像素平均值以确定所述主光源的颜色;和
    根据所述主光源的颜色确定所述主光源的色温。
  16. 一种计算机可读存储介质,其特征在于,包括与电子装置结合使用的计算机程序,所述计算机程序可被处理器执行以完成以下对多光源场景的图像进行白平衡处理的白平衡处理方法:
    检测所述图像的多个光源;
    根据所述多个光源的场景参数、对应的面积、亮度参数中的至少一种确定主光源,其中,所述场景参数包括拍摄所述图像的时间和GPS的信号强度,所述亮度参数包括所述多个光源的对应的亮度和所述图像的平均亮度;和
    根据所述主光源的色温对所述图像进行白平衡处理。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机程序可被处理器执行以完成以下白平衡处理方法:
    将所述图像分成多个区域;
    根据每个所述区域的直方图,判断所述区域是否为包括所述光源的目标区域;
    在所述区域为包括所述光源的目标区域时,判断是否存在相邻的多个所述目标区域;
    在存在相邻的多个所述目标区域时,将相邻的多个所述目标区域拼接为所述光源;和
    在不存在相邻的多个所述目标区域时,将所述目标区域确定为所述光源。
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机程序还可被处理器执行以完成以下白平衡处理方法:
    根据用户对经过白平衡处理后的所述图像的操作辅助确定主光源。
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述操作包括编辑、保存、删除中的至少一种。
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机程序可被处理器执行以完成以下白平衡处理方法:
    根据所述主光源的中心沿径向向外的亮度分布,确定高亮区域和中亮区域;
    将所述高亮区域的基色通道像素平均值减去所述中亮区域的基色通道像素平均值以确定所述主光源的颜色;和
    根据所述主光源的颜色确定所述主光源的色温。
PCT/CN2018/107936 2017-10-30 2018-09-27 白平衡处理方法及装置、电子装置和计算机可读存储介质 WO2019085698A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711035586.5 2017-10-30
CN201711035586.5A CN107682685B (zh) 2017-10-30 2017-10-30 白平衡处理方法及装置、电子装置和计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019085698A1 true WO2019085698A1 (zh) 2019-05-09

Family

ID=61142880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107936 WO2019085698A1 (zh) 2017-10-30 2018-09-27 白平衡处理方法及装置、电子装置和计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107682685B (zh)
WO (1) WO2019085698A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107682685B (zh) * 2017-10-30 2019-03-08 Oppo广东移动通信有限公司 白平衡处理方法及装置、电子装置和计算机可读存储介质
CN108600631B (zh) * 2018-05-16 2021-03-12 Oppo广东移动通信有限公司 图像处理方法、装置、计算机可读存储介质和电子设备
CN109040729B (zh) * 2018-08-16 2020-04-07 Oppo广东移动通信有限公司 图像白平衡校正方法、装置、存储介质及终端
CN109327691B (zh) * 2018-10-23 2021-05-04 Oppo广东移动通信有限公司 图像拍摄方法、装置、存储介质及移动终端
JP2021182672A (ja) * 2020-05-18 2021-11-25 キヤノン株式会社 画像処理装置、画像処理方法、及びプログラム
CN112995635B (zh) * 2021-04-21 2021-07-20 贝壳找房(北京)科技有限公司 图像的白平衡处理方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000244940A (ja) * 1999-02-19 2000-09-08 Fuji Photo Film Co Ltd ホワイトバランス調整方法およびシステム並びに記録媒体
CN101399998A (zh) * 2007-09-24 2009-04-01 鸿富锦精密工业(深圳)有限公司 白平衡调整系统及方法
US20110050948A1 (en) * 2009-08-27 2011-03-03 Samsung Electronics Co., Ltd. Apparatus and method for adjusting automatic white balance by detecting effective area
CN102957918A (zh) * 2011-08-31 2013-03-06 联咏科技股份有限公司 显示影像的白平衡方法
CN107682685A (zh) * 2017-10-30 2018-02-09 广东欧珀移动通信有限公司 白平衡处理方法及装置、电子装置和计算机可读存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6525503B2 (ja) * 2014-04-14 2019-06-05 キヤノン株式会社 画像処理装置および撮像装置
CN105872510B (zh) * 2016-04-25 2017-11-21 浙江大华技术股份有限公司 一种图像白平衡处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000244940A (ja) * 1999-02-19 2000-09-08 Fuji Photo Film Co Ltd ホワイトバランス調整方法およびシステム並びに記録媒体
CN101399998A (zh) * 2007-09-24 2009-04-01 鸿富锦精密工业(深圳)有限公司 白平衡调整系统及方法
US20110050948A1 (en) * 2009-08-27 2011-03-03 Samsung Electronics Co., Ltd. Apparatus and method for adjusting automatic white balance by detecting effective area
CN102957918A (zh) * 2011-08-31 2013-03-06 联咏科技股份有限公司 显示影像的白平衡方法
CN107682685A (zh) * 2017-10-30 2018-02-09 广东欧珀移动通信有限公司 白平衡处理方法及装置、电子装置和计算机可读存储介质

Also Published As

Publication number Publication date
CN107682685B (zh) 2019-03-08
CN107682685A (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2019085698A1 (zh) 白平衡处理方法及装置、电子装置和计算机可读存储介质
US10812733B2 (en) Control method, control device, mobile terminal, and computer-readable storage medium
KR102356372B1 (ko) 화이트 밸런스 처리 방법, 전자 장치 및 컴퓨터 판독 가능 저장 매체
JP6903817B2 (ja) ホワイトバランス処理方法、電子機器、およびコンピュータ可読記憶媒体
JP6874208B2 (ja) ホワイトバランス処理方法、電子機器、およびコンピュータ可読記憶媒体
CN107959851B (zh) 色温检测方法及装置、计算机可读存储介质和计算机设备
TWI532385B (zh) 白平衡處理方法及其處理裝置
WO2017166479A1 (zh) 图像采集设备的测光方法及装置
US10491874B2 (en) Image processing method and device, computer-readable storage medium
KR101631012B1 (ko) 화상 처리 장치 및 화상 처리 방법
US20170091909A1 (en) Image processing method and device
JP2009183010A (ja) 撮像装置、撮像装置のホワイトバランス処理方法、プログラム、及び記録媒体
US8482630B2 (en) Apparatus and method for adjusting automatic white balance by detecting effective area
CN108063934B (zh) 图像处理方法及装置、计算机可读存储介质和计算机设备
JP5740147B2 (ja) 光源推定装置及び光源推定方法
KR101516963B1 (ko) 유효 영역을 이용한 자동 화이트 밸런스 조정 장치 및 방법
US20130182143A1 (en) Apparatus and a method for processing a moving image, and a non-transitory computer readable medium thereof
CN113029363B (zh) 一种混合光源的检测方法、装置、设备及存储介质
US11488375B2 (en) Illumination color prediction method, image processing method, apparatus and storage medium
CN117726570A (zh) 图像处理方法、装置、电子设备及可读存储介质
JP2018014635A (ja) 画像処理装置及びプログラム
JP2016072916A (ja) 画像処理装置、その制御方法、および制御プログラム

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: 18874060

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: 18874060

Country of ref document: EP

Kind code of ref document: A1