CN108965845B - Image white balance calibration method, apparatus, storage medium and terminal - Google Patents

Image white balance calibration method, apparatus, storage medium and terminal Download PDF

Info

Publication number
CN108965845B
CN108965845B CN201810936336.7A CN201810936336A CN108965845B CN 108965845 B CN108965845 B CN 108965845B CN 201810936336 A CN201810936336 A CN 201810936336A CN 108965845 B CN108965845 B CN 108965845B
Authority
CN
China
Prior art keywords
white balance
flasher
light source
image
preview frame
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
CN201810936336.7A
Other languages
Chinese (zh)
Other versions
CN108965845A (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 CN201810936336.7A priority Critical patent/CN108965845B/en
Publication of CN108965845A publication Critical patent/CN108965845A/en
Application granted granted Critical
Publication of CN108965845B publication Critical patent/CN108965845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Abstract

The embodiment of the present application discloses a kind of image white balance calibration method, apparatus, storage medium and terminal, this method comprises: obtaining preview frame image first, judges whether there is flasher according to the preview frame image;Then, if there is flasher, then the light source direction of the flasher is obtained;Finally, carrying out white balance processing according to the light source direction, the white balance treatment effect under flasher can be improved, more accurately reflect the main body colour temperature that is taken.

Description

Image white balance calibration method, apparatus, storage medium and terminal
Technical field
The invention relates to technical field of mobile terminals more particularly to image white balance calibration method, apparatus, storage Medium and terminal.
Background technique
With the continuous development of mobile terminal, almost every mobile terminal is configured with camera function, is based on camera function It can take pictures.Mobile terminal is intended to the process of taking pictures of automation, can be exposed automatically according to photo environment and white Balance Treatment.
But discovery in use, if the light source for flashing of guaranteeing replacement in shooting picture, the photo white balance shot Effect is poor, can not accurately reflect the main body colour temperature that is taken.
Summary of the invention
The purpose of the embodiment of the present application is to provide a kind of image white balance calibration method, apparatus, storage medium and terminal, can To improve the white balance treatment effect under flasher.
In a first aspect, the embodiment of the present application provides a kind of image white balance calibration method, comprising:
Preview frame image is obtained, flasher is judged whether there is according to the preview frame image;
If there is flasher, then the light source direction of the flasher is obtained;
White balance processing is carried out according to the light source direction.
Second aspect, the embodiment of the present application provide a kind of image white balance calibration device, comprising:
Judgment module judges whether there is flasher according to the preview frame image for obtaining preview frame image;
It obtains module and obtains the flasher if determined for the judgment module there are flasher Light source direction;
White balance module, the light source direction for being obtained according to the acquisition module carry out white balance processing.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the image white balance calibration method as shown in first aspect when the program is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of terminal, including memory, and processor and storage are on a memory And the computer program that can be run in processor, the processor are realized as shown in first aspect when executing the computer program Image white balance calibration method.
The image white balance calibration scheme provided in the embodiment of the present application, first acquisition preview frame image, according to described pre- Frame image of looking at judges whether there is flasher;Then, if there is flasher, then the light source side of the flasher is obtained To;Finally, carrying out white balance processing according to the light source direction, the white balance treatment effect under flasher can be improved, more Add and accurately reflects the main body colour temperature that is taken.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another image white balance calibration method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another image white balance calibration method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of another image white balance calibration method provided by the embodiments of the present application;
Fig. 5 is the flow diagram of another image white balance calibration method provided by the embodiments of the present application;
Fig. 6 is the flow diagram of another image white balance calibration method provided by the embodiments of the present application;
Fig. 7 is a kind of structural schematic diagram of image white balance calibration device provided by the embodiments of the present application;
Fig. 8 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application.
Specific embodiment
Further illustrate the technical solution of the application below with reference to the accompanying drawings and specific embodiments.It is understood that It is that specific embodiment described herein is used only for explaining the application, rather than the restriction to the application.It further needs exist for illustrating , part relevant to the application is illustrated only for ease of description, in attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
With the continuous development of mobile terminal, almost every mobile terminal is configured with camera function, is based on camera function It can take pictures.Mobile terminal is intended to the process of taking pictures of automation, can be exposed automatically according to photo environment and white Balance Treatment.But discovery in use, if the light source for flashing of guaranteeing replacement in shooting picture, the photo white balance shot Effect is poor, can not accurately reflect the main body colour temperature that is taken.Cause when light source flashes in photographed scene, light source igniting The photo colour temperature shot when closing with light source is different, causes the colour temperature shot under same scene unstable, can not reflect The true colors for the main body that is taken.
The embodiment of the present application provides a kind of image white balance calibration method, can identify the scintillation light in photographed scene Source obtains light source direction when detecting flasher, and determines that the region influenced by light source irradiation carries out according to light source direction White balance processing, and then colour temperature jumps caused by avoiding the problem that because of light source scintillation, improves the white balance effect of shooting image.Specifically Scheme is as follows:
Fig. 1 is the flow diagram of image white balance calibration method provided by the embodiments of the present application, and this method is for flashing The case where light source is taken pictures, this method can be executed by mobile terminal, the mobile terminal can for smart phone, tablet computer, Wearable device, laptop etc., this method specifically comprises the following steps:
Step 110 obtains preview frame image, judges whether there is flasher according to preview frame image.
When user starts camera applications, preview frame figure that camera applications real-time display camera in preview interface is got Picture.When preview frame image meets user demand in preview interface, user clicks button of taking pictures and takes pictures.
For the mobile terminal of a camera is only arranged in the back side, preview frame is obtained by first camera at the back side Image determines whether there is flasher according to preview frame image.
For the mobile terminal with dual camera, the mobile terminal back side is provided with dual camera, and front is provided with Screen obtains preview frame image by first camera at the back side at this time, while obtaining photographed scene using second camera Picture can determine whether there is flasher according to reference picture as reference picture.Wherein, the dual camera of back side setting It can be a wide-angle lens and a telephoto lens.The camera lens for taking pictures is determined whether according to the focal length that user selects, so The viewfinder range of another camera lens can be adjusted to consistent with the viewfinder range for the camera lens for being previously used for taking pictures afterwards.
Further, second camera continuously acquires multiple reference pictures, determines each reference picture by image analysis In light source information.If there is in two neighboring reference picture, there is light source in one of reference picture, another reference Do not have light source in image, then there are flashers in desirable scene of taking pictures surely.
Step 120, if there is flasher, then obtain the light source direction of flasher.
The irradiation of light source has directionality, and the influence for color temp essentially consists in the light that flasher irradiates Line, therefore after getting the light source direction of flasher, it can more accurately carry out white balance correction.
The light source direction of flasher can be determined by comparing two neighboring reference picture or preview frame image Brightness change region in image can determine light source direction according to the region.
Step 130 carries out white balance processing according to light source direction.
Known luminaire direction can accurately find the gray area in image, carry out white balance tune according to gray area It is whole.After obtaining light source direction, white balance is carried out in light source near zone or whole image.It optionally, can be to preview frame Image carries out white balance processing and is shown in screen, can also be when user inputs photographing instruction, to the image taken pictures Carry out white balance processing.
Image white balance calibration method provided by the embodiments of the present application, first acquisition preview frame image, according to preview frame figure As judging whether there is flasher.Then, if there is flasher, then the light source direction of flasher is obtained.Finally, root White balance processing is carried out according to light source direction, can be improved the white balance treatment effect under flasher, more accurately reflects quilt Shoot main body colour temperature.By the flasher in identification photographed scene, when detecting flasher, light source direction is obtained, and The region progress white balance processing influenced by light source irradiation, and then colour temperature caused by avoiding because of light source scintillation are determined according to light source direction The problem of jump, improves the white balance effect of shooting image.
Fig. 2 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application, as to above-mentioned The further explanation of embodiment, comprising:
Step 210 obtains preview frame image, in same scene, obtains multiple continuous preview frame images.
First camera shows preview frame image after getting preview frame image in mobile terminal screen, meanwhile, and Preview frame image is stored to caching.By reading the preview frame image in caching, it can analyze out and belong in same scene Multiple continuous preview frame images.Can by pixel ratio to or mobile terminal location information and rotation angle determination it is more Whether a continuous preview frame image belongs to same scene.
Step 220 determines whether there is flasher according to the brightness value of continuous preview frame image.
The brightness value for obtaining each preview frame image respectively, if there is the brightness value difference of two adjacent preview frame images Value is more than or equal to (or being greater than) predetermined luminance threshold value, it is determined that there are flashers.If there is two adjacent preview frame figures The brightness value difference of picture is less than (or being less than or equal to) predetermined luminance threshold value, it is determined that there are flashers.
Further, it is more than or equal to (or being greater than) if there is the brightness value difference of two adjacent preview frame images of multiple groups The case where predetermined luminance threshold value, then illustrates that the light source in current scene persistently flashes.
Step 230, if there is flasher, then obtain the light source direction of flasher.
Step 240 carries out white balance processing according to light source direction.
Image white balance calibration method provided by the embodiments of the present application can be determined according to the brightness of adjacent preview frame image With the presence or absence of flasher, the accuracy of flasher judgement is improved.
Fig. 3 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application, as to above-mentioned The further explanation of embodiment, comprising:
Step 310 obtains preview frame image, judges whether there is flasher according to preview frame image.
Step 320, if there is flasher, then obtain the reflected light information in preview frame image.
Preview frame image is divided, multiple detection zones are obtained.Two detection zones are selected from multiple detection zones Domain can determine reflective information according to detection zone if the light source direction in two detection zones meets reflection law.Reflection Information may include the corresponding relationship of at least two detection zones there are reflective relation.
For example, when incandescent lamp is lighted, the objects such as desktop can be issued reflective when there is the incandescent lamp of flashing in scene.When When incandescent lamp extinguishes, the objects such as desktop do not shine.Therefore it can determine that occurring pixel or brightness in pairs becomes according to pixel changing value The detection zone of change.Light source and its irradiation area can be determined based on the detection zone of brilliant synchrotron variation.
Step 330, the light source direction that flasher is determined according to reflected light information.
It, can basis since the relationship between reflected light and light source is fixed after step 320 determines reflected light information At least two detection zones with reflective relation determine light source direction.
Step 340 carries out white balance processing according to light source direction.
Image white balance calibration method provided by the embodiments of the present application, can be based on each detection zone in preview frame image It determines that reflected light information, reflected light information occur in pairs with light source, therefore light source direction can be determined according to reflected light region.
Fig. 4 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application, as to above-mentioned The further explanation of embodiment, comprising:
Step 410 obtains preview frame image, judges whether there is flasher according to preview frame image.
Step 420, if there is flasher, then identify flasher in preview frame image.
Step 430, the position according to flasher in preview frame image, determine the light source direction of flasher.
Light source is searched in preview frame image according to picture material, and then determines the light source direction of flasher.
Step 440 carries out white balance processing according to light source direction.
Image white balance calibration method provided by the embodiments of the present application, can be determined based on preview frame image flasher and Its light source direction improves light source recognition efficiency.
Fig. 5 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application, as to above-mentioned The further explanation of embodiment, comprising:
Step 510 obtains preview frame image, judges whether there is flasher according to preview frame image.
Step 520, if there is flasher, then obtain the light source direction of flasher.
Step 530, the light source colour for obtaining flasher.
Light source colour is obtained in preview frame image, light source colour can be corresponding for light source region in preview frame image Color.
Step 540 determines the first updating vector according to light source colour.
Incandescent lamp is easy to produce the misalignment of warm colour, therefore the first updating vector is cool colour updating vector.Photographing outdoors When, the misalignment of cool colour is easy to produce after sky mapping, therefore the first updating vector is warm colour updating vector.It is further logical It crosses machine learning and determines that different light source colours are corresponding to updating vector.After light source colour is substituted into machine learning model, determine Corresponding first updating vector of light source colour.
Step 550 carries out white balance processing according to the first updating vector.
It can more accurately judge that present image belongs to partially blue, partially red, partially green, feelings such as Huang partially in conjunction with the color of light source Then condition adjusts the white balances processing modes such as white balance strategy, such as amendment (Rgain, Bgain).
Image white balance calibration method provided by the embodiments of the present application can determine updating vector according to light source colour, into And the main body primary colors that is taken more accurately is restored, improve photo color reduction degree.
Fig. 6 is a kind of flow diagram of image white balance calibration method provided by the embodiments of the present application, as to above-mentioned The further explanation of embodiment, comprising:
Step 610 obtains preview frame image, judges whether there is flasher according to preview frame image.
Step 620, if there is flasher, then obtain the light source direction of flasher.
Step 630 determines the target area that light source is irradiated to according to light source direction.
For flasher, its range of exposures is limited, its influence to color temp is mainly reflected in it and can irradiate for the time being To region in.The corresponding reflecting region of flasher can be determined as target area.It can also be by preview frame image Image analysis is carried out, determines multiple target areas that flasher can be irradiated to.
Step 640 carries out white balance processing to target area.
Optionally, when carrying out white balance correction, the colouring information of the available main body that is taken, according to preview frame image In the reference color information of the main body that is taken determine the second updating vector.It is clapped specifically, obtaining target area correspondence first Take the photograph the primitive color information of main body.Then, the reference color information for the main body that is taken in target area is obtained.Again, according to ginseng It examines colouring information and primitive color information determines the second updating vector.Finally, carrying out white balance processing according to the second updating vector.
Image white balance calibration method provided by the embodiments of the present application, can be enterprising in the corresponding target area of flasher The processing of row white balance, and then flasher is more accurately eliminated on the influence of the colour temperature for the main body that is taken, improve white balance correction It is accurate fixed.
Fig. 7 is a kind of structural schematic diagram of image white balance calibration device provided by the embodiments of the present application.As shown in fig. 7, The device includes: judgment module 710, obtains module 720 and white balance module 730.
Judgment module 710 judges whether there is scintillation light according to the preview frame image for obtaining preview frame image Source;
It obtains module 720 and obtains the flashing if determined for the judgment module 710 there are flasher The light source direction of light source;
White balance module 730, the light source direction for being obtained according to the acquisition module 720 carry out at white balance Reason.
Further, judgment module 710 is used for:
In same scene, multiple continuous preview frame images are obtained;
Flasher is determined whether there is according to the brightness value of the continuous preview frame image.
Further, module 720 is obtained to be used for:
Obtain the reflected light information in the preview frame image;
The light source direction of the flasher is determined according to the reflected light information.
Further, module 720 is obtained to be used for:
Flasher is identified in preview frame image;
According to position of the flasher in the preview frame image, the light source direction of flasher is determined.
Further, white balance module 730 is used for:
Obtain the light source colour of the flasher;
The first updating vector is determined according to the light source colour;
White balance processing is carried out according to first updating vector.
Further, white balance module 730 is used for:
The target area that the light source is irradiated to is determined according to the light source direction;
White balance processing is carried out to the target area.
Further, white balance module 730 carries out white balance processing to the target area, comprising:
Obtain the primitive color information of the corresponding main body that is taken in the target area;
Obtain the reference color information for the main body that is taken described in the target area;
The second updating vector is determined according to the reference color information and the primitive color information;
White balance processing is carried out according to second updating vector.
Image white balance calibration device provided by the embodiments of the present application first determines whether that module 710 obtains preview frame image, root Flasher is judged whether there is according to the preview frame image;Then, if there is flasher, then the acquisition of module 720 is obtained The light source direction of the flasher;Finally, white balance module 730 carries out white balance processing according to the light source direction, it can The white balance treatment effect under flasher is improved, more accurately reflects the main body colour temperature that is taken.By identifying photographed scene In flasher obtain light source direction when detecting flasher, and determined according to light source direction and influenced by light source irradiation Region carry out white balance processing, and then colour temperature jumps caused by avoiding the problem that because of light source scintillation, improves the white flat of shooting image Weigh effect.
Method provided by the aforementioned all embodiments of the application can be performed in above-mentioned apparatus, and it is corresponding to have the execution above method Functional module and beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to the aforementioned all implementations of the application Method provided by example.
Fig. 8 is a kind of structural schematic diagram of terminal device provided by the embodiments of the present application.As shown in figure 8, the terminal can be with Include: shell (not shown), memory 801, central processing unit (Central Processing Unit, CPU) 802 (again Claim processor, hereinafter referred to as CPU), the computer program, the circuit that are stored on memory 801 and can be run on processor 802 Plate (not shown) and power circuit (not shown).The circuit board is placed in the space interior that the shell surrounds; The CPU802 and the memory 801 are arranged on the circuit board;The power circuit, for for each of the terminal Circuit or device power supply;The memory 801, for storing executable program code;The CPU802 described in reading by depositing The executable program code stored in reservoir 801 runs program corresponding with the executable program code.
The terminal further include: Peripheral Interface 803, RF (Radio Frequency, radio frequency) circuit 805, voicefrequency circuit 806, loudspeaker 811, power management chip 808, input/output (I/O) subsystem 809, touch screen 812, other input/controls Equipment 810 and outside port 804, these components are communicated by one or more communication bus or signal wire 807.
It should be understood that graphic terminal 800 is only an example of terminal, and terminal device 800 can be with With than shown in the drawings more or less component, two or more components can be combined, or can have Different component configurations.Various parts shown in the drawings can include one or more signal processings and/or dedicated integrated It is realized in the combination of hardware, software or hardware and software including circuit.
Just provided in this embodiment below to be described in detail for a kind of terminal device, the terminal device is with intelligent hand For machine.
Memory 801, the memory 801 can be accessed by CPU802, Peripheral Interface 803 etc., and the memory 801 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU802 and deposited by Peripheral Interface 803, the Peripheral Interface 803 Reservoir 801.
I/O subsystem 809, the I/O subsystem 809 can be by the input/output peripherals in equipment, such as touch screen 812 With other input/control devicess 810, it is connected to Peripheral Interface 803.I/O subsystem 809 may include 8091 He of display controller For controlling one or more input controllers 8092 of other input/control devicess 810.Wherein, one or more input controls Device 8092 processed receives electric signal from other input/control devicess 810 or sends electric signal to other input/control devicess 810, Other input/control devicess 810 may include physical button (push button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.It is worth noting that input controller 8092 can with it is following any one connect: keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Wherein, according to the working principle of touch screen and transmission information medium classification, touch screen 812 can for resistance-type, Capacitor induction type, infrared-type or surface acoustic wave type.Classify according to mounting means, touch screen 812 can be with are as follows: external hanging type, built-in Formula or monoblock type.Classify according to technical principle, touch screen 812 can be with are as follows: vector pressure sensing technology touch screen, resistive technologies touching Touch screen, capacitance technology touch screen, infrared technology touch screen or surface acoustic wave technique touch screen.
Touch screen 812, the touch screen 812 are the input interface and output interface between user terminal and user, can It is shown to user depending on output, visual output may include figure, text, icon, video etc..Optionally, touch screen 812 is by user The electric signal (electric signal of such as contact surface) triggered on touch screen curtain, is sent to processor 802.
Display controller 8091 in I/O subsystem 809 receives electric signal from touch screen 812 or sends out to touch screen 812 Electric signals.Touch screen 812 detects the contact on touch screen, and the contact that display controller 8091 will test is converted to and is shown The interaction of user interface object on touch screen 812, i.e. realization human-computer interaction, the user interface being shown on touch screen 812 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 805 is mainly used for establishing the communication of intelligent sound box Yu wireless network (i.e. network side), realizes intelligent sound box Data receiver and transmission with wireless network.Such as transmitting-receiving short message, Email etc..
Voicefrequency circuit 806 is mainly used for receiving audio data from Peripheral Interface 803, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 811.
Loudspeaker 811 is reduced to for intelligent sound box to be passed through RF circuit 805 from the received voice signal of wireless network Sound simultaneously plays the sound to user.
Power management chip 808, the hardware for being connected by CPU802, I/O subsystem and Peripheral Interface are powered And power management.
In the present embodiment, central processing unit 802 is used for:
Preview frame image is obtained, flasher is judged whether there is according to the preview frame image;
If there is flasher, then the light source direction of the flasher is obtained;
White balance processing is carried out according to the light source direction.
It is further, described that flasher is judged whether there is according to the preview frame image, comprising:
In same scene, multiple continuous preview frame images are obtained;
Flasher is determined whether there is according to the brightness value of the continuous preview frame image.
Further, the light source direction for obtaining the flasher, comprising:
Obtain the reflected light information in the preview frame image;
The light source direction of the flasher is determined according to the reflected light information.
Further, the light source direction for obtaining the flasher, comprising:
Flasher is identified in preview frame image;
According to position of the flasher in the preview frame image, the light source direction of flasher is determined.
It is further, described that white balance processing is carried out according to the light source direction, comprising:
Obtain the light source colour of the flasher;
The first updating vector is determined according to the light source colour;
White balance processing is carried out according to first updating vector.
Further, white balance processing is carried out according to the light source direction, comprising:
The target area that the light source is irradiated to is determined according to the light source direction;
White balance processing is carried out to the target area.
It is further, described that white balance processing is carried out to the target area, comprising:
Obtain the primitive color information of the corresponding main body that is taken in the target area;
Obtain the reference color information for the main body that is taken described in the target area;
The second updating vector is determined according to the reference color information and the primitive color information;
White balance processing is carried out according to second updating vector.
The embodiment of the present application also provides a kind of storage medium comprising terminal device executable instruction, and the terminal device can It executes instruction when being executed by terminal device processor for executing a kind of image white balance calibration method, this method comprises:
Preview frame image is obtained, flasher is judged whether there is according to the preview frame image;
If there is flasher, then the light source direction of the flasher is obtained;
White balance processing is carried out according to the light source direction.
It is further, described that flasher is judged whether there is according to the preview frame image, comprising:
In same scene, multiple continuous preview frame images are obtained;
Flasher is determined whether there is according to the brightness value of the continuous preview frame image.
Further, the light source direction for obtaining the flasher, comprising:
Obtain the reflected light information in the preview frame image;
The light source direction of the flasher is determined according to the reflected light information.
Further, the light source direction for obtaining the flasher, comprising:
Flasher is identified in preview frame image;
According to position of the flasher in the preview frame image, the light source direction of flasher is determined.
It is further, described that white balance processing is carried out according to the light source direction, comprising:
Obtain the light source colour of the flasher;
The first updating vector is determined according to the light source colour;
White balance processing is carried out according to first updating vector.
Further, white balance processing is carried out according to the light source direction, comprising:
The target area that the light source is irradiated to is determined according to the light source direction;
White balance processing is carried out to the target area.
It is further, described that white balance processing is carried out to the target area, comprising:
Obtain the primitive color information of the corresponding main body that is taken in the target area;
Obtain the reference color information for the main body that is taken described in the target area;
The second updating vector is determined according to the reference color information and the primitive color information;
White balance processing is carried out according to second updating vector.
The computer storage medium of the embodiment of the present application, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the application operation computer Program code, programming language include object oriented program language-such as Java, Smalltalk, C++, are also wrapped Include conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground executes on the user computer, partly executes on the user computer, executing as an independent software package, partially existing Part executes on the remote computer or executes on a remote computer or server completely on subscriber computer.It is being related to In the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area Net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISP To be connected by internet).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application The image white balance calibration operation that executable instruction is not limited to the described above, can also be performed the application any embodiment and is provided Image white balance calibration method in relevant operation.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. a kind of image white balance calibration method characterized by comprising
Preview frame image is obtained, flasher is judged whether there is according to the preview frame image;
If there is flasher, then the light source direction of the flasher is obtained;
White balance processing is carried out according to the light source direction, comprising: is carried out in light source near zone or whole image white flat Weighing apparatus.
2. image white balance calibration method according to claim 1, which is characterized in that described according to the preview frame image Judge whether there is flasher, comprising:
In same scene, multiple continuous preview frame images are obtained;
Flasher is determined whether there is according to the brightness value of the continuous preview frame image.
3. image white balance calibration method according to claim 1, which is characterized in that the acquisition flasher Light source direction, comprising:
Obtain the reflected light information in the preview frame image;
The light source direction of the flasher is determined according to the reflected light information.
4. image white balance calibration method according to claim 1, which is characterized in that the acquisition flasher Light source direction, comprising:
Flasher is identified in preview frame image;
According to position of the flasher in the preview frame image, the light source direction of flasher is determined.
5. image white balance calibration method according to claim 1, which is characterized in that it is described according to the light source direction into The processing of row white balance, comprising:
Obtain the light source colour of the flasher;
The first updating vector is determined according to the light source colour;
White balance processing is carried out according to first updating vector.
6. image white balance calibration method according to claim 1, which is characterized in that carried out according to the light source direction white Balance Treatment, comprising:
The target area that the light source is irradiated to is determined according to the light source direction;
White balance processing is carried out to the target area.
7. image white balance calibration method according to claim 6, which is characterized in that described to be carried out to the target area White balance processing, comprising:
Obtain the primitive color information of the corresponding main body that is taken in the target area;
Obtain the reference color information for the main body that is taken described in the target area;
The second updating vector is determined according to the reference color information and the primitive color information;
White balance processing is carried out according to second updating vector.
8. a kind of image white balance calibration method characterized by comprising
Judgment module judges whether there is flasher according to the preview frame image for obtaining preview frame image;
Module is obtained, if determining the light source for obtaining the flasher there are flasher for the judgment module Direction;
White balance module, the light source direction for being obtained according to the acquisition module carry out white balance processing, comprising: in light White balance is carried out in source near zone or whole image.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor It is realized when row such as any described image white balance calibration method in claim 1-7.
10. a kind of terminal, including memory, processor and storage are on a memory and can be in the computer journey of processor operation Sequence, which is characterized in that the processor realizes that image as claimed in claim 1 is white when executing the computer program Balance calibration method.
CN201810936336.7A 2018-08-16 2018-08-16 Image white balance calibration method, apparatus, storage medium and terminal Active CN108965845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810936336.7A CN108965845B (en) 2018-08-16 2018-08-16 Image white balance calibration method, apparatus, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810936336.7A CN108965845B (en) 2018-08-16 2018-08-16 Image white balance calibration method, apparatus, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108965845A CN108965845A (en) 2018-12-07
CN108965845B true CN108965845B (en) 2019-10-01

Family

ID=64469683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810936336.7A Active CN108965845B (en) 2018-08-16 2018-08-16 Image white balance calibration method, apparatus, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108965845B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866383A (en) * 2020-07-13 2020-10-30 Oppo广东移动通信有限公司 Image processing method, terminal and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5308792B2 (en) * 2008-11-28 2013-10-09 オリンパス株式会社 White balance adjustment device, white balance adjustment method, white balance adjustment program, and imaging device
CN103297786B (en) * 2012-02-22 2015-04-22 能晶科技股份有限公司 Bird-eye view image system and compensation method thereof
JP2014053855A (en) * 2012-09-10 2014-03-20 Sony Corp Image processing device and method, and program
JP6302555B2 (en) * 2014-07-08 2018-03-28 富士フイルム株式会社 Image processing apparatus, imaging apparatus, image processing method, and program
KR20170014357A (en) * 2015-07-29 2017-02-08 엘지전자 주식회사 Mobile terminal equipped with a camera and controlling method thereof
CN107959842B (en) * 2017-12-25 2019-06-07 Oppo广东移动通信有限公司 Image processing method and device, computer readable storage medium and computer equipment

Also Published As

Publication number Publication date
CN108965845A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US20210383119A1 (en) Electronic device for providing shooting mode based on virtual character and operation method thereof
CN107205125B (en) A kind of image processing method, device, terminal and computer readable storage medium
CN104488258B (en) Method and apparatus for double camera shutter
CN106303266B (en) Control method, device and the terminal of flash lamp
CN106101547A (en) The processing method of a kind of view data, device and mobile terminal
US11189071B2 (en) Electronic device for providing avatar animation and method thereof
CN109547701A (en) Image capturing method, device, storage medium and electronic equipment
CN108881875A (en) Image white balancing treatment method, device, storage medium and terminal
CN109327691B (en) Image shooting method and device, storage medium and mobile terminal
CN109729281A (en) Image processing method, device, storage medium and terminal
CN109639896A (en) Block object detecting method, device, storage medium and mobile terminal
CN110113536A (en) A kind of screen light compensation method, device, storage medium and intelligent terminal
KR20160038460A (en) Electronic device and control method of the same
CN108650457A (en) Automatic photographing method, device, storage medium and mobile terminal
CN106210517A (en) The processing method of a kind of view data, device and mobile terminal
CN108668086A (en) Atomatic focusing method, device, storage medium and terminal
CN109788174A (en) A kind of light compensation method and terminal
CN111144365A (en) Living body detection method, living body detection device, computer equipment and storage medium
CN108551552A (en) Image processing method, device, storage medium and mobile terminal
CN109040729B (en) Image white balance correction method and device, storage medium and terminal
CN111880888A (en) Preview cover generation method and device, electronic equipment and storage medium
CN109120864B (en) Light supplement processing method and device, storage medium and mobile terminal
CN108683858A (en) It takes pictures optimization method, device, storage medium and terminal device
CN109561291A (en) Color temperature compensating method, device, storage medium and mobile terminal
CN108765380A (en) Image processing method, device, storage medium and mobile terminal

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