CN104394392B - A kind of white balance adjusting method, device and terminal - Google Patents
A kind of white balance adjusting method, device and terminal Download PDFInfo
- Publication number
- CN104394392B CN104394392B CN201410647497.6A CN201410647497A CN104394392B CN 104394392 B CN104394392 B CN 104394392B CN 201410647497 A CN201410647497 A CN 201410647497A CN 104394392 B CN104394392 B CN 104394392B
- Authority
- CN
- China
- Prior art keywords
- image
- white balance
- gain
- frame per
- meansigma methods
- 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
Links
Landscapes
- Processing Of Color Television Signals (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
The embodiment of the invention discloses a kind of white balance adjusting method, device and terminal, wherein said white balance adjusting method includes: obtain the frame per second of the first photographic head;Judge whether frame per second is maximum frame per second, the most then obtain the first image by the first photographic head;First image is analyzed obtaining the white balance gains of the first image;According to white balance gains, the second image got by second camera is carried out white balance adjusting;The second image after display white balance adjusting.Use the embodiment of the present invention, white balance adjusting speed can be improved in the case of not affecting image quality, reduce the display time delay of the image after white balance adjusting.
Description
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 photographic head starts or luminous environment changes, it will usually adjust with white balance
Joint process.Wherein, white balance generates white for describing the mixing of red in display, green and blue three primary colours
Degree of accuracy.White balance adjusting speed is the most relevant with frame per second, if frame per second is the highest, then white balance adjusting speed is more
Hurry up, terminal is the shortest by the time of the image after display display white balance adjusting, and wherein frame per second is used for measuring
The frame number of the image of transmitted per unit time.And in existing camera technique, frame per second is the highest, the process to video card
Capability Requirement is the highest, if improving frame per second, brightness of image will be caused relatively low or noise is relatively big, and then impact
Image quality;If frame per second is relatively low, then white balance adjusting speed is relatively slow, and terminal shows white balance by display
The time delay of the image after regulation is longer.
Summary of the invention
The embodiment of the present invention provides a kind of white balance adjusting method, device and terminal, can not affect image
In the case of image quality, improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
Embodiments provide a kind of white balance adjusting method, including:
Obtain the frame per second of the first photographic head;
Judge whether described frame per second is maximum frame per second, the most then obtain the first figure by described first photographic head
Picture;
Described first image is analyzed obtaining the white balance gains of described first image;
According to described white balance gains, the second image got by second camera is carried out white balance tune
Joint;
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, including:
Frame per second acquisition module, for obtaining the frame per second of the first photographic head;
Judge module, is used for judging whether described frame per second is maximum frame per second;
Image collection module, if judging that described frame per second is maximum frame per second for described judge module, then passes through institute
State the first photographic head and obtain the first image;
Gain acquisition module, is used for being analyzed described first image obtaining the white flat of described first image
Weighing apparatus gain;
Adjustment module, for according to the described white balance gains the second image to being got by second camera
Carry out white balance adjusting;
Display module, the second image after showing described white balance adjusting.
Correspondingly, the embodiment of the present invention additionally provides a kind of terminal, fills including white balance adjusting as above
Put.
Implement the embodiment of the present invention, when the frame per second of terminal judges the first photographic head is maximum frame per second, by first
Photographic head obtains the first image, and the first image is analyzed obtaining the white balance gains of the first image, root
According to white balance gains, the second image got by second camera carried out white balance adjusting, and show white
The second image after balance adjustment, in hinge structure, frame per second is higher will cause image quality poor, frame
Rate is relatively low will cause white balance adjusting speed relatively slow, and the embodiment of the present invention can be in the situation not affecting image quality
Under, 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 that the technical scheme of the embodiment of the present invention, required in embodiment being described below
Accompanying drawing to be used is briefly described, it should be apparent that, the accompanying drawing in describing below is some of the present invention
Embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, also may be used
To obtain other accompanying drawing 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.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly
Chu, it is fully described by, it is clear that described embodiment is a part of embodiment of the present invention rather than all
Embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative labor
The every other embodiment obtained under dynamic premise, broadly falls into the scope of protection of the invention.
The embodiment of the invention discloses a kind of white balance adjusting method, the frame per second of terminal judges the first photographic head is
During maximum frame per second, obtain the first image by the first photographic head, be analyzed obtaining first to the first image
The white balance gains of image, is carried out the second image got by second camera according to white balance gains
White balance adjusting, and show the second image after white balance adjusting, can in the case of not affecting image quality,
Improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
The first photographic head that the embodiment of the present invention is mentioned to can be identical with the shooting direction of second camera, also
Can differ.Such as, the first photographic head can be front-facing camera, and second camera can be rearmounted taking the photograph
As head, wherein the shooting direction of the first photographic head and second camera is contrary.And for example, the first photographic head and
Two photographic head can be post-positioned pick-up head, and wherein the first photographic head is identical with the shooting direction of second camera,
Etc., the embodiment of the present invention does not limits.
The white balance adjustment device that the embodiment of the present invention is mentioned to can be arranged on mobile phone, photographing unit, flat board electricity
In the terminals such as brain, PC (personal computer, personal computer) or Worn type smart machine.
Refer to the flow process that Fig. 1, Fig. 1 are a kind of white balance adjusting methods provided in first embodiment of the invention
Schematic diagram, the white balance adjusting method in the embodiment of the present invention may include that as shown in the figure
S101, obtains the frame per second of the first photographic head.
Terminal can obtain the frame per second of the first photographic head.Such as, terminal is taken the photograph by camera module startup first
As, after head, the configuration information of the first photographic head can be obtained, and obtains according to the configuration information of the first photographic head
Take the frame per second of the first photographic head.Wherein, frame per second is the frame number of the image of transmission, frame within the units of measurement time
Rate is the highest, and the frame number of the image of transmitted per unit time is the most, then terminal obtains the speed of image by photographic head
Spending the fastest, the speed that terminal is analyzed obtaining the white balance gains of image to image is the fastest, and then eventually
Holding speed image being carried out white balance adjusting by white balance gains the fastest, terminal is shown by display
The time delay of the image after white balance adjusting is the shortest.
S102, it is judged that whether frame per second is maximum frame per second.
After terminal gets the frame per second of the first photographic head, it can be determined that whether this frame per second is maximum frame per second, if
This frame per second is maximum frame per second, performs S104 the most further;If this frame per second is not maximum frame per second, hold the most further
Row S103.Such as, terminal can obtain the configuration information of the first photographic head, and joining according to the first photographic head
Put the maximum frame per second of acquisition of information the first photographic head, then after terminal gets the frame per second of the first photographic head, can
To 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 the first photographic head is not maximum frame per second, this frame per second can be adjusted to largest frames
Rate.Such as, terminal can obtain the configuration information of the first photographic head, and believes according to the configuration of the first photographic head
Breath obtains the maximum frame per second of the first photographic head, then this frame per second can be adjusted to maximum frame per second by terminal.
S104, obtains the first image by the first photographic head.
When the frame per second of terminal judges the first photographic head is maximum frame per second, first can be obtained by the first photographic head
Image.Concrete, terminal can control the first photographic head with maximum frame per second as parameter, obtains the first image,
Wherein terminal obtains the fastest of the first image.
In an alternative embodiment, the frame per second of terminal judges the first photographic head is not maximum frame per second, and by this frame per second
After being adjusted to maximum frame per second, the first image can be obtained by the first photographic head.
S105, is analyzed obtaining the white balance gains of the first image to the first image.
Terminal can be analyzed obtaining to the first image the white balance gains of the first image.Terminal can be led to
Cross AWB algorithm based on dynamic threshold or gray world etc., be analyzed obtaining to the first image
Take the white balance gains of the first image.
As a example by AWB algorithm based on dynamic threshold, the first image can be cut at least by terminal
One subimage, calculates the average brightness of each subimage, obtains the subgraph that high-high brightness meansigma methods is corresponding
The meansigma methods of R, G, B three primary colours in Xiang, obtains white balance according to the meansigma methods of R, G, B three primary colours and increases
Benefit, wherein R primary colours are red, and G primary colours are green, and B primary colours are blue.
It is pointed out that the embodiment of the present invention is including but not limited to by based on dynamic threshold the whitest
Balanced algorithm is analyzed obtaining the white balance gains of the first image to the first image, and such as, terminal also may be used
To be analyzed obtaining the first image to the first image by AWB algorithm based on color method of correlation
White balance gains, etc., the embodiment of the present invention does not limits.
Optionally, terminal can calculate the product of high-high brightness meansigma methods and the meansigma methods of R primary colours, as in vain
Red gain in balancing gain, or calculate the product of high-high brightness meansigma methods and the meansigma methods of G primary colours,
As the green gain in white balance gains, or calculate the high-high brightness meansigma methods meansigma methods with B primary colours
Product, as the blue gain in white balance gains.
Further alternative, terminal can calculate the product of high-high brightness meansigma methods and the meansigma methods of R primary colours,
As the red gain in white balance gains, and calculate taking advantage of of the high-high brightness meansigma methods meansigma methods with G primary colours
Long-pending, as the green gain in white balance gains.Terminal can also calculate high-high brightness meansigma methods and R primary colours
The product of meansigma methods, as the red gain in white balance gains, and calculate high-high brightness meansigma methods and B
The product of the meansigma methods of primary colours, as the blue gain in white balance gains.Terminal can also calculate the most light
Degree meansigma methods and the product of the meansigma methods of G primary colours, as the green gain in white balance gains, and calculate
The product of the meansigma methods of big average brightness and B primary colours, as the blue gain in white balance gains.
Further alternative, terminal can calculate the product of high-high brightness meansigma methods and the meansigma methods of R primary colours,
As the red gain in white balance gains, calculate the product of high-high brightness meansigma methods and the meansigma methods of G primary colours,
As the green gain in white balance gains, and calculate taking advantage of of the high-high brightness meansigma methods meansigma methods with B primary colours
Long-pending, as the blue gain in white balance gains.
S106, carries out white balance tune according to white balance gains to the second image got by second camera
Joint.
Terminal can carry out white balance according to white balance gains to the second image got by second camera
Regulation.
Concrete, white balance gains can include red gain, green gain or blue gain, and terminal can
To obtain the second image by second camera, red gain is rendered on the red channel of the second image,
Or green gain is rendered on the green channel of the second image, or blue gain is rendered at the second figure
As on the blue channel of information, to realize the white balance adjusting to the second image.
Optionally, when white balance gains includes red gain and green gain, terminal can be by the second shooting
Head obtains the second image, red gain is rendered on the red channel of the second image, and by green gain wash with watercolours
Dye is on the green channel of the second image, to realize the white balance adjusting to the second image.White balance gains bag
When including red gain and blue gain, terminal can obtain the second image by second camera, redness is increased
Benefit renders on the red channel of the second image, and blue gain is rendered on the blue channel of the second image,
To realize the white balance adjusting to the second image.When white balance gains includes green gain and blue gain, eventually
End can obtain the second image by second camera, and green gain renders the green channel at the second image
On, and blue gain is rendered on the blue channel of the second image, to realize the white balance to the second image
Regulation.
Further alternative, when white balance gains includes red gain, green gain and blue gain, eventually
End can obtain the second image by second camera, and red gain renders the red channel at the second image
On, green gain is rendered on the green channel of the second image, and blue gain is rendered at the second image
On the blue channel of information, to realize the white balance adjusting to the second image.
S107, the second image after display white balance adjusting.
After terminal carries out white balance adjusting to the second image, the second image after white balance adjusting can be shown,
Such as, terminal can be by the second image after display display white balance adjusting.
The first image that in the embodiment of the present invention, terminal is got by the first photographic head increases for obtaining white balance
Benefit, the second image obtained by second camera for preview and is shown, then the frame per second of the first photographic head is adjusted
Whole when being maximum frame per second, the acquisition speed of the white balance gains of the first image can be improved, second camera
Frame per second keeps constant, will not affect the image quality of the second image, by the white balance gains of the first image to second
Image carries out white balance adjusting, improves white balance adjusting speed, reduces the image after white balance adjusting
Display time delay.
In the white balance adjusting method shown in Fig. 1, the frame per second of terminal judges the first photographic head is maximum frame per second
Time, obtain the first image by the first photographic head, be analyzed obtaining the white of the first image to the first image
Balancing gain, carries out white balance tune according to white balance gains to the second image got by second camera
Joint, and show the second image after white balance adjusting, can improve white in the case of not affecting image quality
Balance adjustment speed, reduces the display time delay of the image after white balance adjusting.
Refer to the structural representation that Fig. 2, Fig. 2 are a kind of white balance adjustment device provided in the embodiment of the present invention
Figure, the white balance adjustment device that wherein embodiment of the present invention provides is corresponding with the method shown in Fig. 1, for base
In the executive agent of the white balance adjusting method shown in Fig. 1, the white balance in the embodiment of the present invention as shown in the figure
Adjusting means 200 at least can include 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 photographic head.
Such as, frame per second acquisition module 210 can obtain the configuration information of the first photographic head, and takes the photograph according to first
As the configuration information of head obtains the frame per second of the first photographic head.Wherein, frame per second transmission within the units of measurement time
The frame number of image, frame per second is the highest, and the frame number of the image of transmitted per unit time is the most, then Image Acquisition mould
The speed that block 230 obtains image by photographic head is the fastest, gain acquisition module 240 image is analyzed with
The speed of the white balance gains obtaining image is the fastest, and then adjustment module 250 passes through white balance gains to figure
It is the fastest as carrying out the speed of white balance adjusting, after display module 260 is by display display white balance adjusting
The time delay of image the shortest.
Judge module 220, is used for judging whether frame per second is maximum frame per second.
Such as, it is judged that module 220 can obtain the configuration information of the first photographic head, and according to the first photographic head
Configuration information obtain the maximum frame per second of the first photographic head, then judge module 220 gets the first photographic head
After frame per second, it can be determined that whether this frame per second is maximum frame per second.
For judge module 220, image collection module 230, if judging that frame per second is maximum frame per second, then by first
Photographic head obtains the first image.
Gain acquisition module 240, increases for the first image is analyzed obtaining the white balance of the first image
Benefit.
Such as, gain acquisition module 240 can be by based on dynamic threshold or gray world etc. the whitest
Balanced algorithm, is analyzed obtaining the white balance gains of the first image to the first image.It is pointed out that
The embodiment of the present invention is including but not limited to passing through AWB algorithm based on dynamic threshold to the first image
Being analyzed obtaining the white balance gains of the first image, such as, gain acquisition module 240 can also pass through
AWB algorithm based on color method of correlation is analyzed obtaining the white balance of the first image to the first image
Gain, etc., the embodiment of the present invention does not limits.
Adjustment module 250, for entering the second image got by second camera according to white balance gains
Row white balance adjusting.
Display module 260, the second image after showing white balance adjusting.Such as, display module 260 can
With by the second image after display display white balance adjusting.
As the optional embodiment of one, adjustment module 250, it is additionally operable to judge module 220 and judges that frame per second is not
When being maximum frame per second, frame per second is adjusted to maximum frame per second, triggers image collection module 230 by the first shooting
Head obtains the first image.
As the optional embodiment of one, image collection module 230, for controlling the first photographic head with maximum
Frame per second is parameter, obtains the first image, and wherein image collection module 230 obtains the fastest of the first image.
As the optional embodiment of one, gain acquisition module 240 can be as it is shown on figure 3, wrap further
Include:
Cutting unit 310, for being cut at least one subimage by the first image.
Computing unit 320, for calculating the average brightness of each subimage.
Average acquiring unit 330, for obtaining R, G, B tri-in the subimage that high-high brightness meansigma methods is corresponding
The meansigma methods of primary colours.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 meansigma methods according to R, G, B three primary colours.
As the optional embodiment of one, gain acquiring unit 340, be used for calculating high-high brightness meansigma methods with
The product of the meansigma methods of R primary colours, as the red gain in white balance gains.Or
Gain acquiring unit 340, for calculating the product of high-high brightness meansigma methods and the meansigma methods of G primary colours, makees
For the green gain in white balance gains.Or
Gain acquiring unit 340, for calculating the product of high-high brightness meansigma methods and the meansigma methods of B primary colours, makees
For the blue gain in white balance gains.
Further alternative, gain acquiring unit 340 can calculate the flat of high-high brightness meansigma methods and R primary colours
The product of average, as the red gain in white balance gains, and calculates high-high brightness meansigma methods and G primary colours
The product of meansigma methods, as the green gain in white balance gains.Gain acquiring unit 340 can also be counted
Calculate the product of high-high brightness meansigma methods and the meansigma methods of R primary colours, as the red gain in white balance gains,
And calculate the product of the meansigma methods of high-high brightness meansigma methods and B primary colours, as the blue increasing in white balance gains
Benefit.Gain acquiring unit 340 can also calculate the product of high-high brightness meansigma methods and the meansigma methods of G primary colours,
As the green gain in white balance gains, and calculate taking advantage of of the high-high brightness meansigma methods meansigma methods with B primary colours
Long-pending, as the blue gain in white balance gains.
Further alternative, gain acquiring unit 340 can calculate the flat of high-high brightness meansigma methods and R primary colours
The product of average, as the red gain in white balance gains, calculates high-high brightness meansigma methods and G primary colours
The product of meansigma methods, as the green gain in white balance gains, and calculates high-high brightness meansigma methods and B base
The product of the meansigma methods of color, as the blue gain in white balance gains.
As the optional embodiment of one, white balance gains can include red gain, green gain or
Blue gain, then adjustment module 250 can farther include as shown in Figure 4:
Image acquisition unit 410, for obtaining the second image by second camera.
Rendering unit 420, for rendering red gain at the red channel of the second image, by green gain
Render on the green channel of the second image or blue gain is rendered the blueness in the second image information and lead to
On road, to realize the white balance adjusting to the second image.
Further alternative, when white balance gains includes red gain and green gain, rendering unit 420 can
So that red gain is rendered on the red channel of the second image, and green gain is rendered at the second image
On green channel, to realize the white balance adjusting to the second image.White balance gains includes red gain and indigo plant
During color gain, red gain can be rendered on the red channel of the second image by rendering unit 420, and will
Blue gain renders on the blue channel of the second image, to realize the white balance adjusting to the second image.In vain
When balancing gain includes green gain and blue gain, green gain can be rendered by rendering unit 420
On the green channel of two images, and blue gain is rendered on the blue channel of the second image, right to realize
The white balance adjusting of the second image.
Further alternative, when white balance gains includes red gain, green gain and blue gain, wash with watercolours
Red gain can be rendered on the red channel of the second image by dye unit 420, green gain is rendered
On the green channel of the second image, and blue gain is rendered on the blue channel of the second image information, with
Realize the white balance adjusting to the second image.
In the white balance adjustment device shown in Fig. 2, it is judged that module 220 judges that frame per second acquisition module 210 obtains
When the frame per second got is maximum frame per second, image acquisition unit 230 obtains the first image by the first photographic head,
Gain acquisition module 240 is analyzed obtaining the white balance gains of the first image to the first image, regulates mould
Block 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 in the case of not affecting image quality,
Improve white balance adjusting speed, reduce the display time delay of the image after white balance adjusting.
Refer to the structural representation that Fig. 5, Fig. 5 are a kind of terminals provided in the embodiment of the present invention, can wrap
Including the white balance adjustment device shown in Fig. 2~Fig. 4, wherein, this terminal can be mobile phone, photographing unit, flat board
The terminals such as computer, PC or Worn type smart machine, white balance adjustment device is arranged in this terminal.Such as figure
Shown in 5, this terminal 500 includes: at least one processor 510, such as CPU, at least one first input
Device 530, at least one secondary input device 540, at least one output device 550, memorizer 560,
At least one bus 520.Wherein, communication bus 520 is for realizing the connection communication between these assemblies.Example
As, the first input equipment 530 can include that the first photographic head, secondary input device 540 can include second
Photographic head, output device 550 can include display screen.Memorizer 560 can be high-speed RAM memorizer,
Can also be non-labile memorizer (non-volatile memory), for example, at least one disk memory.
Memorizer 560 optionally can also is that at least one is located remotely from the storage terminal of aforementioned processor 510.Its
Middle processor 510 wherein can be deposited in memorizer 560 in conjunction with the white balance adjustment device shown in Fig. 2~Fig. 4
Store up batch processing code, and processor 510 calls the program code of storage in memorizer 560, is used for performing
Below operation:
Obtain the frame per second of the first input equipment 530.
Such as, processor 510 can obtain the configuration information of the first input equipment 530, and defeated according to first
The configuration information entering device 530 obtains the frame per second of the first input equipment 530.Wherein, frame per second is used for measuring list
The frame number of the image of transmission in bit time, frame per second is the highest, and the frame number of the image of transmitted per unit time is the most,
Then obtain the speed of image by the first input equipment 530 the fastest, processor 510 image is analyzed with
The speed of the white balance gains obtaining image is the fastest, and then by white balance gains, image is carried out white balance
The speed of regulation is the fastest, is shown that by output device 550 time delay of the image after white balance adjusting is the shortest.
Judge whether frame per second is maximum frame per second.
Such as, processor 510 can obtain the configuration information of the first input equipment 530, and defeated according to first
The configuration information entering device 530 obtains the maximum frame per second of the first input equipment 530, then get the first input
After the frame per second of device 530, it can be determined that whether this frame per second is maximum frame per second.
If judging, frame per second is maximum frame per second, then obtain the first image by the first input equipment 530.
First image is analyzed obtaining the white balance gains of the first image.
Such as, processor 510 can be calculated by AWB based on dynamic threshold or gray world etc.
Method, is analyzed obtaining the white balance gains of the first image to the first image.It is pointed out that this
First image is carried out by bright embodiment including but not limited to by AWB algorithm based on dynamic threshold
Analyzing to obtain the white balance gains of the first image, such as, processor 510 can also be by closing based on form and aspect
The AWB algorithm of method is analyzed obtaining the white balance gains of the first image to the first image, etc.,
The embodiment of the present invention does not limits.
According to white balance gains, the second image got by secondary input device 540 is carried out white balance tune
Joint.
The second image after white balance adjusting is shown by output device 550.
As the optional embodiment of one, processor 510 judges when frame per second is not maximum frame per second, can be by
Frame per second is adjusted to maximum frame per second, and obtains the first image by the first input equipment 530.
As the optional embodiment of one, processor 510 obtains the first figure by the first input equipment 530
As specifically may include that
Control the first input equipment 530 with maximum frame per second as parameter, obtain the first image, wherein processor 510
Obtain the fastest of the first image.
As the optional embodiment of one, the first image is analyzed obtaining the first figure by processor 510
The white balance gains of picture specifically may include that
First image is cut at least one subimage.
Calculate the average brightness of each subimage.
Obtain the meansigma methods of R, G, B three primary colours in the subimage that high-high brightness meansigma methods is corresponding.Wherein R base
Color is red, and G primary colours are green, and B primary colours are blue.
Meansigma methods according to R, G, B three primary colours obtains white balance gains.
As the optional embodiment of one, processor 510 obtains according to the meansigma methods of R, G, B three primary colours
White balance gains specifically may include that
Calculate the product of high-high brightness meansigma methods and the meansigma methods of R primary colours, as the redness in white balance gains
Gain.Or
Calculate the product of high-high brightness meansigma methods and the meansigma methods of G primary colours, as the green in white balance gains
Gain.Or
Calculate the product of high-high brightness meansigma methods and the meansigma methods of B primary colours, as the blueness in white balance gains
Gain.
Further alternative, processor 510 can calculate the high-high brightness meansigma methods meansigma methods with R primary colours
Product, as the red gain in white balance gains, and calculates the average of high-high brightness meansigma methods and G primary colours
The product of value, as the green gain in white balance gains.Processor 510 can also calculate high-high brightness and put down
Average and the product of the meansigma methods of R primary colours, as the red gain in white balance gains, and calculate the most light
The product of the meansigma methods of degree meansigma methods and B primary colours, as the blue gain in white balance gains.Processor 510
The product of the meansigma methods of high-high brightness meansigma methods and G primary colours can also be calculated, green as in white balance gains
Color gain, and calculate the product of high-high brightness meansigma methods and the meansigma methods of B primary colours, as in white balance gains
Blue gain.
Further alternative, processor 510 can calculate the high-high brightness meansigma methods meansigma methods with R primary colours
Product, as the red gain in white balance gains, calculates the meansigma methods of high-high brightness meansigma methods and G primary colours
Product, as the green gain in white balance gains, and calculate the flat of high-high brightness meansigma methods and B primary colours
The product of average, as the blue gain in white balance gains.
As the optional embodiment of one, white balance gains can include red gain, green gain or
Blue gain, then processor 510 according to white balance gains to being got by secondary input device 540
Two images carry out white balance adjusting and specifically may include that
The second image is obtained by secondary input device 540.
Red gain is rendered on the red channel of the second image, green gain is rendered at the second image
Render on green channel or by blue gain on the blue channel of the second image information, to realize the
The white balance adjusting of two images.
Further alternative, when white balance gains includes red gain and green gain, processor 510 is permissible
Red gain is rendered on the red channel of the second image, and green gain is rendered at the second image green
On chrominance channel, to realize the white balance adjusting to the second image.White balance gains includes red gain and blueness
During gain, red gain can be rendered on the red channel of the second image by processor 510, and by blueness
Gain renders on the blue channel of the second image, to realize the white balance adjusting to the second image.White balance
When gain includes green gain and blue gain, green gain can be rendered at the second image by processor 510
Green channel on, and blue gain is rendered on the blue channel of the second image, to realize the second figure
The white balance adjusting of picture.
Further alternative, when white balance gains includes red gain, green gain and blue gain, place
Red gain can be rendered on the red channel of the second image by reason device 510, green gain is rendered the
On the green channel of two images, and blue gain is rendered on the blue channel of the second image information, with reality
The now white balance adjusting to the second image.
Concrete, the terminal 500 introduced in the embodiment of the present invention can combine Fig. 1 Jie in order to implement the present invention
Part or all of flow process in the white balance adjusting embodiment of the method continued.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,
Can be by computer program and complete to instruct relevant hardware, described program can be stored in computer
In read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.
Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory,
Or random store-memory body (Random Access Memory, RAM) etc. ROM).
It should be noted that in the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, certain
The part being not described in embodiment, may refer to the associated description of other embodiments.Secondly, ability
Field technique personnel also should know, embodiment described in this description belongs to preferred embodiment, involved
Action and the module not necessarily embodiment of the present invention necessary to.
Step in embodiment of the present invention method can carry out order according to actual needs and adjust, merges and delete.
Module or unit in embodiment of the present invention terminal can merge according to actual needs, divide and
Delete.
Module described in the embodiment of the present invention or unit, can pass through universal integrated circuit, such as CPU
(Central Processing Unit, central processing unit), or by ASIC (Application Specific
Integrated Circuit, special IC) realize.
The white balance adjusting method, device and the terminal that are thered is provided the embodiment of the present invention above have been carried out in detail
Introducing, principle and the embodiment of the present invention are set forth by specific case used herein, above reality
The explanation executing example is only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for this area
Those skilled in the art, according to the thought of the present invention, the most all have and change
In place of change, in sum, this specification content should not be construed as limitation of the present invention.
Claims (11)
1. a white balance adjusting method, it is characterised in that including:
Obtain the frame per second of the first photographic head;
Judge whether described frame per second is maximum frame per second, the most then by described first photographic head with described maximum
Frame per second is parameter acquiring the first image;
Described first image is analyzed obtaining the white balance gains of described first image;
According to described white balance gains, the second image got by second camera is carried out white balance tune
Joint;
Show the second image after described white balance adjusting.
2. the method for claim 1, it is characterised in that judge when described frame per second is not maximum frame per second,
Also include:
Described frame per second is adjusted to maximum frame per second, and performs to obtain described first figure by described first photographic head
Picture.
3. the method for claim 1, it is characterised in that described described first image is analyzed
Include with the white balance gains of described first image of acquisition:
Described first image is cut at least one subimage;
Calculate the average brightness of each described subimage;
Obtain the meansigma methods of R, G, B three primary colours in the subimage that high-high brightness meansigma methods is corresponding;
Meansigma methods according to described R, G, B three primary colours obtains described white balance gains.
4. method as claimed in claim 3, it is characterised in that described according to described R, G, B tri-base
The meansigma methods of color obtains described white balance gains and includes:
Calculate the product of described high-high brightness meansigma methods and the meansigma methods of described R primary colours, as described white balance
Red gain in gain;Or
Calculate the product of described high-high brightness meansigma methods and the meansigma methods of described G primary colours, as described white balance
Green gain in gain;Or
Calculate the product of described high-high brightness meansigma methods and the meansigma methods of described B primary colours, as described white balance
Blue gain in gain.
5. the method for claim 1, it is characterised in that described white balance gains include red gain,
Green gain or blue gain;
Described according to described white balance gains, the second image got by second camera is carried out white balance
Regulation includes:
Described second image is obtained by described second camera;
Described red gain is rendered on the red channel of described second image, described green gain is rendered
Render in described second image information on the green channel of described second image or by described blue gain
Blue channel on, to realize white balance adjusting to described second image.
6. a white balance adjustment device, it is characterised in that including:
Frame per second acquisition module, for obtaining the frame per second of the first photographic head;
Judge module, is used for judging whether described frame per second is maximum frame per second;
Image collection module, if judging that described frame per second is maximum frame per second for described judge module, then passes through institute
State the first photographic head with described maximum frame per second for parameter acquiring the first image;
Gain acquisition module, is used for being analyzed described first image obtaining the white flat of described first image
Weighing apparatus gain;
Adjustment module, for according to the described white balance gains the second image to being got by second camera
Carry out white balance adjusting;
Display module, the second image after showing described white balance adjusting.
7. device as claimed in claim 6, it is characterised in that
Described adjustment module, is additionally operable to described judge module and judges when described frame per second is not maximum frame per second, by institute
State frame per second and be adjusted to maximum frame per second, trigger described image collection module and obtain described by described first photographic head
First image.
8. device as claimed in claim 6, it is characterised in that
Described gain acquisition module includes:
Cutting unit, for being cut at least one subimage by described first image;
Computing unit, for calculating the average brightness of each described subimage;
Average acquiring unit, for obtaining R, G, B three primary colours in the subimage that high-high brightness meansigma methods is corresponding
Meansigma methods;
Gain acquiring unit, obtains described white balance for the meansigma methods according to described R, G, B three primary colours and increases
Benefit.
9. device as claimed in claim 8, it is characterised in that
Described gain acquiring unit, for calculating the meansigma methods of described high-high brightness meansigma methods and described R primary colours
Product, as the red gain in described white balance gains;Or
Described gain acquiring unit, for calculating the meansigma methods of described high-high brightness meansigma methods and described G primary colours
Product, as the green gain in described white balance gains;Or
Described gain acquiring unit, for calculating the meansigma methods of described high-high brightness meansigma methods and described B primary colours
Product, as the blue gain in described white balance gains.
10. device as claimed in claim 6, it is characterised in that described white balance gains includes red increasing
Benefit, green gain or blue gain;
Described adjustment module includes:
Image acquisition unit, for obtaining described second image by described second camera;
Rendering unit, for rendering described red gain at the red channel of described second image, by institute
State green gain render on the green channel of described second image or render described blue gain in institute
State on the blue channel of the second image information, to realize the white balance adjusting to described second image.
11. 1 kinds of terminals, it is characterised in that include the white balance as according to any one of claim 6~10
Adjusting means.
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 CN104394392A (en) | 2015-03-04 |
CN104394392B true 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) |
Families Citing this family (12)
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 |
CN105120247B (en) * | 2015-09-10 | 2017-12-26 | 联想(北京)有限公司 | A kind of white balance adjustment method and electronic equipment |
CN105141934B (en) * | 2015-09-25 | 2017-07-25 | 深圳Tcl数字技术有限公司 | The method and device of modulus signal compensation |
CN105227945B (en) * | 2015-10-21 | 2017-05-17 | 维沃移动通信有限公司 | Automatic white balance control method and mobile terminal |
CN105635568B (en) * | 2015-12-25 | 2019-09-17 | 青岛海信移动通信技术股份有限公司 | Image processing method and mobile terminal in a kind of mobile terminal |
CN107277480B (en) * | 2017-07-10 | 2019-03-29 | Oppo广东移动通信有限公司 | White balance synchronous method, device and terminal device |
CN107820070B (en) * | 2017-10-25 | 2019-05-17 | 长沙云知检信息科技有限公司 | White balance adjustment method |
CN107911683B (en) * | 2017-11-28 | 2019-07-23 | Oppo广东移动通信有限公司 | Image white balancing treatment method, device, storage medium and electronic equipment |
CN108848294B (en) * | 2018-08-15 | 2020-09-04 | 努比亚技术有限公司 | Shooting parameter adjusting method, terminal and computer readable storage medium |
CN109379575B (en) * | 2018-11-28 | 2020-06-30 | 维沃移动通信(杭州)有限公司 | White balance processing method and mobile terminal |
CN112087569B (en) * | 2019-06-12 | 2022-03-04 | 杭州萤石软件有限公司 | Camera and camera starting method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8149323B2 (en) * | 2008-12-18 | 2012-04-03 | Qualcomm Incorporated | System and method to autofocus assisted by autoexposure control |
CN102104709B (en) * | 2009-12-21 | 2013-01-30 | 展讯通信(上海)有限公司 | Method for processing image shot by camera and camera |
JP5234119B2 (en) * | 2011-01-20 | 2013-07-10 | カシオ計算機株式会社 | Imaging apparatus, imaging processing method, and program |
-
2014
- 2014-11-14 CN CN201410647497.6A patent/CN104394392B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104394392A (en) | 2015-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104394392B (en) | A kind of white balance adjusting method, device and terminal | |
CN108470334B (en) | Method and device for collecting screen brightness and chromaticity | |
CN108537155B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
KR102149187B1 (en) | Electronic device and control method of the same | |
US20160094770A1 (en) | Image Processing Method and Apparatus, and Terminal | |
CN107566827B (en) | Shoot Delay computing method, device and equipment | |
DE102019106252A1 (en) | Method and system for light source estimation for image processing | |
CN104883504B (en) | Open the method and device of high dynamic range HDR functions on intelligent terminal | |
CN104754211B (en) | Image processing apparatus and image processing method | |
CN105389809B (en) | Display performance testing method, system and device | |
CN107635098A (en) | High dynamic range images noise remove method, apparatus and equipment | |
CN104793742B (en) | Shooting preview method and device | |
CN106101561A (en) | Camera focusing detection method and device | |
CN107277479A (en) | White balancing treatment method and device | |
US20220174222A1 (en) | Method for marking focused pixel, electronic device, storage medium, and chip | |
CN110049240B (en) | Camera control method and device, electronic equipment and computer readable storage medium | |
CN105262948A (en) | Panorama capturing method and mobile terminal | |
CN105376490A (en) | Mode switching method, mode switching apparatus and terminal device using mode switching method | |
CN111310727A (en) | Object detection method and device, storage medium and electronic device | |
CN109035183A (en) | A kind of luminance regulating method, device and electronic equipment | |
CN106815803A (en) | The processing method and processing device of picture | |
CN103716529A (en) | Threshold setting device, object detection device, and threshold setting method | |
CN107077623A (en) | Image quality compensation system and method | |
CN109196857A (en) | Image-forming component and photographic device | |
CN112446254A (en) | Face tracking method and related device |
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. |