CN107465903B - Image white balance method, device and computer readable storage medium - Google Patents

Image white balance method, device and computer readable storage medium Download PDF

Info

Publication number
CN107465903B
CN107465903B CN201710806529.6A CN201710806529A CN107465903B CN 107465903 B CN107465903 B CN 107465903B CN 201710806529 A CN201710806529 A CN 201710806529A CN 107465903 B CN107465903 B CN 107465903B
Authority
CN
China
Prior art keywords
white balance
image
skin
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.)
Active
Application number
CN201710806529.6A
Other languages
Chinese (zh)
Other versions
CN107465903A (en
Inventor
袁全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710806529.6A priority Critical patent/CN107465903B/en
Publication of CN107465903A publication Critical patent/CN107465903A/en
Application granted granted Critical
Publication of CN107465903B publication Critical patent/CN107465903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

The present invention relates to a kind of image white balance method, device and computer readable storage mediums.The described method includes: obtaining image to be processed and corresponding human face region;The skin area in the human face region is obtained according to colouring information, and skin white balance parameter is obtained according to the skin area;White balance processing is carried out to the image to be processed according to the skin white balance parameter.Above-mentioned image white balance method, device and computer readable storage medium can improve the accuracy of image procossing to avoid the distortion of area of skin color.

Description

Image white balance method, device and computer readable storage medium
Technical field
This application involves field of computer technology, can more particularly to a kind of image white balance method, device and computer Read storage medium.
Background technique
When shooting in complex environment, the influence that the photo come is often highly susceptible to ambient light is taken, so that clapping The photo taken the photograph deviates the original color of object.For example, the color of object can be inclined in the photo of shooting under the irradiation of fluorescent lamp It is green;Under the irradiation of tengsten lamp, the color of object can be partially yellow in the photo of shooting.White balance processing is exactly to the color in picture Correction process is carried out, so that the processing of script color is presented in the object in picture.
The colour cast of different objects may be different in the picture of shooting, in the process for carrying out white balance processing to picture In, it is handled if carrying out unified white balance to entire picture, it is possible to cause the color of partial region to be reduced, partial region Cross-color it is more serious.Since user generally compares the color of care portrait area, picture would generally be detected first In human face region, obtained further according to the colouring information of human face region white balance processing parameter.However in shooting process When carrying out the processing of real-time white balance to picture, since Face datection algorithm comparison is complicated, the delay of Face datection result will lead to Display.If camera lens is moved to the scene of no face from the scene for having face in this way, still it can be shown in no face scene The testing result of face scene.If, will if carrying out white balance processing also according to the human face region in testing result at this time Cause processing result inaccurate.
Summary of the invention
The embodiment of the present invention provides a kind of image white balance method, device and computer readable storage medium, can be improved The accuracy of white balance processing, avoids image fault.
A kind of image white balance method, which comprises
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters;
White balance processing is carried out to the image to be processed according to the skin white balance parameter.
A kind of image white balancing apparatus, described device include:
Region obtains module, for obtaining image to be processed and corresponding human face region;
Parameter acquisition module, for obtaining the skin area in the human face region according to colouring information, and according to described Skin area obtains skin white balance parameter;
Image processing module, for being carried out at white balance according to the skin white balance parameter to the image to be processed Reason.
One or more includes the non-volatile computer readable storage medium storing program for executing of computer program, when the computer program When being executed by one or more processors, so that the processor executes following steps:
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters;
White balance processing is carried out to the image to be processed according to the skin white balance parameter.
A kind of computer equipment, including memory and processor store computer program, the meter in the memory When calculation machine program is executed by the processor, so that the processor executes following steps:
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters;
White balance processing is carried out to the image to be processed according to the skin white balance parameter.
Image white balance method, device and computer readable storage medium provided by the embodiments of the present application obtain figure first Human face region as in, and skin area is extracted according to the colouring information of human face region, then obtained according to the skin area of extraction Take skin white balance parameter.Portrait is usually the region that user compares concern, is carried out in this way by skin white balance parameter white flat Weighing apparatus processing, obtained processing result image more meet the color characteristic of the portrait colour of skin, avoid image fault, improve image procossing Accuracy.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the applied environment figure of image white balance method in one embodiment;
Fig. 2 is the flow chart of image white balance method in one embodiment;
Fig. 3 is the flow chart of image white balance method in another embodiment;
Fig. 4 is the structural schematic diagram of image white balancing apparatus in one embodiment;
Fig. 5 is the structural schematic diagram of image white balancing apparatus in another embodiment;
Fig. 6 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right 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.
Fig. 1 is the applied environment figure of image white balance method in one embodiment.As shown in Figure 1, being wrapped in the application environment Include user terminal 102 and server 104.Wherein, user terminal 102 can be used for sending image processing requests to server 104. After server 104 receives the image processing requests of the transmission of user terminal 102, figure to be processed is obtained according to image processing requests Picture, and detect the human face region in image to be processed.Then skin white balance ginseng is obtained according to the skin area in human face region Number, and white balance processing is carried out to image to be processed according to skin white balance parameter.After last server 104 handles white balance Image to be processed be back to user terminal 102.The image to be processed that server 104 obtains can be stored in server sheet Ground is also possible to send by user terminal 102.It is understood that user terminal 102 is outermost in computer network It encloses, be mainly used for inputting user information and export the electronic equipment of processing result, such as can be PC, movement eventually End, personal digital assistant, wearable electronic etc..Server 104 be for responding service request, while provide calculating service Equipment, such as can be one or multiple stage computers.In other embodiments provided by the present application, the image white balance side The application environment of method can only include user terminal 102 or server 104, i.e., image white balance processing whole process all with It is completed on family terminal 102 or server 104, without the interactive process including user terminal 102 and server 104.
Fig. 2 is the flow chart of image white balance method in one embodiment.As shown in Fig. 2, the image white balance method packet Step 202 is included to step 206.Wherein:
Step 202, image to be processed and corresponding human face region are obtained.
In embodiment provided by the present application, image to be processed refers to the image for needing to carry out white balance processing.White is The light being reflected into human eye is since blue, green, red three kinds of coloured light ratios are identical and it is anti-that there is certain brightness to be formed by vision It answers.White balance processing, which just refers to, adjusts blue, green, red three kinds of color ratios in image, so that script color is presented in objects in images Processing.It is understood that image to be processed is made of several pixels, each pixel has corresponding pixel Value, by the ordered arrangement of the pixel of different pixel values, forms different scene images.Human face region refers to image to be processed Region where the face of middle portrait, generally, due to image to be processed is a two-dimensional pixel matrix, so detect to After handling the human face region in image, position of the human face region in image to be processed can be indicated by way of coordinate It sets.
It obtains image to be processed and can be and obtained from default storage address, be also possible to directly pass through image collecting device It is obtained.Wherein, image collecting device refers to the device of acquisition image.Such as image collecting device can be camera, move The devices such as camera, video camera in dynamic terminal.For example, when image to be processed by acquisition for mobile terminal, user passes through Mobile terminal inputs photographing instruction, and mobile terminal acquires figure to be processed by camera after detecting the photographing instruction Picture.Wherein, photographing instruction can be mobile terminal physical button or contact action triggering, be also possible to phonetic order etc..
Step 204, the skin area in human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters.
In one embodiment, colouring information refers to the relevant parameter for indicating the color of image, such as colouring information It may include the information such as the tone of color, saturation degree, lightness in image.Wherein, the tone of color refers to the angle measurement of color, Its value range is 0 °~360 °, is calculated counterclockwise since red, and red is 0 °, and green is 120 °, and blue is 240°.Saturation degree refers to color close to the degree of spectrum, and general saturation degree is higher, and color is more bright-coloured;Saturation degree is lower, and color is got over It is dim.Lightness then indicates the light levels of color.
Skin area refers to the region where the skin of face.In general, the skin area of face and other regions Color characteristic performance is different.The color of skin area can be substantially distributed in some color gamut, therefore according to people The colouring information in face region can extract skin area.Such as hair zones, face region and skin are contained in human face region The color in skin region, skin and hair and face is often different, can be separated skin area according to colouring information Out.
Specifically, the region of colouring information within a preset range in human face region is extracted, as the skin in human face region Region.Wherein colouring information may include each color component, color component refer to convert image to be processed to it is a certain from color Picture content caused by the image of color dimension, such as color component can refer to the RGB color component of human face region, CMY face Colouring component, hsv color component etc., it is to be appreciated that RGB color component, CMY color component, can be between hsv color component Mutually conversion.
In one embodiment, the hsv color component of human face region is obtained, hsv color component in human face region is extracted and exists Region in preset range is as skin area.Wherein, hsv color component refers respectively to the tone (H) of human face region, saturation degree (S), lightness (V) component sets a preset range to these three components respectively, and by these three components in human face region pre- If the extracted region in range comes out, as skin area.
For example, skin area is obtained by hsv color component, specifically can be the HSV face for obtaining human face region Colouring component, and obtain the area of the condition that meets in human face region " H value 20~25, S value in 10~50, V value between 50~85 " Domain, as skin area.
Skin white balance parameter refers to the parameter for being used to carry out white balance processing obtained according to skin area.According to skin Region obtains skin white balance parameter and can specifically include: obtaining the skin white balance of RGB triple channel respectively according to skin area Parameter.Color image can be generally divided into the color component of RGB triple channel, for respectively indicating three colors of red, green, blue point Amount.Therefore, the skin white balance parameter of RGB triple channel can be obtained respectively.
In one embodiment, obtaining skin white balance parameter can specifically include following steps: obtain skin area RGB triple channel value, and according to RGB triple channel value Acquisition channel average value;Intermediate parameters are obtained according to the channel average value;So Skin white balance parameter is obtained according to intermediate parameters and channel average value afterwards.For example, the RGB triple channel value of skin area is obtained, And obtaining the corresponding channel average value of RGB triple channel is Raver、Gaver、Baver;Then intermediate parameters K=(R is obtainedaver+Gaver+ Baver)/3;The skin white balance parameter for calculating separately RGB triple channel value, obtains Kr=K/Raver, Kg=K/Gaver, Kb=K/ Baver,
Step 206, white balance processing is carried out to image to be processed according to skin white balance parameter.
In embodiment provided by the present application, directly image to be processed can be carried out according to skin white balance parameter white flat Weighing apparatus processing.Specifically, each of image to be processed pixel is handled according to skin white balance parameter, and root respectively It is adjusted according to RGB triple channel value of the skin white balance parameter to each pixel, generates white balance treated image.
Above-mentioned image white balance method, the first human face region in acquisition image, and according to the colouring information of human face region Skin area is extracted, skin white balance parameter is then obtained according to the skin area of extraction.Portrait is usually that user compares concern Region, white balance processing is carried out by skin white balance parameter in this way, obtained processing result image more meets the portrait colour of skin Color characteristic, avoid image fault, improve the accuracy of image procossing.
Fig. 3 is the flow chart of image white balance method in another embodiment.As shown in figure 3, the image white balance method Including step 302 to step 310.Wherein:
Step 302, image to be processed and corresponding human face region are obtained.
It in one embodiment, can also include: acquisition image processing commands before step 302.It is understood that figure As process instruction refers to for triggering the instruction for carrying out white balance processing to image.When receiving image processing commands, start Image to be processed is obtained, and detects the human face region in image to be processed.The image processing commands can be user and trigger manually , it is also possible to get automatic trigger after photo during taking pictures, can also be that server is receiving terminal hair After the image processing requests sent, server automatic trigger.
Step 304, the physical distance information and colouring information for obtaining human face region are believed according to physical distance information and color Breath obtains the skin area in human face region.
In one embodiment, physical distance information, which refers to, indicates the corresponding object of some pixel in image, to figure As the information of the physical distance between acquisition device.Therefore, it when obtaining image by image collecting device, can obtain simultaneously The corresponding physical distance information of image, that is to say, that image with physical distance information be it is corresponding, each pixel has pair The physical distance information answered.
Specifically, dual camera can be installed on image collecting device, image collecting device is measured by dual camera and is arrived Physical distance information between object.Specifically, the image of object is shot respectively by the first camera and second camera;Root The first angle and the second angle are obtained according to the image, wherein the first angle is the first camera to object place horizontal line and the For one camera to the angle between horizontal line where second camera, the second angle is second camera to object place horizontal line With the angle where second camera to the first camera between horizontal line;According to the first angle, the second angle and the first camera shooting Head arrives the distance between second camera, obtains image collecting device to the physical distance information between object.
It is understood that, if detection accuracy is inadequate, will lead to detection when detecting the human face region in image to be processed As a result some non-face regions are generated in.If these non-face regions are similar to the color characteristic of skin area, then being difficult to Skin area is separated by colouring information.And the physical distance information of human face region often becomes to a very small extent Change, then obtaining the skin area in human face region according to physical distance information and colouring information, so that it may greatly improve Identify the accuracy rate of skin area.
Step 306, skin white balance parameter is obtained according to skin area, image white balance ginseng is obtained according to image to be processed Number.
Skin white balance parameter is obtained according to skin area for carrying out the parameter of white balance processing.Image white balance Parameter is obtained according to entire image to be processed for carrying out the parameter of white balance processing.In embodiment provided by the present application In, the algorithm for obtaining skin white balance parameter and acquisition image white balance parameter may be the same or different.
Further, portrait area can be obtained according to human face region, then obtains in image to be processed and removes portrait Remaining area except region obtains image white balance parameter according to remaining area.Wherein, portrait area refers to figure to be processed Region as in where portrait.After getting human face region, believed according to the physical distance of human face region and image to be processed Breath can obtain portrait area.It is generally believed that face and portrait be in same plane, then detect human face region it Afterwards, so that it may the value range for getting the corresponding physical distance information of portrait area, according to the corresponding physics of portrait area away from The portrait area in image to be processed can be obtained from the range of information.
Step 308, the region area of human face region is obtained, and white according to region area, skin white balance parameter and image Balance parameters obtain white balance parameter.
In one embodiment, the region area of human face region is used to indicate the size of human face region, can pass through face Pixel quantity shared by region indicates, can also be indicated by the area ratio of human face region and image to be processed.
Step 308 can specifically include: obtain the region area of human face region, it is white to obtain skin according to the region area The corresponding weight of balance parameters and image white balance parameter;Skin white balance parameter and image white balance parameter and corresponding Weight obtains white balance parameter.Specifically, the corresponding relationship that can establish region area and skin white balance parameter, according to area The weight of the available skin white balance parameter of domain area.
For example, it is assumed that indicate the region area of human face region by area ratio, i.e. human face region and image to be processed Area ratio beThen the weight of corresponding skin white balance parameter is set asThe weight of image white balance parameter is Then according to skin white balance parameter FgainWith image white balance parameter TgainWhite balance parameter is obtained, is obtained
It, can be directly according to skin white balance parameter and image white balance parameter in other embodiments provided by the present application White balance parameter is obtained, that is, presets the weight of skin white balance parameter and image white balance parameter, it is white getting skin After balance parameters and image white balance parameter, directly according to skin white balance parameter and image white balance parameter and accordingly Weight calculation obtains white balance parameter.
Step 310, white balance processing is carried out to image to be processed according to white balance parameter.
In one embodiment, white balance parameter can refer to white balance gains, i.e., the change of pixel value in image to be processed Change ratio.The pixel value of each of image to be processed pixel is converted according to white balance gains, obtains white balance Treated image.Specifically, the RGB triple channel value in image to be processed is converted by white balance gains respectively, it can Treated to obtain white balance image.
Above-mentioned image white balance method, the first human face region in acquisition image, and according to the physical distance of human face region Information and colouring information extract skin area, then skin white balance parameter are obtained according to the skin area of extraction, according to wait locate It manages image and obtains image white balance parameter.Portrait is usually the region that user compares concern, passes through skin white balance parameter in this way White balance parameter is obtained with image white balance parameter, and white balance processing is carried out to image to be processed according to white balance parameter.? To processing result image not only allow for the color characteristic of whole image, it is also contemplated that the color characteristic of the portrait colour of skin, in this way The accuracy of image procossing can be improved to avoid image fault.
Fig. 4 is the structural schematic diagram of image white balancing apparatus in one embodiment.As shown in figure 4, the image white balance fills Setting 400 includes that region obtains module 402, parameter acquisition module 404 and image processing module 406.Wherein:
Region obtains module 402, for obtaining image to be processed and corresponding human face region.
Parameter acquisition module 404, for obtaining the skin area in the human face region according to colouring information, and according to institute It states skin area and obtains skin white balance parameter.
Image processing module 406, for carrying out white balance to the image to be processed according to the skin white balance parameter Processing.
Above-mentioned image white balancing apparatus, the first human face region in acquisition image, and according to the colouring information of human face region Skin area is extracted, skin white balance parameter is then obtained according to the skin area of extraction.Portrait is usually that user compares concern Region, white balance processing is carried out by skin white balance parameter in this way, obtained processing result image more meets the portrait colour of skin Color characteristic, avoid image fault, improve the accuracy of image procossing.
Fig. 5 is the structural schematic diagram of image white balancing apparatus in another embodiment.As shown in figure 5, the image white balance Device 400 includes that region obtains module 502, data obtaining module 504, area acquisition module 506,508 and of parameter acquisition module Image processing module 510.Wherein:
Region obtains module 502, for obtaining image to be processed and corresponding human face region.
Data obtaining module 504, for obtaining the physical distance information and colouring information of the human face region.
Area obtains module 506, for obtaining the region area of the human face region.
Parameter acquisition module 508, for being obtained in the human face region according to the physical distance information and colouring information Skin area, image white balance parameter is obtained according to the image to be processed, and according to the region area, skin white balance Parameter and image white balance parameter obtain white balance parameter.
Image processing module 510, for carrying out white balance processing to the image to be processed according to the white balance parameter.
Above-mentioned image white balancing apparatus, the first human face region in acquisition image, and according to the physical distance of human face region Information and colouring information extract skin area, then skin white balance parameter are obtained according to the skin area of extraction, according to wait locate It manages image and obtains image white balance parameter.Portrait is usually the region that user compares concern, passes through skin white balance parameter in this way White balance parameter is obtained with image white balance parameter, and white balance processing is carried out to image to be processed according to white balance parameter.? To processing result image not only allow for the color characteristic of whole image, it is also contemplated that the color characteristic of the portrait colour of skin, in this way Image fault is avoided, the accuracy of image procossing is improved.
In one embodiment, parameter acquisition module 508 is also used to be obtained in the human face region according to colouring information Skin area, and skin white balance parameter is obtained according to the skin area.
Parameter acquisition module 508 is also used to extract colouring information in human face region and is presetting in one of the embodiments, Region in range, as the skin area in the human face region.
In embodiment provided by the present application, parameter acquisition module 508 is also used to according to the image acquisition figure to be processed White balance parameter is obtained as white balance parameter, and according to the skin white balance parameter and image white balance parameter.
In one embodiment, image processing module 510 is used for according to the skin white balance parameter to described to be processed Image carries out white balance processing.
The division of modules is only used for for example, in other embodiments, can incite somebody to action in above-mentioned image white balancing apparatus Image white balancing apparatus is divided into different modules as required, to complete all or part of function of above-mentioned image white balancing apparatus Energy.
The embodiment of the invention also provides a kind of computer readable storage mediums.One or more includes computer program Non-volatile computer readable storage medium storing program for executing, when the computer program is executed by one or more processors, so that described Processor executes following steps:
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters;
White balance processing is carried out to the image to be processed according to the skin white balance parameter.
In one embodiment, the skin obtained according to colouring information in the human face region being executed by processor Region includes:
The region of colouring information within a preset range in human face region is extracted, as the skin region in the human face region Domain.
Be executed by processor in one of the embodiments, the method also includes:
Obtain the physical distance information and colouring information of the human face region;
It is described skin area in the human face region is obtained according to colouring information to include:
The skin area in the human face region is obtained according to the physical distance information and colouring information.
In embodiment provided by the present application, it is being executed by processor the described method includes:
Image white balance parameter is obtained according to the image to be processed, and white according to the skin white balance parameter and image Balance parameters obtain white balance parameter;
It is described to include: to the image progress white balance processing to be processed according to the skin white balance parameter
White balance processing is carried out to the image to be processed according to the white balance parameter.
It is being executed by processor in one of the embodiments, the described method includes:
Obtain the region area of the human face region;
It is described to include: according to the skin white balance parameter and image white balance parameter acquisition white balance parameter
White balance parameter is obtained according to the region area, skin white balance parameter and image white balance parameter.
The embodiment of the present invention also provides a kind of computer equipment.It include image processing circuit, figure in above-mentioned computer equipment It is realized as processing circuit can use hardware and or software component, it may include define ISP (Image Signal Processing, image signal process) pipeline various processing units.Fig. 6 is that image processing circuit shows in one embodiment It is intended to.As shown in fig. 6, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present invention.
As shown in fig. 6, image processing circuit includes ISP processor 640 and control logic device 650.Imaging device 610 captures Image data handled first by ISP processor 640, ISP processor 640 to image data analyzed with capture can be used for really The image statistics of fixed and/or imaging device 610 one or more control parameters.Imaging device 610 may include having one The camera of a or multiple lens 612 and imaging sensor 614.Imaging sensor 614 may include colour filter array (such as Bayer filter), imaging sensor 614 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 614 and wavelength Information, and the one group of raw image data that can be handled by ISP processor 640 is provided.Sensor 620 (such as gyroscope) can be based on biography The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processor 640 by 620 interface type of sensor.Sensor 620 Interface can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 620 by imaging sensor 614, sensor 620 can be based on biography 620 interface type of sensor is supplied to raw image data that ISP processor 640 is handled or sensor 620 is by original graph As data storage is into video memory 630.
ISP processor 640 handles raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processor 640 can carry out raw image data at one or more images Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision It carries out.
ISP processor 640 can also receive pixel data from video memory 630.For example, 620 interface of sensor will be original Image data is sent to video memory 630, and the raw image data in video memory 630 is available to ISP processor 640 It is for processing.Video memory 630 can be independent special in a part, storage equipment or electronic equipment of memory device It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 614 interface of imaging sensor or from 620 interface of sensor or from video memory 630 When raw image data, ISP processor 640 can carry out one or more image processing operations, such as time-domain filtering.ISP processor 640 treated that image data can be transmitted to video memory 630, to carry out other processing before shown.At ISP Manage device 640 from video memory 630 receive processing data, and to the processing data progress original domain in and RGB and YCbCr Image real time transfer in color space.Image data that treated may be output to display 680, for user viewing and/or It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor 640 output also can be transmitted to video memory 630, and display 680 can read image data from video memory 630.? In one embodiment, video memory 630 can be configured to realize one or more frame buffers.In addition, ISP processor 640 Output can be transmitted to encoder/decoder 670, so as to encoding/decoding image data.The image data of coding can be saved, And it is decompressed before being shown in 680 equipment of display.
Treated that image data can be transmitted to white balance module 660 by ISP, white to carry out before shown to image Balance Treatment.White balance module 660 may include being obtained in human face region according to colouring information to the processing of image data white balance Skin area, and skin white balance parameter is obtained according to skin area;Image to be processed is carried out according to skin white balance parameter White balance processing etc..It, can be by white balance treated picture number after image data is carried out white balance processing by white balance module 660 According to encoder/decoder 670 is sent to, so as to encoding/decoding image data.The image data of coding can be saved, and aobvious Show and is decompressed before in 680 equipment of display.It is understood that treated the image data of white balance module 660 can be with Without encoder/decoder 670, directly issues display 680 and shown.Treated the image data of ISP processor 640 The processing of encoder/decoder 670 can also be first passed through, is then handled using white balance module 660.Wherein, white balance Module 660 or encoder/decoder 670 can be CPU (Central Processing Unit, central processing in mobile terminal Device) or GPU (Graphics Processing Unit, graphics processor) etc..
The statistical data that ISP processor 640 determines, which can be transmitted, gives control logic device Unit 650.For example, statistical data can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 612 shadow correction of lens 614 statistical information of device.Control logic device 650 may include the processor and/or micro-control for executing one or more routines (such as firmware) Device processed, one or more routines can statistical data based on the received, determine the control parameter and ISP processing of imaging device 610 The control parameter of device 640.For example, the control parameter of imaging device 610 may include 620 control parameter of sensor (such as gain, expose The time of integration, stabilization parameter of photocontrol etc.), camera flash control parameter, 612 control parameter of lens (such as focus or become Focal length) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example, RGB processing during) 612 shadow correction parameter of gain level and color correction matrix and lens.
The following are realize image white balance method with image processing techniques in Fig. 6:
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and white according to skin area acquisition skin Balance parameters;
White balance processing is carried out to the image to be processed according to the skin white balance parameter.
In one embodiment, described skin area in the human face region is obtained according to colouring information to include:
The region of colouring information within a preset range in human face region is extracted, as the skin region in the human face region Domain.
In one of the embodiments, the method also includes:
Obtain the physical distance information and colouring information of the human face region;
It is described skin area in the human face region is obtained according to colouring information to include:
The skin area in the human face region is obtained according to the physical distance information and colouring information.
In embodiment provided by the present application, which comprises
Image white balance parameter is obtained according to the image to be processed, and white according to the skin white balance parameter and image Balance parameters obtain white balance parameter;
It is described to include: to the image progress white balance processing to be processed according to the skin white balance parameter
White balance processing is carried out to the image to be processed according to the white balance parameter.
In one of the embodiments, the described method includes:
Obtain the region area of the human face region;
It is described to include: according to the skin white balance parameter and image white balance parameter acquisition white balance parameter
White balance parameter is obtained according to the region area, skin white balance parameter and image white balance parameter.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage is situated between Matter can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc..
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those 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 Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (10)

1. a kind of image white balance method, which is characterized in that the described method includes:
Obtain image to be processed and corresponding human face region;
The skin area in the human face region is obtained according to colouring information, and skin white balance is obtained according to the skin area Parameter;
Portrait area is obtained according to the human face region, is obtained surplus in addition to the portrait area in the image to be processed Remaining region obtains image white balance parameter according to the remaining area;
White balance parameter is obtained according to the skin white balance parameter and described image white balance parameter;
White balance processing is carried out to the image to be processed according to the white balance parameter.
2. image white balance method according to claim 1, which is characterized in that described to obtain the people according to colouring information Skin area in face region includes:
The region of colouring information within a preset range in human face region is extracted, as the skin area in the human face region.
3. image white balance method according to claim 1 or 2, which is characterized in that the method also includes:
Obtain the physical distance information and colouring information of the human face region;
It is described skin area in the human face region is obtained according to colouring information to include:
The skin area in the human face region is obtained according to the physical distance information and colouring information.
4. image white balance method according to claim 1, which is characterized in that the described method includes:
Obtain the region area of the human face region;
It is described to include: according to the skin white balance parameter and image white balance parameter acquisition white balance parameter
White balance parameter is obtained according to the region area, skin white balance parameter and image white balance parameter.
5. a kind of image white balancing apparatus, which is characterized in that described device includes:
Region obtains module, for obtaining image to be processed and corresponding human face region;
Parameter acquisition module, for obtaining the skin area in the human face region according to colouring information, and according to the skin Region obtains skin white balance parameter;Portrait area is obtained according to the human face region, obtains removing in the image to be processed Remaining area except the portrait area obtains image white balance parameter according to the remaining area;It is white according to the skin Balance parameters and described image white balance parameter obtain white balance parameter;
Image processing module, for carrying out white balance processing to the image to be processed according to the white balance parameter.
6. image white balancing apparatus according to claim 5, which is characterized in that the parameter acquisition module is also used to extract The region of colouring information within a preset range in human face region, as the skin area in the human face region.
7. image white balancing apparatus according to claim 5 or 6, which is characterized in that described device further include:
Data obtaining module, for obtaining the physical distance information and colouring information of the human face region;
The parameter acquisition module is also used to be obtained in the human face region according to the physical distance information and colouring information Skin area.
8. image white balancing apparatus according to claim 5, which is characterized in that described device includes:
Area obtains module, for obtaining the region area of the human face region;
The parameter acquisition module is also used to be obtained according to the region area, skin white balance parameter and image white balance parameter White balance parameter.
9. one or more includes the non-volatile computer readable storage medium storing program for executing of computer program, when the computer program quilt When one or more processors execute, so that the processor executes, image according to any one of claims 1 to 4 is white to be put down Weighing apparatus method.
10. a kind of computer equipment, including memory and processor, computer program, the meter are stored in the memory When calculation machine program is executed by the processor, so that the processor executes image according to any one of claims 1 to 4 White balance method.
CN201710806529.6A 2017-09-08 2017-09-08 Image white balance method, device and computer readable storage medium Active CN107465903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710806529.6A CN107465903B (en) 2017-09-08 2017-09-08 Image white balance method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710806529.6A CN107465903B (en) 2017-09-08 2017-09-08 Image white balance method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107465903A CN107465903A (en) 2017-12-12
CN107465903B true CN107465903B (en) 2019-04-26

Family

ID=60552302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710806529.6A Active CN107465903B (en) 2017-09-08 2017-09-08 Image white balance method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107465903B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234980A (en) * 2017-12-28 2018-06-29 北京小米移动软件有限公司 Image processing method, device and storage medium
CN110392245B (en) * 2018-04-20 2021-07-16 瑞昱半导体股份有限公司 White balance correction method based on skin color information and image processing device thereof
CN110012277B (en) * 2019-04-09 2021-06-25 成都品果科技有限公司 Automatic white balance method and device for portrait image
CN111583127B (en) * 2020-04-03 2023-08-15 浙江大华技术股份有限公司 Face skin color correction method, device, computer equipment and readable storage medium
CN114143526A (en) * 2021-11-19 2022-03-04 昆山丘钛光电科技有限公司 Image processing method and device, terminal equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1663287A (en) * 2002-06-25 2005-08-31 皇家飞利浦电子股份有限公司 Method and system for white balancing images using facial color as a reference signal
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN106991379A (en) * 2017-03-09 2017-07-28 广东欧珀移动通信有限公司 Human body skin recognition methods and device and electronic installation with reference to depth information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5804856B2 (en) * 2011-09-07 2015-11-04 キヤノン株式会社 Image processing apparatus, image processing method, and program
KR102541829B1 (en) * 2016-01-27 2023-06-09 삼성전자주식회사 Electronic apparatus and the controlling method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1663287A (en) * 2002-06-25 2005-08-31 皇家飞利浦电子股份有限公司 Method and system for white balancing images using facial color as a reference signal
CN101527860A (en) * 2008-03-04 2009-09-09 佳能株式会社 White balance control apparatus, control method therefor, and image sensing apparatus
CN106991379A (en) * 2017-03-09 2017-07-28 广东欧珀移动通信有限公司 Human body skin recognition methods and device and electronic installation with reference to depth information

Also Published As

Publication number Publication date
CN107465903A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107465903B (en) Image white balance method, device and computer readable storage medium
US20140078247A1 (en) Image adjuster and image adjusting method and program
CN108900782A (en) Exposal control method, device and electronic equipment
CN107704798B (en) Image blurring method and device, computer readable storage medium and computer device
CN108419022A (en) Control method, control device, computer readable storage medium and computer equipment
CN107424198A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN109191403A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN108012134B (en) Image pickup method and device, computer readable storage medium and computer equipment
CN110213502A (en) Image processing method, device, storage medium and electronic equipment
CN108683863A (en) Image formation control method, device, electronic equipment and readable storage medium storing program for executing
CN107613216B (en) Focusing method, device, computer readable storage medium and electronic equipment
CN109685853A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN107801011B (en) White balancing treatment method, device and the equipment of pan-shot
CN107317967A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN107800971B (en) Auto-exposure control processing method, device and the equipment of pan-shot
CN114693580A (en) Image processing method and related device
CN107194901B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
CN107464225B (en) Image processing method, image processing device, computer-readable storage medium and mobile terminal
CN107580205B (en) White balance adjustment method and device
CN107341782B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
CN107454335A (en) Image processing method, device, computer-readable recording medium and mobile terminal
CN107563329A (en) Image processing method, device, computer-readable recording medium and mobile terminal
US8994848B2 (en) Method and system for handling mixed illumination in video and photography
CN108259754A (en) Image processing method and device, computer readable storage medium and computer equipment
CN115802183B (en) Image processing method and related device

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
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant