CN104394392A - White balance adjusting method, device and terminal - Google Patents

White balance adjusting method, device and terminal Download PDF

Info

Publication number
CN104394392A
CN104394392A CN201410647497.6A CN201410647497A CN104394392A CN 104394392 A CN104394392 A CN 104394392A CN 201410647497 A CN201410647497 A CN 201410647497A CN 104394392 A CN104394392 A CN 104394392A
Authority
CN
China
Prior art keywords
image
white balance
gain
frame per
mean value
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.)
Granted
Application number
CN201410647497.6A
Other languages
Chinese (zh)
Other versions
CN104394392B (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 CN201410647497.6A priority Critical patent/CN104394392B/en
Publication of CN104394392A publication Critical patent/CN104394392A/en
Application granted granted Critical
Publication of CN104394392B publication Critical patent/CN104394392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

An embodiment of the invention discloses a white balance adjusting method, device and terminal. The white balance adjusting method comprises obtaining a frame rate of a first camera; judging whether the frame rate is a maximum frame rate or not and obtaining a first image through the first camera if yes; analyzing the first image to obtain white balance gain of the first image; adjusting white balance on a second image through a second camera through the white balance gain; displaying the second image after white balance adjusting. The white balance adjusting method can improve the white balance adjusting speed and reduce the display delay of the image after white balance adjustment under the condition that the image quality is not influenced.

Description

A kind of white balance adjusting method, device and terminal
Technical field
The present invention relates to electronic technology field, particularly relate to a kind of white balance adjusting method, device and terminal.
Background technology
In camera technique, when camera starts or luminous environment changes, usually can with white balance adjusting process.Wherein, white balance generates the accuracy of white for describing the mixing of red in display, green and blue three primary colors.White balance adjusting speed is usually relevant with frame per second, if frame per second is higher, then white balance adjusting speed is faster, and terminal is shorter by the time of the image after display display white balance adjusting, and wherein frame per second is used for the frame number of the image of transmission in measurement unit's time.And in existing camera technique, frame per second is higher, require also higher to the disposal ability of video card, if improve frame per second, will cause the lower or noise of image brightness comparatively greatly, and then affect image quality; If frame per second is lower, then white balance adjusting speed is comparatively slow, and terminal is longer by the time delay of the image after display display white balance adjusting.
Summary of the invention
The embodiment of the present invention provides a kind of white balance adjusting method, device and terminal, when not affecting image quality, can improve white balance adjusting speed, reducing the display time delay of the image after white balance adjusting.
Embodiments provide a kind of white balance adjusting method, comprising:
Obtain the frame per second of the first camera;
Judge whether described frame per second is maximum frame per second, if so, then obtains the first image by described first camera;
Described first image analysis is obtained to the white balance gains of described first image;
According to described white balance gains, white balance adjusting is carried out to the second image got by second camera;
Show the second image after described white balance adjusting.
Correspondingly, the embodiment of the present invention additionally provides a kind of white balance adjustment device, comprising:
Frame per second acquisition module, for obtaining the frame per second of the first camera;
Judge module, for judging whether described frame per second is maximum frame per second;
Image collection module, if judge that described frame per second is maximum frame per second for described judge module, then obtains the first image by described first camera;
Gain acquisition module, for obtaining the white balance gains of described first image to described first image analysis;
Adjustment module, for carrying out white balance adjusting according to described white balance gains to the second image got by second camera;
Display module, for showing the second image after described white balance adjusting.
Correspondingly, the embodiment of the present invention additionally provides a kind of terminal, comprises white balance adjustment device as above.
Implement the embodiment of the present invention, when the frame per second of terminal judges first camera is maximum frame per second, the first image is obtained by the first camera, first image analysis is obtained to the white balance gains of the first image, according to white balance gains, white balance adjusting is carried out to the second image got by second camera, and show the second image after white balance adjusting, in hinge structure, the higher image quality that will cause of frame per second is poor, the lower white balance adjusting speed that will cause of frame per second is slower, the embodiment of the present invention can when not affecting image quality, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of white balance adjusting method provided in first embodiment of the invention;
Fig. 2 is the structural representation of a kind of white balance adjustment device provided in the embodiment of the present invention;
Fig. 3 is the structural representation of the gain acquisition module of Fig. 2 in the embodiment of the present invention;
Fig. 4 is the structural representation of the adjustment module of Fig. 2 in the embodiment of the present invention;
Fig. 5 is the structural representation of a kind of terminal provided in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of white balance adjusting method, when the frame per second of terminal judges first camera is maximum frame per second, the first image is obtained by the first camera, first image analysis is obtained to the white balance gains of the first image, according to white balance gains, white balance adjusting is carried out to the second image got by second camera, and show the second image after white balance adjusting, can when not affecting image quality, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
The first camera that the embodiment of the present invention is mentioned to can be identical with the shooting direction of second camera, also can not be identical.Such as, the first camera can be front-facing camera, and second camera can be post-positioned pick-up head, and wherein the shooting direction of the first camera and second camera is contrary.And for example, the first camera and second camera can be post-positioned pick-up head, and wherein the first camera is identical with the shooting direction of second camera, etc., the embodiment of the present invention does not limit.
The white balance adjustment device that the embodiment of the present invention is mentioned to can be arranged in the terminals such as mobile phone, camera, panel computer, PC (personal computer, personal computer) or Worn type smart machine.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of a kind of white balance adjusting method provided in first embodiment of the invention, and the white balance adjusting method as shown in the figure in the embodiment of the present invention can comprise:
S101, obtains the frame per second of the first camera.
Terminal can obtain the frame per second of the first camera.Such as, terminal can obtain the configuration information of the first camera, and obtain the frame per second of the first camera according to the configuration information of the first camera after starting the first camera by camera module.Wherein, frame per second is used for the frame number of the image of transmission in measurement unit's time, frame per second is higher, the frame number of the image of transmitted per unit time is more, then terminal is faster by the speed of camera acquisition image, terminal obtains the white balance gains of image speed to image analysis is faster, and then the speed that terminal carries out white balance adjusting by white balance gains to image is faster, and terminal is shorter by the time delay of the image after display display white balance adjusting.
S102, judges whether frame per second is maximum frame per second.
After terminal gets the frame per second of the first camera, can judge whether this frame per second is maximum frame per second, if this frame per second is maximum frame per second, then performs S104 further; If this frame per second is not maximum frame per second, then perform S103 further.Such as, terminal can obtain the configuration information of the first camera, and obtains the maximum frame per second of the first camera according to the configuration information of the first camera, then, after terminal gets the frame per second of the first camera, can judge whether this frame per second is maximum frame per second.
S103, is adjusted to maximum frame per second by frame per second.
When the frame per second of terminal judges first camera is not maximum frame per second, this frame per second can be adjusted to maximum frame per second.Such as, terminal can obtain the configuration information of the first camera, and obtains the maximum frame per second of the first camera according to the configuration information of the first camera, then this frame per second can be adjusted to maximum frame per second by terminal.
S104, obtains the first image by the first camera.
When the frame per second of terminal judges first camera is maximum frame per second, the first image can be obtained by the first camera.Concrete, terminal can control the first camera with maximum frame per second for parameter, and obtain the first image, wherein terminal obtains the fastest of the first image.
In an alternative embodiment, the frame per second of terminal judges first camera is not maximum frame per second, and after this frame per second is adjusted to maximum frame per second, can obtain the first image by the first camera.
S105, obtains the white balance gains of the first image to the first image analysis.
Terminal can obtain the white balance gains of the first image to the first image analysis.Terminal by the Automatic white balance algorithm based on dynamic threshold or gray world etc., can obtain the white balance gains of the first image to the first image analysis.
For the Automatic white balance algorithm based on dynamic threshold, first image can be cut at least one subgraph by terminal, calculate the average brightness of each subgraph, obtain the mean value of R, G, B three primary colors in subgraph corresponding to high-high brightness mean value, mean value according to R, G, B three primary colors obtains white balance gains, wherein R primary colours are red, and G primary colours are green, and B primary colours are blue.
It is to be noted, the embodiment of the present invention is including but not limited to the white balance gains by the Automatic white balance algorithm based on dynamic threshold, the first image analysis being obtained to the first image, such as, terminal can also obtain the white balance gains of the first image to the first image analysis by the Automatic white balance algorithm based on look correlation method, etc., the embodiment of the present invention does not limit.
Optionally, terminal can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, or calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, or calculate the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, terminal can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains.Terminal also can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.Terminal also can calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, terminal can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculate the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
S106, carries out white balance adjusting according to white balance gains to the second image got by second camera.
Terminal can carry out white balance adjusting according to white balance gains to the second image got by second camera.
Concrete, white balance gains can comprise red gain, green gain or blue gain, terminal can obtain the second image by second camera, red gain is played up on the red channel of the second image, or green gain is played up on the green channel of the second image, or blue gain is played up on the blue channel of the second image information, to realize the white balance adjusting to the second image.
Optionally, when white balance gains comprises red gain and green gain, terminal can obtain the second image by second camera, red gain is played up on the red channel of the second image, and green gain is played up on the green channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises red gain and blue gain, terminal can obtain the second image by second camera, red gain is played up on the red channel of the second image, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises green gain and blue gain, terminal can obtain the second image by second camera, green gain is played up on the green channel of the second image, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.
Further alternative, when white balance gains comprises red gain, green gain and blue gain, terminal can obtain the second image by second camera, red gain is played up on the red channel of the second image, green gain is played up on the green channel of the second image, and blue gain is played up on the blue channel of the second image information, to realize the white balance adjusting to the second image.
S107, the second image after display white balance adjusting.
Terminal can show the second image after white balance adjusting after carrying out white balance adjusting to the second image, and such as, terminal can show the second image after white balance adjusting by display.
The first image that in the embodiment of the present invention, terminal is got by the first camera is for obtaining white balance gains, the second image obtained by second camera is for preview and show, when then the frame per second of the first camera is adjusted to maximum frame per second, the acquisition speed of the white balance gains of the first image can be improved, the frame per second of second camera remains unchanged, the image quality of the second image will do not affected, by the white balance gains of the first image, white balance adjusting is carried out to the second image, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
In the white balance adjusting method shown in Fig. 1, when the frame per second of terminal judges first camera is maximum frame per second, the first image is obtained by the first camera, first image analysis is obtained to the white balance gains of the first image, according to white balance gains, white balance adjusting is carried out to the second image got by second camera, and show the second image after white balance adjusting, can when not affecting image quality, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
Refer to Fig. 2, Fig. 2 is the structural representation of a kind of white balance adjustment device provided in the embodiment of the present invention, wherein the white balance adjustment device that provides of the embodiment of the present invention is corresponding with the method shown in Fig. 1, for the executive agent based on the white balance adjusting method shown in Fig. 1, white balance adjustment device 200 as shown in the figure in the embodiment of the present invention at least can comprise frame per second acquisition module 210, judge module 220, image collection module 230, gain acquisition module 240, adjustment module 250 and display module 260, wherein:
Frame per second acquisition module 210, for obtaining the frame per second of the first camera.
Such as, frame per second acquisition module 210 can obtain the configuration information of the first camera, and obtains the frame per second of the first camera according to the configuration information of the first camera.Wherein, frame per second is used for the frame number of the image of transmission in measurement unit's time, frame per second is higher, the frame number of the image of transmitted per unit time is more, then image collection module 230 is faster by the speed of camera acquisition image, the speed that gain acquisition module 240 pairs of image analyses obtain the white balance gains of image is faster, and then the speed that adjustment module 250 carries out white balance adjusting by white balance gains to image is faster, display module 260 is shorter by the time delay of the image after display display white balance adjusting.
Judge module 220, for judging whether frame per second is maximum frame per second.
Such as, judge module 220 can obtain the configuration information of the first camera, and obtain the maximum frame per second of the first camera according to the configuration information of the first camera, then after judge module 220 gets the frame per second of the first camera, can judge whether this frame per second is maximum frame per second.
Image collection module 230, if judge that frame per second is maximum frame per second for judge module 220, then obtains the first image by the first camera.
Gain acquisition module 240, for obtaining the white balance gains of the first image to the first image analysis.
Such as, gain acquisition module 240 by the Automatic white balance algorithm based on dynamic threshold or gray world etc., can obtain the white balance gains of the first image to the first image analysis.It is to be noted, the embodiment of the present invention is including but not limited to the white balance gains by the Automatic white balance algorithm based on dynamic threshold, the first image analysis being obtained to the first image, such as, gain acquisition module 240 can also obtain the white balance gains of the first image to the first image analysis by the Automatic white balance algorithm based on look correlation method, etc., the embodiment of the present invention does not limit.
Adjustment module 250, for carrying out white balance adjusting according to white balance gains to the second image got by second camera.
Display module 260, for showing the second image after white balance adjusting.Such as, display module 260 can show the second image after white balance adjusting by display.
As the optional execution mode of one, adjustment module 250, when also judging that frame per second is not maximum frame per second for judge module 220, frame per second is adjusted to maximum frame per second, trigger image acquisition module 230 obtains the first image by the first camera.
As the optional execution mode of one, image collection module 230, for controlling the first camera with maximum frame per second for parameter, obtain the first image, wherein image collection module 230 obtains the fastest of the first image.
As the optional execution mode of one, gain acquisition module 240 can as shown in Figure 3, comprise further:
Cutting unit 310, for being cut at least one subgraph by the first image.
Computing unit 320, for calculating the average brightness of each subgraph.
Average acquiring unit 330, for obtaining the mean value of R, G, B three primary colors in subgraph corresponding to high-high brightness mean value.Wherein R primary colours are red, and G primary colours are green, and B primary colours are blue.
Gain acquiring unit 340, obtains white balance gains for the mean value according to R, G, B three primary colors.
As the optional execution mode of one, gain acquiring unit 340, for calculating the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains.Or
Gain acquiring unit 340, for calculating the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains.Or
Gain acquiring unit 340, for calculating the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, gain acquiring unit 340 can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains.Gain acquiring unit 340 also can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.Gain acquiring unit 340 also can calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, gain acquiring unit 340 can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculate the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
As the optional execution mode of one, white balance gains can comprise red gain, green gain or blue gain, then adjustment module 250 can as shown in Figure 4, comprise further:
Image acquisition unit 410, for obtaining the second image by second camera.
Rendering unit 420, for red gain being played up at the red channel of the second image, green gain being played up at the green channel of the second image or the blue channel blue gain played up in the second image information, to realize the white balance adjusting to the second image.
Further alternative, when white balance gains comprises red gain and green gain, red gain can be played up on the red channel of the second image by rendering unit 420, and green gain is played up on the green channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises red gain and blue gain, red gain can be played up on the red channel of the second image by rendering unit 420, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises green gain and blue gain, green gain can be played up on the green channel of the second image by rendering unit 420, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.
Further alternative, when white balance gains comprises red gain, green gain and blue gain, red gain can be played up on the red channel of the second image by rendering unit 420, green gain is played up on the green channel of the second image, and blue gain is played up on the blue channel of the second image information, to realize the white balance adjusting to the second image.
In the white balance adjustment device shown in Fig. 2, when judge module 220 judges that the frame per second that frame per second acquisition module 210 gets is maximum frame per second, image acquisition unit 230 obtains the first image by the first camera, gain acquisition module 240 obtains the white balance gains of the first image to the first image analysis, adjustment module 250 carries out white balance adjusting according to white balance gains to the second image got by second camera, display module 260 shows the second image after white balance adjusting, can when not affecting image quality, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
Refer to Fig. 5, Fig. 5 is the structural representation of a kind of terminal provided in the embodiment of the present invention, the white balance adjustment device shown in Fig. 2 ~ Fig. 4 can be comprised, wherein, this terminal can be the terminals such as mobile phone, camera, panel computer, PC or Worn type smart machine, and white balance adjustment device is arranged in this terminal.As shown in Figure 5, this terminal 500 comprises: at least one processor 510, such as CPU, at least one first input unit 530, at least one secondary input device 540, at least one output device 550, memory 560, at least one bus 520.Wherein, communication bus 520 is for realizing the connection communication between these assemblies.Such as, the first input unit 530 can comprise the first camera, and secondary input device 540 can comprise second camera, and output device 550 can comprise display screen.Memory 560 can be high-speed RAM memory, also can be non-labile memory (non-volatile memory), such as at least one magnetic disc store.Memory 560 can also be optionally that at least one is positioned at the storage terminal away from aforementioned processor 510.Wherein processor 510 can the white balance adjustment device shown in composition graphs 2 ~ Fig. 4, wherein stores batch processing code in memory 560, and processor 510 calls the program code stored in memory 560, for performing following operation:
Obtain the frame per second of the first input unit 530.
Such as, processor 510 can obtain the configuration information of the first input unit 530, and obtains the frame per second of the first input unit 530 according to the configuration information of the first input unit 530.Wherein, frame per second is used for the frame number of the image of transmission in measurement unit's time, frame per second is higher, the frame number of the image of transmitted per unit time is more, then obtain the speed of image by the first input unit 530 faster, the speed that processor 510 pairs of image analyses obtain the white balance gains of image is faster, and then the speed of carrying out white balance adjusting to image by white balance gains is faster, and the time delay being shown the image after white balance adjusting by output device 550 is shorter.
Judge whether frame per second is maximum frame per second.
Such as, processor 510 can obtain the configuration information of the first input unit 530, and obtain the maximum frame per second of the first input unit 530 according to the configuration information of the first input unit 530, then after getting the frame per second of the first input unit 530, can judge whether this frame per second is maximum frame per second.
If judge, frame per second is maximum frame per second, then obtain the first image by the first input unit 530.
First image analysis is obtained to the white balance gains of the first image.
Such as, processor 510 by the Automatic white balance algorithm based on dynamic threshold or gray world etc., can obtain the white balance gains of the first image to the first image analysis.It is to be noted, the embodiment of the present invention is including but not limited to the white balance gains by the Automatic white balance algorithm based on dynamic threshold, the first image analysis being obtained to the first image, such as, processor 510 can also obtain the white balance gains of the first image to the first image analysis by the Automatic white balance algorithm based on look correlation method, etc., the embodiment of the present invention does not limit.
According to white balance gains, white balance adjusting is carried out to the second image got by secondary input device 540.
The second image after white balance adjusting is shown by output device 550.
As the optional execution mode of one, when processor 510 judges that frame per second is not maximum frame per second, frame per second can be adjusted to maximum frame per second, and obtain the first image by the first input unit 530.
As the optional execution mode of one, processor 510 obtains the first image by the first input unit 530 and specifically can comprise:
Control the first input unit 530 with maximum frame per second for parameter, obtain the first image, wherein processor 510 obtains the fastest of the first image.
As the optional execution mode of one, processor 510 specifically can comprise the white balance gains that the first image analysis obtains the first image:
First image is cut at least one subgraph.
Calculate the average brightness of each subgraph.
Obtain the mean value of R, G, B three primary colors in subgraph corresponding to high-high brightness mean value.Wherein R primary colours are red, and G primary colours are green, and B primary colours are blue.
Mean value according to R, G, B three primary colors obtains white balance gains.
As the optional execution mode of one, processor 510 obtains white balance gains according to the mean value of R, G, B three primary colors and specifically can comprise:
Calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains.Or
Calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains.Or
Calculate the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, processor 510 can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains.Processor 510 also can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.Processor 510 also can calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculates the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
Further alternative, processor 510 can calculate the product of the mean value of high-high brightness mean value and R primary colours, as the red gain in white balance gains, calculate the product of the mean value of high-high brightness mean value and G primary colours, as the green gain in white balance gains, and calculate the product of the mean value of high-high brightness mean value and B primary colours, as the blue gain in white balance gains.
As the optional execution mode of one, white balance gains can comprise red gain, green gain or blue gain, then processor 510 is carried out white balance adjusting according to white balance gains to the second image got by secondary input device 540 and specifically can comprise:
The second image is obtained by secondary input device 540.
Red gain played up to play up on the red channel of the second image, by green gain plays up on the blue channel of the second image information, to realize the white balance adjusting to the second image on the green channel of the second image or by blue gain.
Further alternative, when white balance gains comprises red gain and green gain, red gain can be played up on the red channel of the second image by processor 510, and green gain is played up on the green channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises red gain and blue gain, red gain can be played up on the red channel of the second image by processor 510, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.When white balance gains comprises green gain and blue gain, green gain can be played up on the green channel of the second image by processor 510, and blue gain is played up on the blue channel of the second image, to realize the white balance adjusting to the second image.
Further alternative, when white balance gains comprises red gain, green gain and blue gain, red gain can be played up on the red channel of the second image by processor 510, green gain is played up on the green channel of the second image, and blue gain is played up on the blue channel of the second image information, to realize the white balance adjusting to the second image.
Concrete, the terminal 500 introduced in the embodiment of the present invention can in order to implement the part or all of flow process in the white balance adjusting embodiment of the method for composition graphs 1 of the present invention introduction.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
It should be noted that, in the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the embodiment of the present invention is necessary.
Step in embodiment of the present invention method can be carried out order according to actual needs and be adjusted, merges and delete.
Module in embodiment of the present invention terminal or unit can carry out merging, divide and deleting according to actual needs.
Module described in the embodiment of the present invention or unit, universal integrated circuit can be passed through, such as CPU (Central Processing Unit, central processing unit), or realized by ASIC (Application SpecificIntegrated Circuit, application-specific integrated circuit (ASIC)).
Above white balance adjusting method, device and terminal that the embodiment of the present invention provides are described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (13)

1. a white balance adjusting method, is characterized in that, comprising:
Obtain the frame per second of the first camera;
Judge whether described frame per second is maximum frame per second, if so, then obtains the first image by described first camera;
Described first image analysis is obtained to the white balance gains of described first image;
According to described white balance gains, white balance adjusting is carried out to the second image got by second camera;
Show the second image after described white balance adjusting.
2. the method for claim 1, is characterized in that, when judging that described frame per second is not maximum frame per second, also comprises:
Described frame per second is adjusted to maximum frame per second, and performs by described first image of described first camera acquisition.
3. the method for claim 1, is characterized in that, describedly obtains the first image by described first camera and comprises:
Control described first camera with described maximum frame per second for parameter, obtain described first image.
4. the method for claim 1, is characterized in that, describedly comprises the white balance gains that described first image analysis obtains described first image:
Described first image is cut at least one subgraph;
Calculate the average brightness of subgraph described in each;
Obtain the mean value of R, G, B three primary colors in subgraph corresponding to high-high brightness mean value;
Mean value according to described R, G, B three primary colors obtains described white balance gains.
5. method as claimed in claim 4, it is characterized in that, the described mean value according to described R, G, B three primary colors obtains described white balance gains and comprises:
Calculate the product of the mean value of described high-high brightness mean value and described R primary colours, as the red gain in described white balance gains; Or
Calculate the product of the mean value of described high-high brightness mean value and described G primary colours, as the green gain in described white balance gains; Or
Calculate the product of the mean value of described high-high brightness mean value and described B primary colours, as the blue gain in described white balance gains.
6. the method for claim 1, is characterized in that, described white balance gains comprises red gain, green gain or blue gain;
Describedly according to described white balance gains, white balance adjusting is carried out to the second image got by second camera and comprises:
Described second image is obtained by described second camera;
Described red gain played up to play up on the red channel of described second image, by described green gain plays up on the blue channel of described second image information, to realize the white balance adjusting to described second image on the green channel of described second image or by described blue gain.
7. a white balance adjustment device, is characterized in that, comprising:
Frame per second acquisition module, for obtaining the frame per second of the first camera;
Judge module, for judging whether described frame per second is maximum frame per second;
Image collection module, if judge that described frame per second is maximum frame per second for described judge module, then obtains the first image by described first camera;
Gain acquisition module, for obtaining the white balance gains of described first image to described first image analysis;
Adjustment module, for carrying out white balance adjusting according to described white balance gains to the second image got by second camera;
Display module, for showing the second image after described white balance adjusting.
8. device as claimed in claim 7, is characterized in that,
Described adjustment module, when also judging that described frame per second is not maximum frame per second for described judge module, is adjusted to maximum frame per second by described frame per second, triggers described image collection module and obtains described first image by described first camera.
9. device as claimed in claim 7, is characterized in that,
Described image collection module, for controlling described first camera with described maximum frame per second for parameter, obtains described first image.
10. device as claimed in claim 7, is characterized in that,
Described gain acquisition module comprises:
Cutting unit, for being cut at least one subgraph by described first image;
Computing unit, for calculating the average brightness of subgraph described in each;
Average acquiring unit, for obtaining the mean value of R, G, B three primary colors in subgraph corresponding to high-high brightness mean value;
Gain acquiring unit, for obtaining described white balance gains according to the mean value of described R, G, B three primary colors.
11. devices as claimed in claim 10, is characterized in that,
Described gain acquiring unit, for calculating the product of the mean value of described high-high brightness mean value and described R primary colours, as the red gain in described white balance gains; Or
Described gain acquiring unit, for calculating the product of the mean value of described high-high brightness mean value and described G primary colours, as the green gain in described white balance gains; Or
Described gain acquiring unit, for calculating the product of the mean value of described high-high brightness mean value and described B primary colours, as the blue gain in described white balance gains.
12. devices as claimed in claim 7, it is characterized in that, described white balance gains comprises red gain, green gain or blue gain;
Described adjustment module comprises:
Image acquisition unit, for obtaining described second image by described second camera;
Rendering unit, for described red gain being played up at the red channel of described second image, described green gain being played up at the green channel of described second image or the blue channel described blue gain played up in described second image information, to realize the white balance adjusting to described second image.
13. 1 kinds of terminals, is characterized in that, comprise the white balance adjustment device according to any one of claim 7 ~ 12.
CN201410647497.6A 2014-11-14 2014-11-14 A kind of white balance adjusting method, device and terminal Active CN104394392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410647497.6A CN104394392B (en) 2014-11-14 2014-11-14 A kind of white balance adjusting method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410647497.6A CN104394392B (en) 2014-11-14 2014-11-14 A kind of white balance adjusting method, device and terminal

Publications (2)

Publication Number Publication Date
CN104394392A true CN104394392A (en) 2015-03-04
CN104394392B CN104394392B (en) 2016-09-28

Family

ID=52612221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410647497.6A Active CN104394392B (en) 2014-11-14 2014-11-14 A kind of white balance adjusting method, device and terminal

Country Status (1)

Country Link
CN (1) CN104394392B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994362A (en) * 2015-07-02 2015-10-21 广东欧珀移动通信有限公司 Method and device for processing white balance
CN105120247A (en) * 2015-09-10 2015-12-02 联想(北京)有限公司 White-balance adjusting method and electronic device
CN105141934A (en) * 2015-09-25 2015-12-09 深圳Tcl数字技术有限公司 Analog-digital signal compensation method and apparatus
CN105227945A (en) * 2015-10-21 2016-01-06 维沃移动通信有限公司 A kind of control method of Automatic white balance and mobile terminal
CN105635568A (en) * 2015-12-25 2016-06-01 青岛海信移动通信技术股份有限公司 Image processing method in mobile terminal and mobile terminal
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device
CN107277480A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 White balance synchronous method, device and terminal device
CN107820070A (en) * 2017-10-25 2018-03-20 长沙云知检信息科技有限公司 White balance adjustment method
CN108848294A (en) * 2018-08-15 2018-11-20 努比亚技术有限公司 A kind of shooting parameter adjustment method, terminal and computer readable storage medium
CN109379575A (en) * 2018-11-28 2019-02-22 维沃移动通信(杭州)有限公司 A kind of white balancing treatment method and move end
WO2019105304A1 (en) * 2017-11-28 2019-06-06 Oppo广东移动通信有限公司 Image white balance processing method, computer readable storage medium, and electronic device
WO2020248705A1 (en) * 2019-06-12 2020-12-17 杭州萤石软件有限公司 Camera and camera starting method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100157136A1 (en) * 2008-12-18 2010-06-24 Qualcomm Incorporated System and method to autofocus assisted by autoexposure control
CN102104709A (en) * 2009-12-21 2011-06-22 展讯通信(上海)有限公司 Method for processing image shot by camera and camera
US20120189263A1 (en) * 2011-01-20 2012-07-26 Casio Computer Co., Ltd. Imaging apparatus and imaging method for taking moving image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100157136A1 (en) * 2008-12-18 2010-06-24 Qualcomm Incorporated System and method to autofocus assisted by autoexposure control
CN102246504A (en) * 2008-12-18 2011-11-16 高通股份有限公司 System and method to autofocus assisted by autoexposure control
CN102104709A (en) * 2009-12-21 2011-06-22 展讯通信(上海)有限公司 Method for processing image shot by camera and camera
US20120189263A1 (en) * 2011-01-20 2012-07-26 Casio Computer Co., Ltd. Imaging apparatus and imaging method for taking moving image

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device
CN104994362A (en) * 2015-07-02 2015-10-21 广东欧珀移动通信有限公司 Method and device for processing white balance
CN105120247A (en) * 2015-09-10 2015-12-02 联想(北京)有限公司 White-balance adjusting method and electronic device
CN105120247B (en) * 2015-09-10 2017-12-26 联想(北京)有限公司 A kind of white balance adjustment method and electronic equipment
CN105141934A (en) * 2015-09-25 2015-12-09 深圳Tcl数字技术有限公司 Analog-digital signal compensation method and apparatus
CN105227945A (en) * 2015-10-21 2016-01-06 维沃移动通信有限公司 A kind of control method of Automatic white balance and mobile terminal
CN105635568A (en) * 2015-12-25 2016-06-01 青岛海信移动通信技术股份有限公司 Image processing method in mobile terminal and mobile terminal
WO2019011090A1 (en) * 2017-07-10 2019-01-17 Oppo广东移动通信有限公司 White balance synchronization method and apparatus, and terminal device
CN107277480A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 White balance synchronous method, device and terminal device
US11206382B2 (en) 2017-07-10 2021-12-21 Guangdong Oppo Mobile Telecommunications Corp., Ltd. White balance synchronization method and apparatus, and terminal device
CN107820070A (en) * 2017-10-25 2018-03-20 长沙云知检信息科技有限公司 White balance adjustment method
WO2019105304A1 (en) * 2017-11-28 2019-06-06 Oppo广东移动通信有限公司 Image white balance processing method, computer readable storage medium, and electronic device
CN108848294B (en) * 2018-08-15 2020-09-04 努比亚技术有限公司 Shooting parameter adjusting method, terminal and computer readable storage medium
CN108848294A (en) * 2018-08-15 2018-11-20 努比亚技术有限公司 A kind of shooting parameter adjustment method, terminal and computer readable storage medium
CN109379575A (en) * 2018-11-28 2019-02-22 维沃移动通信(杭州)有限公司 A kind of white balancing treatment method and move end
WO2020248705A1 (en) * 2019-06-12 2020-12-17 杭州萤石软件有限公司 Camera and camera starting method and device

Also Published As

Publication number Publication date
CN104394392B (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN104394392A (en) White balance adjusting method, device and terminal
CN103871051B (en) Image processing method, device and electronic equipment
EP2993888A1 (en) Method, device, and terminal for image processing
CN108900819A (en) Image processing method, device, storage medium and electronic equipment
CN104881408A (en) Method, device and system for counting number of clicks on page and displaying result
KR20210042952A (en) Image processing method and device, electronic device and storage medium
EP3627440A1 (en) Image processing method and apparatus, and terminal
CN109857477A (en) Transition optimization method, device and equipment are applied in mixing
CN109062715B (en) Method and device for determining memory clock frequency and terminal
CN110139149B (en) Video optimization method and device, and electronic equipment
CN105260306A (en) Performance detection method and device of art materials in game program
CN109699056A (en) Method for switching network and device and computer readable storage medium
CN104267933A (en) Flashlight adjusting method
CN109600605A (en) Detection method, electronic equipment and the computer program product of 4K ultra high-definition video
CN105959799A (en) Video compression method and device and electronic equipment
CN104793742A (en) Shooting previewing method and device
CN112530205A (en) Airport parking apron airplane state detection method and device
CN111638849A (en) Screenshot method and device and electronic equipment
CN106034210A (en) Image editing method and image editing device
CN104503674A (en) Screenshot picture generating method
EP3206387A1 (en) Image dynamic range adjustment method, terminal, and storage media
CN106528084A (en) Starting method and device
CN106406902B (en) A kind of cartoon display method and device of electronic gift
CN110086987B (en) Camera visual angle cutting method and device and storage medium
CN113807410B (en) Image recognition method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: Guangdong Opel Mobile Communications Co., Ltd.