CN108881875B - Image white balance processing method and device, storage medium and terminal - Google Patents

Image white balance processing method and device, storage medium and terminal Download PDF

Info

Publication number
CN108881875B
CN108881875B CN201810935319.1A CN201810935319A CN108881875B CN 108881875 B CN108881875 B CN 108881875B CN 201810935319 A CN201810935319 A CN 201810935319A CN 108881875 B CN108881875 B CN 108881875B
Authority
CN
China
Prior art keywords
brightness
light source
area
white balance
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810935319.1A
Other languages
Chinese (zh)
Other versions
CN108881875A (en
Inventor
孙剑波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810935319.1A priority Critical patent/CN108881875B/en
Publication of CN108881875A publication Critical patent/CN108881875A/en
Application granted granted Critical
Publication of CN108881875B publication Critical patent/CN108881875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The embodiment of the application discloses a method, a device, a storage medium and a terminal for processing image white balance, wherein the method comprises the following steps: when the photographing scene is a mixed light scene, searching a first brightness area in the target image; then, identifying texture information of the first brightness region; and finally, performing white balance correction on the first brightness area according to the texture information. The long exposure image quality is improved, and the image definition is improved when a strong light source exists in a dark light scene.

Description

Image white balance processing method and device, storage medium and terminal
Technical Field
The embodiment of the application relates to the technical field of mobile terminals, in particular to an image white balance processing method, an image white balance processing device, a storage medium and a terminal.
Background
With the continuous development of mobile terminals, almost every mobile terminal is configured with a camera function, and photographing can be performed based on the camera function. The mobile terminal tends to an automatic photographing process, and can automatically perform exposure according to a photographing environment.
However, in the shooting process, if a strong light source appears during shooting in a dark light environment, the color of a light source area approaches to the original color of the light source after automatic processing by a machine, and a shooting object at the dark light position cannot be clearly displayed, even approaches to black, so that the definition of a shot image is poor.
Disclosure of Invention
The embodiment of the application aims to provide an image white balance processing method, an image white balance processing device, a storage medium and a terminal, which can improve the image definition of photographing in a dark light environment.
In a first aspect, an embodiment of the present application provides an image white balance processing method, including:
when the photographing scene is a mixed light scene, searching a first brightness region in the target image, wherein the brightness of the first brightness region is greater than the preset brightness;
identifying texture information of the first luminance region;
and performing white balance correction on the first brightness region according to the texture information.
In a second aspect, an embodiment of the present application provides an image white balance processing apparatus, including:
the device comprises a searching module, a judging module and a judging module, wherein the searching module is used for searching a first brightness area in a target image when a photographing scene is a mixed light scene, and the brightness of the first brightness area is greater than the preset brightness;
the identification module is used for identifying the texture information of the first brightness area searched by the searching module;
and the white balance module is used for carrying out white balance correction on the first brightness area according to the texture information identified by the identification module.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the image white balance processing method as shown in the first aspect.
In a fourth aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the image white balance processing method according to the first aspect when executing the computer program.
According to the image white balance processing scheme provided by the embodiment of the application, firstly, when a photographing scene is a mixed light scene, a first brightness area in a target image is searched; then, identifying texture information of the first brightness region; and finally, performing white balance correction on the first brightness area according to the texture information. The long exposure image quality is improved, and the image definition is improved when a strong light source exists in a dark light scene.
Drawings
Fig. 1 is a schematic flowchart of an image white balance processing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another image white balance processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another image white balance processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another image white balance processing method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another image white balance processing method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another image white balance processing method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an image white balance processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
With the continuous development of mobile terminals, almost every mobile terminal is configured with a camera function, and photographing can be performed based on the camera function. The mobile terminal tends to an automatic photographing process, and can automatically perform exposure according to a photographing environment.
However, in use, it is found that if a strong light source appears during photographing in a dark light environment, the light source approaches to the natural color of the light source after automatic processing by a machine, and a photographed object in the dark light cannot be clearly displayed, even approaches to black, so that the definition of a photographed image is poor.
When a user shoots in a scene with a strong light source, the acquired image includes the strong light source and a non-luminous subject, and the scene is called a mixed light scene. For example, a user takes a scene outside a window in a dark room, or a user takes a backlight picture, or a user takes a scene with a shadow picture under outdoor sun illumination, or the like. The embodiment of the application provides an image white balance processing method, which can search a first brightness area in a mixed light scene, identify texture information of the first brightness area, and perform white balance on a target image based on the texture information. Since the color of the light source is refracted to other objects, for example, when outdoor light irradiates an indoor mirror object, the indoor mirror object also "shines". But by texture analysis the mirror in the customer room is not a light emitter. Therefore, the unreal first brightness region can be identified through texture analysis, the first brightness region corresponding to the real light source region is found, white balance correction is carried out according to the color of the first brightness region, and the image quality of the mixed light shooting environment is improved. The light source area is an area where the light source is located, and the first brightness area is an image area corresponding to the light source in the target image. Alternatively, the light source region may be a region with higher brightness in the image or an overexposed region in the backlight. The specific scheme is as follows:
fig. 1 is a schematic flow chart of an image white balance processing method according to an embodiment of the present application, where the method is used in a mixed light scene shooting situation, and the method may be executed by a mobile terminal, where the mobile terminal may be a smart phone, a tablet computer, a wearable device, a notebook computer, and the method specifically includes the following steps:
and step 110, when the photographing scene is a mixed light scene, searching a first brightness area in the target image.
The brightness of the first brightness region is greater than the preset brightness. The first luminance section represents a light source area in the target image, or an area reflecting the light source. The first luminance region may be determined from the luminance of portions in the picture.
When the environment brightness is low when shooting and a plurality of light sources are provided, the scene is determined to be mixed light. Further, the colors emitted by the plurality of light sources may be different, which may affect the white balance effect of the image.
Step 120, identifying texture information of the first luminance region.
And analyzing the first brightness area to acquire texture information of the surface of the shooting object in the first brightness area. The texture information is used to indicate the contents of the subject corresponding to the first luminance region. For example, the texture information of a wooden desktop is a wooden texture. For example, the texture information of the outdoor green plants is a green plant texture or the like. And performing model training by inputting images of different photographed objects to obtain a machine learning model for recognizing image texture information.
And step 130, performing white balance correction on the first brightness area according to the texture information.
In one implementation, the real light source is screened out according to the texture information, and the white balance correction is performed on the first brightness region based on the light source color of the real light source. When shooting, the light sources with different colors have certain influence on the white balance of the picture, and at the moment, the image obtained by shooting cannot accurately reflect the image color in the shooting scene. Whether the first brightness region corresponds to a real light source can be determined according to the texture information. And if the first brightness region corresponds to the real light source, performing white balance correction on the first brightness region according to the color of the real light source.
In one implementation, when the user takes a picture from indoors to outdoors, the outdoor brightness is high, so that the window becomes the first brightness region. The corresponding texture of the window is green plants outdoors. Based on this, the green component of the image area corresponding to the window can be reduced.
In performing the white balance correction, it is possible to search for color information of a subject of known color from a target image and acquire original color information of the subject. For example, it is known that the color of a wall is white, and the color of a wall photographed is blue. And determining a correction color vector according to the original color information, the color information in the target image and the light source color. Color information of the subject in the target image is corrected based on the correction color vector. Optionally, all pixel points in the target image may be corrected based on the correction color vector. The correction may be performed only for a subject with color abnormality.
According to the image white balance processing method provided by the embodiment of the application, when the photographing scene is a mixed light scene, the first brightness region in the target image is searched. Then, texture information of the first luminance region is identified. And finally, performing white balance correction on the first brightness area according to the texture information. The brightness is low relative to the dark and the light source area is overexposed, resulting in poor image sharpness. According to the method and the device, the first brightness area can be searched in the mixed light scene, the texture information of the first brightness area is identified, and then the white balance is carried out on the target image based on the texture information. The virtual first brightness region caused by reflection can be identified through texture analysis, the first brightness region corresponding to the real light source region is further found, white balance correction is carried out according to the color of the first brightness region, and the image quality of the mixed light shooting environment is improved.
Fig. 2 is a schematic flow chart of an image white balance processing method provided in an embodiment of the present application, which is used to further explain the foregoing embodiment, and includes:
and step 210, obtaining the ambient light brightness.
And acquiring the ambient light brightness through a brightness sensor.
And step 220, if the ambient light brightness is smaller than the preset brightness, judging whether the photographed scene is a mixed light scene.
The preset brightness can be obtained by machine learning, and is a corresponding numerical value under a dark light environment, and the numerical value can be selected to be 100 nits. And when the light sources of a plurality of colors exist in the target graph, determining the photographed scene as a mixed light scene.
Step 230, when the photo scene is a mixed light scene, searching a first brightness region in the target image.
Step 240, identifying texture information of the first luminance region.
And step 250, performing white balance correction on the first brightness area according to the texture information.
The image white balance processing method provided by the embodiment of the application can determine whether to shoot in a dark light environment according to the environment brightness, further judge whether to be a mixed light scene if the image is shot in the dark light environment, and correct white balance based on the texture information of the first brightness area if the image is the mixed light scene, so that the accuracy of white balance correction is improved.
Fig. 3 is a schematic flow chart of an image white balance processing method provided in an embodiment of the present application, which is used to further describe the above embodiment, and includes:
and 310, when the photographing scene is a mixed light scene, dividing the target image to obtain a plurality of detection areas.
In the dividing, the target image may be divided according to the target image specification and the specification of each detection region. For example, the target pattern is divided into 8 by 8 detection regions.
Step 320, determining a first brightness region according to the brightness information of the plurality of detection regions.
The brightness value of each detection area is calculated respectively, and one or more detection areas with higher brightness values are determined as first brightness areas.
Step 330, identifying texture information of the first luminance region.
And 340, performing white balance correction on the first brightness area according to the texture information.
According to the image white balance processing method provided by the embodiment of the application, the target image can be divided into the detection areas with the same specification, the first brightness area is determined according to the brightness information in each detection area, and the brightness detection efficiency is improved.
Fig. 4 is a schematic flowchart of an image white balance processing method according to an embodiment of the present application, which is used to further describe the foregoing embodiment, and includes:
and step 410, when the photographing scene is a mixed light scene, starting from the original pixel point, generating a first detection area with a matched brightness value according to the brightness information of the pixel point.
The original pixel point may be a pixel point with coordinates (0,0) in the target image. And detecting the brightness of adjacent pixel points from the original pixel points according to an x axis, a y axis and diagonal directions in sequence. And if the difference value between the brightness of the adjacent pixel point and the brightness of the original pixel point is smaller than the difference threshold value, determining the adjacent pixel point and the original pixel point to be in the same detection area. In other words, a plurality of pixels with brightness differences smaller than the difference threshold are searched from the original pixel as a detection area.
Step 420, generating at least one second detection area based on the brightness values of the pixel points on the edge of the first detection area, wherein the brightness values of the first detection area and the second detection area are different.
And searching the next detection area by taking the pixel points outside the detection area and adjacent to the edge of the detection area as new original pixel points, so that the difference value of the brightness value in each detection area is smaller than the difference threshold value. And the brightness difference value of each adjacent detection area is greater than the difference threshold value.
Step 430, determining a first brightness region according to the brightness information of the plurality of detection regions.
Step 440, identifying texture information of the first luminance region.
And step 450, performing white balance correction on the first brightness area according to the texture information.
According to the image white balance processing method provided by the embodiment of the application, the detection area formed by the pixels in the same brightness value interval can be obtained according to the brightness values of the pixels, so that the first brightness area can be found more accurately, and the accuracy of brightness detection is improved.
Fig. 5 is a schematic flowchart of an image white balance processing method according to an embodiment of the present application, which is used to further describe the foregoing embodiment, and includes:
step 510, when the photographing scene is a mixed light scene, searching a first brightness region in the target image.
Step 520, identifying texture information of the first luminance region.
Step 530, determining whether the first luminance area is a light source area according to the texture information.
And acquiring specific texture information of the light source through a machine learning model. And sequentially inputting the texture information of the currently detected first brightness region into the machine learning model, and judging whether the first brightness region is a light source region. If the first luminance region is the light source region, step 560 is performed. If the first luminance region is not the light source region, step 540 is performed.
And step 540, if the first brightness area is not the light source area, finding the light source area in the target image.
If the current first luminance region is not the light source region, the next first luminance region is input to the machine learning model for determination.
And step 550, performing white balance correction on the first brightness area according to the light source color information of the light source area.
When the light source area is judged, light source color information of the light source area is acquired. White balance correction is performed based on the light source color information.
Step 560, if the first brightness region is a light source region, then the number of light source regions is obtained.
And 570, acquiring color information of each light source area when the number of the light source areas is larger than the preset number.
The preset number is more than or equal to two.
And 580, performing white balance correction on at least one target area in the target image according to the color information of each light source area.
And determining comprehensive environment light information according to the color information of each light source area, determining a white balance correction vector according to the comprehensive environment light information, and correcting according to the white balance correction vector.
The image white balance processing method provided by the embodiment of the application can be used for carrying out white balance correction on the first brightness area aiming at one or more light sources in the target image, and the usability is improved.
Fig. 6 is a schematic flowchart of an image white balance processing method according to an embodiment of the present application, which is used to further describe the foregoing embodiment, and includes:
step 610, when the photo scene is a mixed light scene, searching a first brightness area in the target image.
And step 620, identifying texture information of the first brightness area.
Step 630, determining whether the first luminance region is a light source region according to the texture information.
If the first luminance region is not the light source region, step 640 is performed. If the first luminance region is the light source region, step 660 is performed.
And step 640, if the first brightness area is not the light source area, searching the light source area in the target image.
And 650, performing white balance correction on the first brightness area according to the light source color information of the light source area.
Step 660, if the first brightness region is a light source region, acquiring the number of light source regions.
And step 670, acquiring color information of each light source area when the number of the light source areas is larger than the preset number.
Step 680, determining a target area corresponding to the first light source area according to the brightness information of the first light source area, where the first light source area is any one of the light source areas.
The white balance correction may be directed to a region in the target image corresponding to the first light source region, that is, a region in which the color temperature changes after illumination by the first light source region. And determining a target area corresponding to the brightness information according to the brightness information of the first light source area. Further, the irradiation range of the first light source region may be analyzed, and the target region may be determined according to the irradiation range.
And 690, performing white balance correction on the target area according to the color information of the first light source area.
The image white balance processing method provided by the embodiment of the application can perform white balance processing on a shot main body in a light source irradiation range aiming at different light sources, and improves the accuracy of the white balance processing.
Fig. 7 is a schematic structural diagram of an image white balance processing apparatus according to an embodiment of the present application. As shown in fig. 7, the apparatus includes: a lookup module 710, an identification module 720, and a white balance module 730.
The searching module 710 is configured to search a first brightness region in the target image when the photographing scene is a mixed light scene, where brightness of the first brightness region is greater than preset brightness;
an identifying module 720, configured to identify texture information of the first luminance region found by the searching module 710;
a white balance module 730, configured to perform white balance correction on the first luminance region according to the texture information identified by the identification module 720.
Further, the lookup module 710 is configured to:
obtaining the brightness of the environment;
if the ambient light brightness is smaller than the preset brightness, judging whether the shooting scene is a mixed light scene;
when the photographing scene is a mixed light scene, a first brightness area in the target image is searched.
Further, the lookup module 710 is configured to:
when the photographing scene is a mixed light scene, dividing the target image to obtain a plurality of detection areas;
and determining a first brightness region according to the brightness information of the plurality of detection regions.
Further, the searching module 710 divides the target image to obtain a plurality of detection areas, including:
starting from an original pixel point, generating a first detection area with a matched brightness value according to the brightness information of the pixel point;
generating at least one second detection area based on brightness values of pixel points on an edge of the first detection area, the first detection area being different from the second detection area in brightness value.
Further, the white balance module 730 is configured to:
judging whether the first brightness area is a light source area or not according to the texture information;
if the first brightness area is not the light source area, searching the light source area in the target image;
and performing white balance correction on the first brightness region according to the light source color information of the light source region.
Further, the white balance module 730, after determining whether the first luminance region is the light source region according to the texture information, further includes:
if the first brightness area is a light source area, acquiring the number of the light source areas;
when the number of the light source areas is larger than the preset number, acquiring color information of each light source area;
and performing white balance correction on at least one target area in the target image according to the color information of each light source area.
Further, the white balance module 730 performs white balance correction on at least one target area in the target image according to the color information of each light source area, including:
determining a target area corresponding to a first light source area according to brightness information of the first light source area, wherein the first light source area is any one of the light source areas;
and performing white balance correction on the target area according to the color information of the first light source area.
In the image white balance processing apparatus provided in the embodiment of the application, when the photo scene is a mixed light scene, the search module 710 searches for a first brightness region in the target image. Then, the identifying module 720 identifies texture information of the first luminance region. Finally, the white balance module 730 performs white balance correction on the first luminance region according to the texture information. The brightness is low relative to the dark and the light source area is overexposed, resulting in poor image sharpness. According to the method and the device, the first brightness area can be searched in the mixed light scene, the texture information of the first brightness area is identified, and then the white balance is carried out on the target image based on the texture information. The virtual first brightness region caused by reflection can be identified through texture analysis, the first brightness region corresponding to the real light source region is further found, white balance correction is carried out according to the color of the first brightness region, and the image quality of the mixed light shooting environment is improved.
The device can execute the methods provided by all the embodiments of the application, and has corresponding functional modules and beneficial effects for executing the methods. For details of the technology not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present application.
Fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 8, the terminal may include: a housing (not shown), a memory 801, a Central Processing Unit (CPU) 802 (also called a processor, hereinafter referred to as CPU), a computer program stored in the memory 801 and operable on the processor 802, a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU802 and the memory 801 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the terminal; the memory 801 is used for storing executable program codes; the CPU802 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 801.
The terminal further comprises: peripheral interface 803, RF (Radio Frequency) circuitry 805, audio circuitry 806, speakers 811, power management chip 808, input/output (I/O) subsystem 809, touch screen 812, other input/control devices 810, and external port 804, which communicate over one or more communication buses or signal lines 807.
It should be understood that the illustrated terminal device 800 is merely one example of a terminal, and that the terminal device 800 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal device provided in this embodiment, where the terminal device is a smart phone as an example.
A memory 801, the memory 801 being accessible by the CPU802, the peripheral interface 803, and the like, the memory 801 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 803, said peripheral interface 803 allowing input and output peripherals of the device to be connected to the CPU802 and the memory 801.
I/O subsystem 809, which I/O subsystem 809 may connect input and output peripherals on the device, such as touch screen 812 and other input/control devices 810, to peripheral interface 803. The I/O subsystem 809 may include a display controller 8091 and one or more input controllers 8092 for controlling other input/control devices 810. Where one or more input controllers 8092 receive electrical signals from or transmit electrical signals to other input/control devices 810, other input/control devices 810 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 8092 may be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
The touch screen 812 may be a resistive type, a capacitive type, an infrared type, or a surface acoustic wave type, according to the operating principle of the touch screen and the classification of media for transmitting information. The touch screen 812 may be classified by installation method: external hanging, internal or integral. Classified according to technical principles, the touch screen 812 may be: a vector pressure sensing technology touch screen, a resistive technology touch screen, a capacitive technology touch screen, an infrared technology touch screen, or a surface acoustic wave technology touch screen.
A touch screen 812, which touch screen 812 is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like. Optionally, the touch screen 812 sends an electrical signal (e.g., an electrical signal of the touch surface) triggered by the user on the touch screen to the processor 802.
The display controller 8091 in the I/O subsystem 809 receives electrical signals from the touch screen 812 or sends electrical signals to the touch screen 812. The touch screen 812 detects a contact on the touch screen, and the display controller 8091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 812, that is, implements a human-computer interaction, and the user interface object displayed on the touch screen 812 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 805 is mainly used to establish communication between the smart speaker and a wireless network (i.e., a network side), and implement data reception and transmission between the smart speaker and the wireless network. Such as sending and receiving short messages, e-mails, etc.
The audio circuit 806 is mainly used to receive audio data from the peripheral interface 803, convert the audio data into an electric signal, and transmit the electric signal to the speaker 811.
Speaker 811 is used to convert the voice signals received by the smart speaker from the wireless network through RF circuit 805 into sound and play the sound to the user.
And the power management chip 808 is used for supplying power and managing power to the hardware connected with the CPU802, the I/O subsystem and the peripheral interface.
In this embodiment, the cpu802 is configured to:
when the photographing scene is a mixed light scene, searching a first brightness region in the target image, wherein the brightness of the first brightness region is greater than the preset brightness;
identifying texture information of the first luminance region;
and performing white balance correction on the first brightness region according to the texture information.
Further, when the photo scene is a mixed light scene, searching for a first brightness region in the target image includes:
obtaining the brightness of the environment;
if the ambient light brightness is smaller than the preset brightness, judging whether the shooting scene is a mixed light scene;
when the photographing scene is a mixed light scene, a first brightness area in the target image is searched.
Further, when the photo scene is a mixed light scene, searching for a first brightness region in the target image, including:
when the photographing scene is a mixed light scene, dividing the target image to obtain a plurality of detection areas;
and determining a first brightness region according to the brightness information of the plurality of detection regions.
Further, dividing the target image to obtain a plurality of detection areas includes:
starting from an original pixel point, generating a first detection area with a matched brightness value according to the brightness information of the pixel point;
generating at least one second detection area based on brightness values of pixel points on an edge of the first detection area, the first detection area being different from the second detection area in brightness value.
Further, the performing white balance correction on the first luminance region according to the texture information includes:
judging whether the first brightness area is a light source area or not according to the texture information;
if the first brightness area is not the light source area, searching the light source area in the target image;
and performing white balance correction on the first brightness region according to the light source color information of the light source region.
Further, after determining whether the first luminance region is a light source region according to the texture information, the method further includes:
if the first brightness area is a light source area, acquiring the number of the light source areas;
when the number of the light source areas is larger than the preset number, acquiring color information of each light source area;
and performing white balance correction on at least one target area in the target image according to the color information of each light source area.
Further, the performing white balance correction on at least one target area in the target image according to the color information of each light source area includes:
determining a target area corresponding to a first light source area according to brightness information of the first light source area, wherein the first light source area is any one of the light source areas;
and performing white balance correction on the target area according to the color information of the first light source area.
Embodiments of the present application further provide a storage medium containing terminal device executable instructions, which when executed by a terminal device processor, are configured to perform a method for white balance processing of an image, the method including:
when the photographing scene is a mixed light scene, searching a first brightness region in the target image, wherein the brightness of the first brightness region is greater than the preset brightness;
identifying texture information of the first luminance region;
and performing white balance correction on the first brightness region according to the texture information.
Further, when the photo scene is a mixed light scene, searching for a first brightness region in the target image includes:
obtaining the brightness of the environment;
if the ambient light brightness is smaller than the preset brightness, judging whether the shooting scene is a mixed light scene;
when the photographing scene is a mixed light scene, a first brightness area in the target image is searched.
Further, when the photo scene is a mixed light scene, searching for a first brightness region in the target image, including:
when the photographing scene is a mixed light scene, dividing the target image to obtain a plurality of detection areas;
and determining a first brightness region according to the brightness information of the plurality of detection regions.
Further, dividing the target image to obtain a plurality of detection areas includes:
starting from an original pixel point, generating a first detection area with a matched brightness value according to the brightness information of the pixel point;
generating at least one second detection area based on brightness values of pixel points on an edge of the first detection area, the first detection area being different from the second detection area in brightness value.
Further, the performing white balance correction on the first luminance region according to the texture information includes:
judging whether the first brightness area is a light source area or not according to the texture information;
if the first brightness area is not the light source area, searching the light source area in the target image;
and performing white balance correction on the first brightness region according to the light source color information of the light source region.
Further, after determining whether the first luminance region is a light source region according to the texture information, the method further includes:
if the first brightness area is a light source area, acquiring the number of the light source areas;
when the number of the light source areas is larger than the preset number, acquiring color information of each light source area;
and performing white balance correction on at least one target area in the target image according to the color information of each light source area.
Further, the performing white balance correction on at least one target area in the target image according to the color information of each light source area includes:
determining a target area corresponding to a first light source area according to brightness information of the first light source area, wherein the first light source area is any one of the light source areas;
and performing white balance correction on the target area according to the color information of the first light source area.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the image white balance processing operation described above, and may also perform related operations in the image white balance processing method provided in any embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. An image white balance processing method, comprising:
when the shooting scene is a mixed light scene, searching a first brightness area in the target image, wherein the brightness of the first brightness area is greater than the preset brightness, and the mixed light scene is as follows: when a user shoots in a scene with a strong light source, the obtained image comprises the scene of the strong light source and a non-luminous shot subject;
identifying texture information of the first luminance region;
performing white balance correction on the first brightness region according to the texture information;
the white balance correction of the first luminance region according to the texture information includes:
judging whether the first brightness area is a light source area or not according to the texture information;
if the first brightness area is not the light source area, searching the light source area in the target image;
and performing white balance correction on the first brightness region according to the light source color information of the light source region.
2. The image white balance processing method according to claim 1, wherein the searching for the first luminance region in the target image when the photographed scene is a mixed-light scene includes:
obtaining the brightness of the environment;
if the ambient light brightness is smaller than the preset brightness, judging whether the shooting scene is a mixed light scene;
when the photographing scene is a mixed light scene, a first brightness area in the target image is searched.
3. The image white balance processing method according to claim 1, wherein when the photographed scene is a mixed-light scene, finding the first luminance region in the target image comprises:
when the photographing scene is a mixed light scene, dividing the target image to obtain a plurality of detection areas;
and determining a first brightness region according to the brightness information of the plurality of detection regions.
4. The image white balance processing method according to claim 3, wherein dividing the target image into a plurality of detection regions includes:
starting from an original pixel point, generating a first detection area with a matched brightness value according to the brightness information of the pixel point;
generating at least one second detection area based on brightness values of pixel points on an edge of the first detection area, the first detection area being different from the second detection area in brightness value.
5. The image white balance processing method according to claim 1, further comprising, after determining whether the first luminance region is a light source region or not based on the texture information:
if the first brightness area is a light source area, acquiring the number of the light source areas;
when the number of the light source areas is larger than the preset number, acquiring color information of each light source area;
and performing white balance correction on at least one target area in the target image according to the color information of each light source area.
6. The image white balance processing method according to claim 5, wherein the white balance correcting at least one target region in the target image according to the color information of each light source region includes:
determining a target area corresponding to a first light source area according to brightness information of the first light source area, wherein the first light source area is any one of the light source areas;
and performing white balance correction on the target area according to the color information of the first light source area.
7. An image white balance processing apparatus, comprising:
the searching module is used for searching a first brightness area in the target image when the photographing scene is a mixed light scene, wherein the brightness of the first brightness area is greater than the preset brightness, and the mixed light scene is as follows: when a user shoots in a scene with a strong light source, the obtained image comprises the scene of the strong light source and a non-luminous shot subject;
the identification module is used for identifying the texture information of the first brightness area searched by the searching module;
a white balance module, configured to perform white balance correction on the first luminance region according to the texture information identified by the identification module;
the white balance module is used for: judging whether the first brightness area is a light source area or not according to the texture information;
if the first brightness area is not the light source area, searching the light source area in the target image;
and performing white balance correction on the first brightness region according to the light source color information of the light source region.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the image white balance processing method according to any one of claims 1 to 6.
9. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the image white balance processing method according to any one of claims 1 to 6 when executing the computer program.
CN201810935319.1A 2018-08-16 2018-08-16 Image white balance processing method and device, storage medium and terminal Active CN108881875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810935319.1A CN108881875B (en) 2018-08-16 2018-08-16 Image white balance processing method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810935319.1A CN108881875B (en) 2018-08-16 2018-08-16 Image white balance processing method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108881875A CN108881875A (en) 2018-11-23
CN108881875B true CN108881875B (en) 2020-01-14

Family

ID=64318189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810935319.1A Active CN108881875B (en) 2018-08-16 2018-08-16 Image white balance processing method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108881875B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062860B (en) * 2019-11-12 2022-12-02 北京旷视科技有限公司 Image color adjusting method and device based on scene and computer equipment
CN110831276B (en) * 2019-11-14 2021-08-24 上海闻泰信息技术有限公司 LED-based lamplight brightness control method and related device
CN111405260B (en) * 2020-03-25 2022-01-18 福州英迪格成像技术有限公司 Self-adaptive white balance control method and system thereof
CN112448962B (en) * 2021-01-29 2021-04-27 深圳乐播科技有限公司 Video anti-aliasing display method and device, computer equipment and readable storage medium
CN113411555B (en) * 2021-06-08 2022-07-22 珠海市杰理科技股份有限公司 White balance processing method and device, storage medium and image capturing equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007097125A1 (en) * 2006-02-27 2007-08-30 Nikon Corporation Image processing device for correcting image massive feeling, image processing program, image processing method, and electronic camera
US8503771B2 (en) * 2010-12-20 2013-08-06 Samsung Techwin Co., Ltd. Method and apparatus for estimating light source
JP6063093B2 (en) * 2014-03-31 2017-01-18 富士フイルム株式会社 Image processing apparatus, imaging apparatus, image processing method, and program
CN105611265B (en) * 2016-02-16 2017-08-04 上海斐讯数据通信技术有限公司 A kind of white balance adjustment device and method
CN108174172B (en) * 2017-12-25 2019-09-06 Oppo广东移动通信有限公司 Image pickup method and device, computer readable storage medium and computer equipment

Also Published As

Publication number Publication date
CN108881875A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108881875B (en) Image white balance processing method and device, storage medium and terminal
KR102597680B1 (en) Electronic device for providing customized quality image and method for controlling thereof
US10761642B2 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
US10510136B2 (en) Image blurring method, electronic device and computer device
CN107450817B (en) Proximity detection method, proximity detection device, storage medium, and electronic apparatus
CN108668086B (en) Automatic focusing method and device, storage medium and terminal
CN109040524B (en) Artifact eliminating method and device, storage medium and terminal
CN109327691B (en) Image shooting method and device, storage medium and mobile terminal
CN112672069B (en) Exposure method and apparatus
CN109068116B (en) Image processing method and device based on supplementary lighting, mobile terminal and storage medium
CN109495616B (en) Photographing method and terminal equipment
CN110462617B (en) Electronic device and method for authenticating biometric data with multiple cameras
US20160335940A1 (en) Method for processing display data and electronic device for supporting the same
WO2018184260A1 (en) Correcting method and device for document image
WO2022222510A1 (en) Interaction control method, terminal device, and storage medium
CN112116690A (en) Video special effect generation method and device and terminal
CN108665510B (en) Rendering method and device of continuous shooting image, storage medium and terminal
CN109040729B (en) Image white balance correction method and device, storage medium and terminal
CN109120864B (en) Light supplement processing method and device, storage medium and mobile terminal
CN111459466B (en) Code generation method, device, equipment and storage medium
CN106954022B (en) Image processing method, device and terminal
US10440283B2 (en) Electronic device and method for controlling the same
CN109242782B (en) Noise processing method and device
CN109218620B (en) Photographing method and device based on ambient brightness, storage medium and mobile terminal
CN109427101A (en) A kind of method and system obtaining augmented reality image

Legal Events

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