CN106878695A - Method, device and computer equipment that white balance is processed - Google Patents

Method, device and computer equipment that white balance is processed Download PDF

Info

Publication number
CN106878695A
CN106878695A CN201710077011.3A CN201710077011A CN106878695A CN 106878695 A CN106878695 A CN 106878695A CN 201710077011 A CN201710077011 A CN 201710077011A CN 106878695 A CN106878695 A CN 106878695A
Authority
CN
China
Prior art keywords
white balance
reference zone
region
human face
face region
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.)
Pending
Application number
CN201710077011.3A
Other languages
Chinese (zh)
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 CN201710077011.3A priority Critical patent/CN106878695A/en
Publication of CN106878695A publication Critical patent/CN106878695A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)

Abstract

Method, device and computer equipment the present invention relates to a kind for the treatment of of white balance.Methods described includes:Recognition of face is carried out to image, human face region and the background area in addition to the human face region is recognized;Reference zone is obtained from the human face region, wherein, the reference zone is the white portion in material object;White balance treatment is carried out to whole image according to the reference zone;Or, white balance treatment is carried out to the human face region according to the reference zone;White balance treatment is carried out to the region in addition to human face region according to the background area.The embodiment of the present invention can carry out white balance treatment to image according to particular reference region in image human face region, and then improve the degree of accuracy of white balance, lift Consumer's Experience.

Description

Method, device and computer equipment that white balance is processed
Technical field
The present invention relates to image processing techniques, the more particularly to method of white balance treatment, device and computer equipment.
Background technology
Colour temperature (Color Temperature) is the yardstick for representing that light source is photochromic, and unit is K (Kelvin).Human eye is in office Being white is all differentiated to most bright object under what colour temperature.And the photo that camera is taken under different-colour shows as different colors, As the photo under D65 light sources is partially blue, and the photo under A light is partially yellow.Indoor light source is often more complicated, whether incandescent lamp, Fluorescence lamp color temperature is not very standard.So indoors shoot portrait frequently can lead to personage skin tone it is abnormal, partially It is yellow or partially blue.
With the development of image processing techniques, requirement more and more higher of the people to image generally carries out the later stage excellent to image Change so that picture obtains more preferable visual effect.AWB (Automatic White Balance, AWB) is used extensively In the treatment of the portrait pictures comprising face.The essence of white balance (White Balance, WB) is to allow white object any All shown as white under the light source of color.White balance makes the color of the image shot become seen by person by colour correction Odd colors.From the photo referred to as original image that sensitive chip reads out, AWB color school is carried out to original image Just, white balance effect is reached.
But in some scenarios, the effect of AWB still has differences with odd colors seen by person, meeting There is the problem of color offset, Consumer's Experience is not good.
The content of the invention
The embodiment of the present invention provides a kind of method of white balance treatment, device and computer equipment, can be more accurate right Image carries out white balance adjusting, improves user experience.
A kind of method of white balance treatment, including:
Recognition of face is carried out to image, human face region and the background area in addition to the human face region is recognized;
Reference zone is obtained from the human face region, wherein, the reference zone is the white portion in material object;
White balance treatment is carried out to whole image according to the reference zone;Or, according to the reference zone to described Human face region carries out white balance treatment;The region in addition to human face region is carried out at white balance according to the background area Reason.
A kind of device of white balance treatment, including:
Face recognition module, for recognizing human face region and the background area in addition to human face region;
Acquisition module, for obtaining reference zone in the human face region, wherein, during the reference zone is material object White portion;
White balance processing module, for carrying out white balance treatment to whole image according to the reference zone;Or, according to The reference zone human face region is carried out white balance treatment and according to the background area to it is described except human face region with Outer region carries out white balance treatment.
A kind of computer equipment, including memory, processor and storage can run on a memory and on a processor Computer program, following steps are realized during the computing device described program:
Recognition of face is carried out to image, human face region and the background area in addition to human face region is obtained;
Reference zone is obtained in the human face region, wherein, reference zone reflexes to the light of human eye described in material object Ratio with blue, green, the red three kinds of coloured light in certain brightness and the light is identical;
White balance treatment is carried out to whole image according to the reference zone;Or, according to the reference zone to described Human face region carries out white balance treatment;Background area is determined according to the human face region, the background area is except the face Region beyond region;White balance treatment is carried out to the region in addition to human face region according to the background area.
, relative to traditional auto white balance method, the embodiment of the present invention can be according to figure for the method for above-mentioned white balance treatment As particular reference region carries out white balance treatment to image in human face region, and then the degree of accuracy of white balance is improved, lift user Experience.
Brief description of the drawings
Fig. 1 is the internal structure schematic diagram of terminal in one embodiment;
Fig. 2 is the flow chart of the method for white balance treatment in one embodiment;
Fig. 3 is the flow chart of the method for white balance treatment in another embodiment;
Fig. 4 be one embodiment in the human face region obtain reference zone flow chart;
Fig. 5 is to carry out the flow chart of white balance treatment to image according to the reference zone in one embodiment;
Fig. 6 is to carry out the flow chart of white balance treatment to image according to the background area in one embodiment;
Fig. 7 is the structural framing figure of the device of white balance treatment in one embodiment;
Fig. 8 is the structural framing figure of acquisition module in the device of white balance treatment in one embodiment;
Fig. 9 is the structural framing figure of white balance processing module in the device of white balance treatment in one embodiment;
Figure 10 is the flow chart of the step of being realized when one embodiment Computer device handler performs computer program.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe various elements herein, But these elements should not be limited by these terms.These terms are only used for distinguishing first element and another element.Citing comes Say, without departing from the scope of the invention, the first statistic unit can be referred to as the second statistic unit, and similarly, Second statistic unit can be referred to as the first statistic unit.First statistic unit and the second statistic unit both statistic unit, But it is not same statistic unit.
Fig. 1 is the internal structure schematic diagram of terminal in one embodiment.As shown in figure 1, the terminal is including total by system The processor 101 of line connection, non-volatile memory medium 102, built-in storage 103, network interface 104, display screen 105, shooting First 106, imageing sensor 107.Wherein, the non-volatile memory medium of terminal is stored with operating system, also including a kind of white flat Weigh the device 108 for processing, and the device 108 of white balance treatment is used to realize a kind of white balancing treatment method.The processor 101 is used Calculated and control ability in providing, support the operation of whole terminal.Can store computer in built-in storage 103 in terminal can Reading instruction, when the computer-readable instruction is performed by the processor 101, may be such that the processor 101 is performed a kind of white flat Weighing apparatus processing method.Network interface 104 is used to carry out network service with server, data access request of such as transmitting news to service Device, news data that the reception server is returned etc..The display screen 105 of terminal can be that LCDs or electric ink show Screen etc..The terminal can be mobile phone, panel computer, digital camera etc..It will be understood by those skilled in the art that shown in Fig. 1 Structure, only the block diagram of the part-structure related to application scheme, does not constitute and application scheme is applied thereon Terminal restriction, specific terminal can include than more or less part shown in figure, or combine some parts, or There are person different parts to arrange.
As shown in Fig. 2 in one embodiment, there is provided a kind of method of white balance treatment, the present embodiment is in this way The terminal in above-mentioned Fig. 1 is applied to illustrate.The method specifically includes following steps:
Step 202, recognition of face is carried out to image, obtains human face region and the background area in addition to human face region.
Region division is carried out to pending image, human face region, image can be recognized by various face recognition algorithms In region in addition to human face region be defined as background area.
Face identification method can be based on principal component analysis (principal component analysis, abbreviation PCA) Face identification method, from the viewpoint of statistics, find the basic element of facial image distribution, i.e. facial image sample set covariance The characteristic vector of matrix, facial image is approx characterized with this.These characteristic vectors are referred to as eigenface (Eigenface).Face Recognition methods can also carry out Face Detection come locating human face by color analysis, and one is set up using the color characteristics of skin of face Individual new color coordinates system, the positioning to face is realized by isolating the colour of skin from image.Face identification method can be with It is deforming template class method, contouring head is approx represented with ellipse, by iteration refinement.Face identification method can also be to adopt Use Adaboost algorithm.Preferably, dynamic thresholding can be used in Adaboost algorithm, the speed of recognition of face is further speeded up Degree.Face recognition algorithms can also quickly recognize the algorithm of human face region using other, to face in the embodiment of the present invention Recognizer is not especially limited.
Further, recognition of face is carried out to image, human face region and the background area in addition to human face region is obtained Can include:Recognition of face is carried out to the image with face, the corresponding rectangle frame of face is determined;Face is extracted in rectangle frame Profile;Using facial contour as the human face region, other regions in image are used as background area.Wherein, in rectangle frame Extracting facial contour can be extracted using active shape model or active appearance models to facial contour.
Step 204, reference zone is obtained in the human face region, wherein, the reference zone is the white in material object Region.
By the reference zone in face recognition algorithms locating human face region.Reference zone can be understood as in material object, people White portion seen by eye, or can be understood as the white portion in the true man's face seen by eyes.Because white refers to The light in human eye is reflexed to by blue, green, red three kinds of coloured light ratios are identical and anti-with the vision that certain brightness is formed Should, the white in material object does not contain the brightness of hue component.Reference zone can be the white of the eye region of eyes, or tooth Region.
Step 206, white balance treatment is carried out according to the reference zone to whole image.
RGB RGB vectors according to reference zone (white of the eye region or tooth regions) are carried out at white balance to whole image Reason.
In one embodiment, with reference to Fig. 3, it is also possible to step 208 come instead of step 206.Step 208, according to described Reference zone carries out white balance treatment to the human face region;According to the background area to the area in addition to human face region Domain carries out white balance treatment.It is, the color vector according to the reference zone is carried out at white balance to the human face region Reason;Meanwhile, the color vector according to the background area carries out white balance treatment to the region in addition to human face region.
AWB treatment, this hair are carried out to entire image relative to traditional color vector according to entire image The method of white balance treatment in bright embodiment, by recognition of face, recognizes human face region and the background area in addition to human face region, At the same time it can also orient reference zone in human face region, whole image is carried out according to specific reference zone automatic white Balance Treatment, or AWB treatment is carried out to human face region according to specific reference zone, and according to background area White balance treatment is carried out to going out the region outside human face region in entire image, and then improve the degree of accuracy of white balance, lift user Experience.
In one embodiment, with reference to Fig. 4, step 204 obtains reference zone from the human face region, including:
Step 402, eye areas are positioned in the human face region.
After identifying human face region according to face identification method, the eyes in human face region are identified or position. The identification of human eye has edge feature analytic approach, Hough transform method and deforming template method etc..The identification of human eye can also use intermediate value After filtering and histogram equalizing method remove noise and illumination to the influence of image, image is done integral projection to narrow down to face Ocular, try again horizontal integral projection in the eyebrow and eye regions for obtaining, and finds the upright position of two.Finally utilize Human eye template carries out the matching degree highest part human eye area as to be positioned along the vertical direction.The embodiment of the present invention In eye recognition method is not especially limited.
Step 404, white of the eye region is extracted from the eye areas and the white of the eye region is defined for reference zone.
Eye areas are positioned or recognized according to step 402.Eye areas include the white of the eye, pupil, part eyelid, from eyes area White of the eye region is extracted in domain, and white of the eye region is defined as reference zone.
Under normal circumstances, the white of the eye of human eye is white.For from Color constitut, it is believed that white of the eye part is red green The ratio of blue RGB color component is 1:1:1.White of the eye region is defined as reference zone, by reference zone RGB RGB color point Amount is reduced to the color of the human eye white of the eye under normal circumstances, and then realizes carrying out human face region or view picture figure at automatic white flat place Reason.
When extracting white of the eye region, the brightness histogram of eye areas is individually calculated, white of the eye area is positioned according to brightness histogram Domain.
In one embodiment, white of the eye region is extracted from the eye areas and the white of the eye region is defined for reference area The step of domain, specifically includes:
Obtain the brightness value of each pixel of the eye areas;Each pixel according to the eye areas it is bright Angle value obtains the luminance mean value of the eye areas;White of the eye region is extracted, pixel brightness is more than brightness in choosing eye areas The region of average is defined as white of the eye region, it is, the brightness of the pixel in the white of the eye region is more than luminance mean value.
In one embodiment, step 204, reference zone is obtained in the human face region, can also be:
In the human face region, position and extract tooth regions and define the tooth regions for reference zone.According to people After face recognition method identifies human face region, the tooth in human face region is identified or positions.
Under normal circumstances, tooth is also white.For from Color constitut, it is believed that dental part RGB The ratio of RGB color component is 1:1:1.Tooth regions are defined as reference zone, by reference zone RGB RGB color component The color of the human eye white of the eye under normal circumstances is reduced to, and then realizes carrying out human face region or view picture figure automatic white flat treatment.
In one embodiment, by the method for recognition of face in image, while white of the eye region and tooth regions are identified, Priority definition white of the eye region is reference zone, is that reference pair entire image or human face region are carried out at white balance with white of the eye region Reason.In one embodiment, the weight of white of the eye region and tooth regions RGB RGB color vector can also be considered, it is fixed Ocular prosthesis white region and tooth regions are reference zone, and then carry out white balance treatment to entire image or human face region.
In one embodiment, with reference to Fig. 5, step 206 is carried out at white balance according to the reference zone to whole image Reason, including:
Step 502, the RGB RGB color component average or maximum of statistical-reference region all pixels point.
Lift the color component of reference zone all pixels point, the color of each pixel is blue by red Red, green Green Blue tri- primary components are represented.RGB RGB color component to reference zone all pixels point is averaged, and is joined The RGB RGB color component average in examination district domainOr, choose the red green of reference zone all pixels point The maximum of blue RGB color component, obtains the RGB RGB color component maximum (R of reference zonemax、Gmax、Bmax)。
Step 504, according to the RGB RGB color component average or the school of the red R passages of maximum value calculation and blue channel B Positive regulating factor.
The data of white balance treatment input are the bivector of (red, blue), and color on the basis of green is white flat without participating in Weighing apparatus.
In an example, according to the corresponding RGB RGB color component average of reference zoneCalculate The correction regulatory factor of red R passages and blue channel B.Wherein, red R channel correctings regulatory factor KRFor green channel components average divided by The quotient of all red R channel components R of reference zone.Blue channel B correction regulatory factor KBIt is green channel components average divided by reference The quotient of all blue channel B component B in region.
In an example, according to the corresponding RGB RGB color component maximum (R of reference zonemax、Gmax、Bmax) meter Calculate the correction regulatory factor of red R passages and blue channel B.Wherein, red R channel correctings regulatory factor lRIt is green channel components maximum Divided by the quotient of the red passage maximum of the reference zone.Blue channel B correction regulatory factor lBFor green channel components maximum is removed With the quotient of the reference zone blue channel maximum.
Step 506, the correction regulatory factor according to the red R passages and blue channel B is carried out at white balance to whole image Reason.
The red R passages and the correction regulatory factor of blue channel B that step 504 is calculated are brought into corresponding white balance treatment mould In type, realization carries out white balance treatment to entire image or human face region, and realization quickly carries out white balance to human face region, improves White balance efficiency.
In other embodiments, when white balance treatment is carried out to whole image according to the reference zone, at its white balance Reason method can also be simple gray world algorithm (GW) and full perfection reflection algorithm (PR) Orthogonal Composite algorithm (QCGP), standard The gray world algorithm (SDWGW) of difference weighting, luminance weighted gray world algorithm (LWGW), the standard deviation brightness/gray scale world calculate Method (SDLWGW) and luminance weighted gray world algorithm and complete perfect reflection algorithm (PR) Orthogonal Composite algorithm (QCLWG P) etc. Deng.
In one embodiment, step 208, white balance treatment is carried out according to the reference zone to the human face region; White balance treatment is carried out to the region in addition to human face region according to the background area, including:
According to step 502 to step 506, after carrying out white balance treatment to human face region according to reference zone, further according to the back of the body Scene area carries out white balance treatment to the region in addition to human face region.
Wherein, white balance treatment is carried out to the region in addition to human face region according to the background area, with reference to figure 6, including:
Step 602, counts the RGB RGB color component average or maximum of background area all pixels point.
Lift the color component of background area all pixels point, the color of each pixel is blue by red Red, green Green Blue tri- primary components are represented.RGB RGB color component to background area all pixels point is averaged, and is joined The RGB RGB color component average in examination district domainOr, choose the red green of background area all pixels point The maximum of blue RGB color component, obtains the RGB RGB color component maximum (R of reference zonemax、Gmax、Bmax)。
Step 604, according to the RGB RGB color component average or the school of the red R passages of maximum value calculation and blue channel B Positive regulating factor.
The data of white balance treatment input are the bivector of (red, blue), and color on the basis of green is white flat without participating in Weighing apparatus.
In an example, according to the corresponding RGB RGB color component average of reference zoneCalculate The correction regulatory factor of red R passages and blue channel B.Wherein, red R channel correctings regulatory factor KRFor green channel components average divided by The quotient of all red R channel components R of reference zone.Blue channel B correction regulatory factor KBIt is green channel components average divided by reference The quotient of all blue channel B component B in region.
In an example, according to the corresponding RGB RGB color component maximum (R of reference zonemax、Gmax、Bmax) meter Calculate the correction regulatory factor of red R passages and blue channel B.Wherein, red R channel correctings regulatory factor lRIt is green channel components maximum Divided by the quotient of the red passage maximum of the reference zone.Blue channel B correction regulatory factor lBFor green channel components maximum is removed With the quotient of the reference zone blue channel maximum.
Step 606, the correction regulatory factor according to the red R passages and blue channel B carries out white flat to background area image Weighing apparatus treatment.
The corresponding red R passages in background area and the correction regulatory factor of blue channel B that step 604 is calculated are brought into accordingly White balance treatment model in, realization carries out white balance treatment to background area, realize it is quick in image in addition to human face region Hair, environment carry out white balance, improve the degree of accuracy of white balance, reduce the difference of image and real scene, can be more accurate True carries out white balance treatment, lifts Consumer's Experience.
Fig. 7 is the structured flowchart of the device of white balance treatment in one embodiment.As shown in figure 8, a kind of white balance treatment Device, including:
Face recognition module 710, for recognizing human face region and the background area in addition to human face region;
Acquisition module 720, for obtaining reference zone in the human face region, wherein, the reference zone is material object In white portion;
White balance processing module 730, for carrying out white balance treatment to whole image according to the reference zone;Or, According to the reference zone human face region is carried out white balance treatment and according to the background area to described except face area Region beyond domain carries out white balance treatment.
The device of above-mentioned white balance treatment, when white balance treatment is carried out to image, can be carried out to the face in image Identification, recognizes human face region and the background area in addition to human face region.Reference zone, root are obtained in the human face region White balance treatment is carried out to whole image according to the reference zone.Or, the human face region is entered according to the reference zone The treatment of row white balance;White balance treatment is carried out to the region in addition to human face region according to the background area.The present invention Embodiment carries out white balance treatment to image according to particular reference region in image human face region, and then improves the accurate of white balance Degree, lifts Consumer's Experience.
In one embodiment, face recognition module 710 can carry out region division to pending image, can pass through Various face recognition algorithms, recognize human face region, and the region in image in addition to human face region is defined as background area.Face is known Other module 710 can be based on the recognition of face side of principal component analysis (principal component analysis, abbreviation PCA) Method, from statistics viewpoint, find facial image distribution basic element, i.e., the feature of facial image sample set covariance matrix to Amount, facial image is approx characterized with this.Face recognition module 710 can also carry out Face Detection to position by color analysis Face, a new color coordinates system is set up using the color characteristics of skin of face, and the colour of skin is isolated come real by from image Now to the positioning of face.Face recognition module 710 can also be deforming template class method, and head wheel is approx represented with ellipse Exterior feature, by iteration refinement.Face recognition module 710 can also quickly recognize the algorithm of human face region, this hair using other Face recognition algorithms are not especially limited in bright embodiment.
In one embodiment, acquisition module 720 can obtain reference zone from face recognition module 710.Reference area Domain can be the white of the eye region of eyes, or tooth regions.Reference zone can be understood as in material object seen by human eye White portion, or can be understood as the white portion in the true man's face seen by eyes.Because white refers to reflex to human eye In light by blue, green, red three kinds of coloured light ratios are identical and vision response that formed with certain brightness, in material object White does not contain the brightness of hue component.
In one embodiment, with reference to Fig. 8, the acquisition module 720 includes positioning unit 721 and extraction unit 723.Its In, positioning unit 721, for eye areas or tooth regions in locating human face region.Extraction unit 723, for extracting State white of the eye region in eye areas or for extracting the tooth regions.
By positioning unit 721 and extraction unit 723, eye areas or tooth regions can be recognized from human face region, Reference zone can be extracted from eye areas or tooth regions by extraction unit 723 again, wherein, reference zone can be the white of the eye Region, or tooth regions.
In one embodiment, acquisition module 720 also includes computing unit 725 and chooses unit 727.Wherein, calculate single Unit 725, the luminance mean value of the eye areas is obtained for calculating the brightness value of each pixel of the eye areas.Choose Unit 727, for choosing pixel of the eye areas brightness more than the luminance mean value, the collection of the pixel of selection is combined into the white of the eye Region.
During the white of the eye is extracted, the brightness histogram of eye areas is calculated by computing unit 725.It is straight according to brightness Fang Tu, obtains the luminance mean value of eye areas.By choosing unit 727, choose eye areas brightness and be more than the luminance mean value Pixel, the collection of the pixel of selection is combined into white of the eye region.
In one embodiment, with reference to Fig. 9, the white balance processing module 730 includes the first statistic unit 731, first Gain correction factor acquiring unit 732 and first corrects unit 733.Wherein, the first statistic unit 731, for statistical-reference area The RGB RGB color component average or maximum of domain all pixels point.First gain correction factor acquiring unit 732, is used for Correction regulation according to the reference zone RGB RGB color component average or the red R passages of maximum value calculation and blue channel B because Son.First correction unit 733, for the correction regulatory factor according to the red R passages of the reference zone and blue channel B to whole figure As carrying out white balance treatment.First correction unit 733 is according to the first gain correction factor acquiring unit 732, the reference area of acquisition The correction regulatory factor of the corresponding red R passages in domain and blue channel B, realization is carried out at white balance to entire image or human face region Reason, realizes quickly carrying out human face region white balance, improves white balance efficiency.
In one embodiment, the white balance processing module 730 also includes the second statistic unit 736, the second gain school Positive divisor acquiring unit 737 and second corrects unit 738.Wherein, the second statistic unit 736, owns for counting background area The RGB RGB color component average or maximum of pixel.Second gain correction factor acquiring unit 737, for according to institute State the correction regulation of the corresponding RGB RGB color component average in background area or the red R passages of maximum value calculation and blue channel B because Son.Second correction unit 738, for the correction regulatory factor pair according to the corresponding red R passages in the background area and blue channel B Background area image carries out white balance treatment.Second correction unit 738 is obtained according to the second gain correction factor acquiring unit 737 The red R passages in background area and blue channel B correction regulatory factor, white balance treatment is carried out to background area, it is quick right to realize Hair, environment in image in addition to human face region carry out white balance, improve the degree of accuracy of white balance, reduce image with true field The difference of scape, can more accurately carry out white balance treatment, lift Consumer's Experience.
The division of modules is only used for for example, in other embodiments in the device of above-mentioned white balance treatment, can The device of white balance treatment is divided into different modules as required, with complete the device that above-mentioned white balance is processed whole or Partial function.
Figure 10 is the flow chart of the step of being realized when one embodiment Computer device handler performs computer program. As shown in Figure 10, a kind of computer equipment, including memory, processor and storage can run on a memory and on a processor Computer program (instruction), realize following steps during computing device program:
Step 1002, recognition of face is carried out to image, obtains human face region and the background area in addition to human face region.
Region division is carried out to pending image, human face region, image can be recognized by various face recognition algorithms In region in addition to human face region be defined as background area.
Face identification method can be based on principal component analysis (principal component analysis, abbreviation PCA) Face identification method, from the viewpoint of statistics, find the basic element of facial image distribution, i.e. facial image sample set covariance The characteristic vector of matrix, facial image is approx characterized with this.These characteristic vectors are referred to as eigenface (Eigenface).Face Recognition methods can also carry out Face Detection come locating human face by color analysis, and one is set up using the color characteristics of skin of face Individual new color coordinates system, the positioning to face is realized by isolating the colour of skin from image.Face identification method can be with It is deforming template class method, contouring head is approx represented with ellipse, by iteration refinement.Face identification method can also be to adopt Use Adaboost algorithm.Preferably, dynamic thresholding can be used in Adaboost algorithm, the speed of recognition of face is further speeded up Degree.Face recognition algorithms can also quickly recognize the algorithm of human face region using other, to face in the embodiment of the present invention Recognizer is not especially limited.
Further, recognition of face is carried out to image, human face region and the background area in addition to human face region is obtained Can include:Recognition of face is carried out to the image with face, the corresponding rectangle frame of face is determined;Face is extracted in rectangle frame Profile;Using facial contour as the human face region, other regions in image are used as background area.Wherein, in rectangle frame Extracting facial contour can be extracted using active shape model or active appearance models to facial contour.
Step 1004, reference zone is obtained in the human face region, wherein, the reference zone in material object is reflexed to The light of human eye has the ratio of blue, green, the red three kinds of coloured light in certain brightness and the light identical.
By the reference zone in face recognition algorithms locating human face region.Reference zone can be the white of the eye area of eyes Domain, or tooth regions.Reference zone can be understood as the white portion seen by human eye in material object, or can be understood as The white portion in true man's face seen by eyes.Because white refers to reflex to light in human eye due to blue, green, red three Kind of coloured light ratio is identical and vision response that formed with certain brightness, and the white in material object does not contain the bright of hue component Degree.
Step 1006, white balance treatment is carried out according to the reference zone to whole image.Or according to the reference zone White balance treatment is carried out to the human face region;The region in addition to human face region is carried out according to the background area white Balance Treatment.
RGB RGB vectors according to reference zone (white of the eye region or tooth regions) are carried out at white balance to whole image Reason.Or, the color vector according to the reference zone carries out white balance treatment to the human face region;Meanwhile, according to described The color vector of background area carries out white balance treatment to the region in addition to human face region.
Processor, by recognition of face, recognizes human face region and except face in configuration processor in above computer equipment Background area outside region, at the same time it can also orient reference zone in human face region, according to specific reference zone to whole Individual image carries out AWB treatment, or carries out AWB treatment to human face region according to specific reference zone, And white balance treatment is carried out to going out the region outside human face region in entire image according to background area, and then improve white balance The degree of accuracy, lifts Consumer's Experience.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, can be The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can read In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses several embodiments of the invention, and its description is more specific and detailed, but simultaneously Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Shield scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (13)

1. a kind of method that white balance is processed, it is characterised in that including:
Recognition of face is carried out to image, human face region and the background area in addition to the human face region is recognized;
Reference zone is obtained from the human face region, wherein, the reference zone is the white portion in material object;
White balance treatment is carried out to whole image according to the reference zone;Or, according to the reference zone to the face Region carries out white balance treatment;White balance treatment is carried out to the region in addition to human face region according to the background area.
2. the method that white balance according to claim 1 is processed, it is characterised in that described to be obtained from the human face region Reference zone, including:
Eye areas are positioned in the human face region;
White of the eye region is extracted from the eye areas and the white of the eye region is defined for reference zone.
3. the method that white balance according to claim 2 is processed, it is characterised in that extract the white of the eye from the eye areas Region simultaneously defines the white of the eye region for reference zone, including:
Obtain the brightness value of each pixel of the eye areas;
The brightness value of each pixel according to the eye areas obtains the luminance mean value of the eye areas;
White of the eye region is extracted, the brightness of the pixel in the white of the eye region is more than the luminance mean value.
4. the method that white balance according to claim 1 is processed, it is characterised in that according to the reference zone to whole figure As carrying out white balance treatment, including:
Count the RGB RGB color component average or maximum of the reference zone all pixels point;
Correction according to the reference zone RGB RGB color component average or the red R passages of maximum value calculation and blue channel B is adjusted The section factor;
Correction regulatory factor according to the red R passages of the reference zone and blue channel B carries out white balance treatment to whole image.
5. the method that white balance according to claim 4 is processed, it is characterised in that the red R passages of calculating and blue channel B Correction regulatory factor, including:
The green channel components average is respectively divided by all red R channel components of the reference zone, blue channel B component to deserved To red R passages, the correction regulatory factor of blue channel B;Or
The green channel components maximum is respectively divided by the red passage maximum of the reference zone, blue channel maximum to deserved To red R passages, the correction regulatory factor of blue channel B.
6. the method for white balance according to claim 1 treatment, it is characterised in that it is described according to the background area to removing Region beyond human face region carries out white balance treatment, including:
Count the RGB RGB color component average or maximum of the background area all pixels point;
Correction according to the background area RGB RGB color component average or the red R passages of maximum value calculation and blue channel B is adjusted The section factor;
The correction regulatory factor of red R passages and blue channel B is carried out at white balance to background area image according to background area Reason.
7. the method that white balance according to claim 1 is processed, it is characterised in that described to be obtained in the human face region Reference zone, including:
In the human face region, position and extract tooth regions and define the tooth regions for reference zone.
8. the device that a kind of white balance is processed, it is characterised in that including:
Face recognition module, for recognizing human face region and the background area in addition to human face region;
Acquisition module, for obtaining reference zone in the human face region, wherein, the reference zone is the white in material object Region;
White balance processing module, for carrying out white balance treatment to whole image according to the reference zone;Or, according to described Reference zone the human face region is carried out white balance treatment and according to the background area to described in addition to human face region Region carries out white balance treatment.
9. the device that white balance according to claim 8 is processed, it is characterised in that the acquisition module includes:
Positioning unit, for eye areas or tooth regions in locating human face region;
Extraction unit, for extracting the white of the eye region in the eye areas or for extracting the tooth regions.
10. the device that white balance according to claim 8 is processed, it is characterised in that the acquisition module also includes:
Computing unit, the brightness of the brightness value acquisition eye areas of each pixel for calculating the eye areas is equal Value;
Unit is chosen, for choosing pixel of the eye areas brightness more than the luminance mean value, the set of the pixel of selection It is white of the eye region.
The device of 11. white balance treatment according to claim 9, it is characterised in that the processing module includes:
First statistic unit, for the RGB RGB color component average or maximum of statistical-reference region all pixels point;
First gain correction factor acquiring unit, for the RGB RGB color component average according to the reference zone or most Big value calculates the correction regulatory factor of red R passages and blue channel B;
First correction unit, for according to the correction regulatory factor of the red R passages of the reference zone and blue channel B to whole image Carry out white balance treatment.
The device of 12. white balance treatment according to claim 8, it is characterised in that the processing module also includes:
Second statistic unit, RGB RGB color component average or maximum for counting background area all pixels point;
Second gain correction factor acquiring unit, for according to the background area RGB RGB color component average or maximum Value calculates the correction regulatory factor of red R passages and blue channel B;
Second correction unit, for according to the correction regulatory factor of the red R passages in the background area and blue channel B to background area Image carries out white balance treatment.
A kind of 13. computer equipments, including memory, processor and the meter that store on a memory and can run on a processor Calculation machine program, following steps are realized during the computing device described program:
Recognition of face is carried out to image, human face region and the background area in addition to human face region is obtained;
Reference zone is obtained in the human face region, wherein, the light that reference zone described in material object reflexes to human eye has The ratio of blue, green, the red three kinds of coloured light in certain brightness and the light is identical;
White balance treatment is carried out to whole image according to the reference zone;Or, according to the reference zone to the face Region carries out white balance treatment;Background area is determined according to the human face region, the background area is except the human face region Region in addition;White balance treatment is carried out to the region in addition to human face region according to the background area.
CN201710077011.3A 2017-02-13 2017-02-13 Method, device and computer equipment that white balance is processed Pending CN106878695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710077011.3A CN106878695A (en) 2017-02-13 2017-02-13 Method, device and computer equipment that white balance is processed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710077011.3A CN106878695A (en) 2017-02-13 2017-02-13 Method, device and computer equipment that white balance is processed

Publications (1)

Publication Number Publication Date
CN106878695A true CN106878695A (en) 2017-06-20

Family

ID=59166111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710077011.3A Pending CN106878695A (en) 2017-02-13 2017-02-13 Method, device and computer equipment that white balance is processed

Country Status (1)

Country Link
CN (1) CN106878695A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277481A (en) * 2017-07-14 2017-10-20 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN107483906A (en) * 2017-07-25 2017-12-15 广东欧珀移动通信有限公司 White balancing treatment method, device and the terminal device of image
CN107635124A (en) * 2017-10-31 2018-01-26 广东欧珀移动通信有限公司 White balancing treatment method, device and the equipment of face shooting
CN107690065A (en) * 2017-07-31 2018-02-13 努比亚技术有限公司 A kind of white balance correcting, device and computer-readable recording medium
CN107730446A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Image processing method, device, computer equipment and computer-readable recording medium
CN107995418A (en) * 2017-11-21 2018-05-04 维沃移动通信有限公司 A kind of image pickup method, device and mobile terminal
CN108024107A (en) * 2017-12-06 2018-05-11 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN108182667A (en) * 2017-12-29 2018-06-19 努比亚技术有限公司 A kind of image optimization method, terminal and computer readable storage medium
CN108376404A (en) * 2018-02-11 2018-08-07 广东欧珀移动通信有限公司 Image processing method and device, electronic equipment, storage medium
CN108960382A (en) * 2018-05-07 2018-12-07 广东数相智能科技有限公司 A kind of colour barcode and its color calibration method
CN109495731A (en) * 2017-09-13 2019-03-19 三星电子株式会社 Auto white balance method is used for by what image-signal processor executed
CN109561291A (en) * 2018-10-23 2019-04-02 Oppo广东移动通信有限公司 Color temperature compensating method, device, storage medium and mobile terminal
CN109753899A (en) * 2018-12-21 2019-05-14 普联技术有限公司 A kind of face identification method, system and equipment
CN110570476A (en) * 2018-06-06 2019-12-13 英属开曼群岛商玩美股份有限公司 System, method and storage medium for execution on computing device
CN111754906A (en) * 2020-06-30 2020-10-09 上海天马微电子有限公司 Method for detecting brightness uniformity of curved surface display screen
CN114143526A (en) * 2021-11-19 2022-03-04 昆山丘钛光电科技有限公司 Image processing method and device, terminal equipment and readable storage medium
CN115118947A (en) * 2021-03-23 2022-09-27 北京小米移动软件有限公司 Image processing method and device, electronic equipment and storage medium
CN116915964A (en) * 2023-09-13 2023-10-20 北京智芯微电子科技有限公司 Gray world white balance correction method, device, equipment, chip and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885952A (en) * 2005-06-20 2006-12-27 佳能株式会社 Image sensing apparatus and image processing method
JP2008182369A (en) * 2007-01-23 2008-08-07 Funai Electric Co Ltd Imaging device
JP2008182368A (en) * 2007-01-23 2008-08-07 Funai Electric Co Ltd Imaging device
CN101272505A (en) * 2007-03-19 2008-09-24 株式会社理光 Pick-up device and pick-up method
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN101753815A (en) * 2008-12-03 2010-06-23 索尼株式会社 Imaging apparatus
CN103686114A (en) * 2012-09-10 2014-03-26 索尼公司 Image processing apparatus, method, and program
CN105187810A (en) * 2014-11-11 2015-12-23 怀效宁 Automatic white balance method based on face color features and electronic media device
CN105282530A (en) * 2014-05-28 2016-01-27 深圳中兴力维技术有限公司 Method and device for implementing automatic white balance based on background modeling
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885952A (en) * 2005-06-20 2006-12-27 佳能株式会社 Image sensing apparatus and image processing method
JP2008182369A (en) * 2007-01-23 2008-08-07 Funai Electric Co Ltd Imaging device
JP2008182368A (en) * 2007-01-23 2008-08-07 Funai Electric Co Ltd Imaging device
CN101272505A (en) * 2007-03-19 2008-09-24 株式会社理光 Pick-up device and pick-up method
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN101753815A (en) * 2008-12-03 2010-06-23 索尼株式会社 Imaging apparatus
CN103686114A (en) * 2012-09-10 2014-03-26 索尼公司 Image processing apparatus, method, and program
CN105282530A (en) * 2014-05-28 2016-01-27 深圳中兴力维技术有限公司 Method and device for implementing automatic white balance based on background modeling
CN105187810A (en) * 2014-11-11 2015-12-23 怀效宁 Automatic white balance method based on face color features and electronic media device
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107277481A (en) * 2017-07-14 2017-10-20 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN107483906A (en) * 2017-07-25 2017-12-15 广东欧珀移动通信有限公司 White balancing treatment method, device and the terminal device of image
US11277595B2 (en) 2017-07-25 2022-03-15 Guangdong Oppo Mobile Telecommunications Corp., Ltd. White balance method for image and terminal device
CN107483906B (en) * 2017-07-25 2019-03-19 Oppo广东移动通信有限公司 White balancing treatment method, device and the terminal device of image
CN107690065A (en) * 2017-07-31 2018-02-13 努比亚技术有限公司 A kind of white balance correcting, device and computer-readable recording medium
CN109495731A (en) * 2017-09-13 2019-03-19 三星电子株式会社 Auto white balance method is used for by what image-signal processor executed
CN109495731B (en) * 2017-09-13 2022-06-17 三星电子株式会社 Method for automatic white balance executed by image signal processor
US11503262B2 (en) 2017-09-13 2022-11-15 Samsung Electronics Co., Ltd. Image processing method and device for auto white balance
CN107730446A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Image processing method, device, computer equipment and computer-readable recording medium
CN107635124A (en) * 2017-10-31 2018-01-26 广东欧珀移动通信有限公司 White balancing treatment method, device and the equipment of face shooting
CN107730446B (en) * 2017-10-31 2022-02-18 Oppo广东移动通信有限公司 Image processing method, image processing device, computer equipment and computer readable storage medium
CN107995418A (en) * 2017-11-21 2018-05-04 维沃移动通信有限公司 A kind of image pickup method, device and mobile terminal
CN108024107A (en) * 2017-12-06 2018-05-11 广东欧珀移动通信有限公司 Image processing method, device, electronic equipment and computer-readable recording medium
CN108182667A (en) * 2017-12-29 2018-06-19 努比亚技术有限公司 A kind of image optimization method, terminal and computer readable storage medium
CN108182667B (en) * 2017-12-29 2020-07-17 珠海大横琴科技发展有限公司 Image optimization method, terminal and computer readable storage medium
CN108376404A (en) * 2018-02-11 2018-08-07 广东欧珀移动通信有限公司 Image processing method and device, electronic equipment, storage medium
CN108960382A (en) * 2018-05-07 2018-12-07 广东数相智能科技有限公司 A kind of colour barcode and its color calibration method
CN110570476A (en) * 2018-06-06 2019-12-13 英属开曼群岛商玩美股份有限公司 System, method and storage medium for execution on computing device
CN109561291A (en) * 2018-10-23 2019-04-02 Oppo广东移动通信有限公司 Color temperature compensating method, device, storage medium and mobile terminal
CN109753899A (en) * 2018-12-21 2019-05-14 普联技术有限公司 A kind of face identification method, system and equipment
CN111754906A (en) * 2020-06-30 2020-10-09 上海天马微电子有限公司 Method for detecting brightness uniformity of curved surface display screen
CN111754906B (en) * 2020-06-30 2022-09-27 上海天马微电子有限公司 Method for detecting brightness uniformity of curved surface display screen
CN115118947A (en) * 2021-03-23 2022-09-27 北京小米移动软件有限公司 Image processing method and device, electronic equipment and storage medium
CN115118947B (en) * 2021-03-23 2023-11-24 北京小米移动软件有限公司 Image processing method and device, electronic equipment and storage medium
CN114143526A (en) * 2021-11-19 2022-03-04 昆山丘钛光电科技有限公司 Image processing method and device, terminal equipment and readable storage medium
CN116915964A (en) * 2023-09-13 2023-10-20 北京智芯微电子科技有限公司 Gray world white balance correction method, device, equipment, chip and storage medium
CN116915964B (en) * 2023-09-13 2024-01-23 北京智芯微电子科技有限公司 Gray world white balance correction method, device, equipment, chip and storage medium

Similar Documents

Publication Publication Date Title
CN106878695A (en) Method, device and computer equipment that white balance is processed
US20210329208A1 (en) Illuminant estimation referencing facial color features
US10304166B2 (en) Eye beautification under inaccurate localization
EP3338217B1 (en) Feature detection and masking in images based on color distributions
USRE47960E1 (en) Methods and devices of illuminant estimation referencing facial color features for automatic white balance
US8675960B2 (en) Detecting skin tone in images
CN112784773B (en) Image processing method and device, storage medium and terminal
CN105139404B (en) A kind of the license camera and shooting quality detection method of detectable shooting quality
CN107730445A (en) Image processing method, device, storage medium and electronic equipment
US20090220148A1 (en) Automatic red eye artifact reduction for images
CN106326823B (en) Method and system for obtaining head portrait in picture
JP3018914B2 (en) Gradation correction device
US20100008567A1 (en) Pupil color correction device and program
CN107545536A (en) The image processing method and image processing system of a kind of intelligent terminal
CN108022207A (en) Image processing method, device, storage medium and electronic equipment
WO2023273246A1 (en) Facial image processing method and apparatus, and computer-readable storage medium and terminal
CN107454345A (en) White balancing treatment method, device and the terminal device of image
CN103218615B (en) Face judgment method
GB2453891A (en) Pupil color correction device and program
CN106331661A (en) White balance processing method and device
CN107295324A (en) White balancing treatment method, device and terminal device
CN113610723A (en) Image processing method and related device
CN107845076A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN112581564B (en) Image generation method and device, electronic equipment and storage medium
CN115937919A (en) Method, device and equipment for identifying makeup color and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170620