CN109242794A - Image processing method, device, electronic equipment and computer readable storage medium - Google Patents
Image processing method, device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109242794A CN109242794A CN201810997702.XA CN201810997702A CN109242794A CN 109242794 A CN109242794 A CN 109242794A CN 201810997702 A CN201810997702 A CN 201810997702A CN 109242794 A CN109242794 A CN 109242794A
- Authority
- CN
- China
- Prior art keywords
- light efficiency
- image
- coefficient
- region
- human face
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 19
- 238000003860 storage Methods 0.000 title claims abstract description 15
- 230000002708 enhancing effect Effects 0.000 claims abstract description 94
- 238000012545 processing Methods 0.000 claims abstract description 77
- 230000001795 light effect Effects 0.000 claims abstract description 46
- 238000000034 method Methods 0.000 claims abstract description 24
- 238000005315 distribution function Methods 0.000 claims description 62
- 238000004590 computer program Methods 0.000 claims description 13
- 238000009826 distribution Methods 0.000 claims description 7
- 239000004744 fabric Substances 0.000 claims description 3
- 230000006870 function Effects 0.000 claims description 3
- 230000033228 biological regulation Effects 0.000 abstract description 5
- 230000000875 corresponding effect Effects 0.000 description 28
- 238000003384 imaging method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 12
- 238000001514 detection method Methods 0.000 description 6
- 210000001061 forehead Anatomy 0.000 description 6
- 238000005286 illumination Methods 0.000 description 6
- 239000003086 colorant Substances 0.000 description 4
- 238000012937 correction Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 230000001965 increasing effect Effects 0.000 description 3
- 238000012805 post-processing Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005498 polishing Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N Silicium dioxide Chemical compound O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000000571 coke Substances 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/71—Circuitry for evaluating the brightness variation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a kind of image processing method, device, electronic equipment and computer readable storage mediums.The above method, comprising: recognition of face is carried out to image to be processed, determines the human face region of image to be processed;Obtain the luminance information and depth information of human face region;Determine that the light efficiency in light efficiency model enhances coefficient according to luminance information and depth information;Enhance coefficient according to light efficiency and light efficiency enhancing processing is carried out to human face region.Above-mentioned image processing method, device, electronic equipment and computer readable storage medium can improve the light effects of portrait image, and simple and efficient to handle with dynamic regulation light effects intensity.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of image processing method, device, electronic equipment and meter
Calculation machine readable storage medium storing program for executing.
Background technique
With the development of electronic technology, more and more electronic equipments have shooting function, and user can be set by electronics
Standby camera etc. is shot.If desired the preferable portrait photo of effect is taken, it usually needs arrange around the people clapped
Light, to produce good light effects.This portrait for making shooting has the mode of good light efficiency cumbersome.
Summary of the invention
The embodiment of the present application provides a kind of image processing method, device, electronic equipment and computer readable storage medium, can
With dynamic regulation light effects intensity, the light effects of portrait image are improved, and simple and efficient to handle.
A kind of image processing method, comprising:
Recognition of face is carried out to image to be processed, determines the human face region of the image to be processed;
Obtain the luminance information and depth information of the human face region;
Determine that the light efficiency in light efficiency model enhances coefficient according to the luminance information and depth information;
Enhance coefficient according to the light efficiency and light efficiency enhancing processing is carried out to the human face region, the light efficiency enhancing coefficient is
Influence the parameter of light efficiency enhancing processing intensity.
A kind of image processing apparatus, comprising:
Face recognition module determines the people of the image to be processed for carrying out recognition of face to the image to be processed
Face region;
Depth obtains module, for obtaining the luminance information and depth information of the human face region;
Coefficient determination module, for determining the enhancing of the light efficiency in light efficiency model system according to the luminance information and depth information
Number;
Light efficiency enhances module, is added light effects to the human face region for enhancing coefficient according to the light efficiency
Processing, the light efficiency enhancing coefficient are used to adjust the intensity of the light effects.
A kind of electronic equipment, including memory and processor are stored with computer program, the calculating in the memory
When machine program is executed by the processor, so that the processor realizes method as described above.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Method as described above is realized when row.
Above-mentioned image processing method, device, electronic equipment and computer readable storage medium carry out people to image to be processed
Face identification, determines the human face region of image to be processed, obtains the luminance information and depth information of the human face region, and according to institute
It states luminance information and depth information determines that the light efficiency in light efficiency model enhances coefficient, coefficient is enhanced to the people according to the light efficiency
Face region carries out light efficiency enhancing processing, can make portrait image according to the luminance information dynamic regulation light effects intensity of face
Have better light effects, and simple and efficient to handle.
Detailed description of the invention
Fig. 1 is the block diagram of electronic equipment in one embodiment;
Fig. 2 is the flow diagram of image processing method in one embodiment;
Fig. 3 is to determine the enhancing of the light efficiency in light efficiency model system according to the luminance information and depth information in one embodiment
Flow diagram;
Fig. 4 is to determine light efficiency enhancing system according to the brightness enhancement factor and the depth information in one embodiment
Several flow diagrams;
Fig. 5 is the flow diagram for constructing the first distribution function in one embodiment and constructing the second distribution function;
Fig. 6 is the flow diagram of image processing method in another embodiment;
Fig. 7 is the flow diagram of image processing method in another embodiment;
Fig. 8 is the block diagram of image processing apparatus in one embodiment;
Fig. 9 is the block diagram of image processing apparatus in another embodiment;
Figure 10 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only to explain the application, not
For limiting the application.
It is appreciated that term " first " used in this application, " 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 to distinguish the first element from the other element.Citing comes
It says, in the case where not departing from scope of the present application, the first client can be known as the second client, and similarly, can incite somebody to action
Second client is known as the first client.The first client and the second client both client, but it is not same visitor
Family end.
Fig. 1 is the block diagram of electronic equipment in one embodiment.As shown in Figure 1, the electronic equipment includes passing through system bus
Processor, memory, display screen and the input unit of connection.Wherein, memory may include non-volatile memory medium and processing
Device.The non-volatile memory medium of electronic equipment is stored with operating system and computer program, and the computer program is by processor
To realize a kind of image processing method provided in the embodiment of the present application when execution.The processor calculates and controls energy for providing
Power supports the operation of entire electronic equipment.Built-in storage in electronic equipment is the computer journey in non-volatile memory medium
The operation of sequence provides environment.The display screen of electronic equipment can be liquid crystal display or electric ink display screen etc., input dress
It sets and can be the touch layer covered on display screen, be also possible to the key being arranged on electronic equipment casing, trace ball or Trackpad,
It is also possible to external keyboard, Trackpad or mouse etc..The electronic equipment can be mobile phone, tablet computer or individual digital and help
Reason or wearable device etc..It will be understood by those skilled in the art that structure shown in Fig. 1, only with application scheme phase
The block diagram of the part-structure of pass does not constitute the restriction for the electronic equipment being applied thereon to application scheme, specific electricity
Sub- equipment may include perhaps combining certain components or with different components than more or fewer components as shown in the figure
Arrangement.
As shown in Fig. 2, in one embodiment, providing a kind of image processing method, comprising the following steps:
Step 202, recognition of face is carried out to image to be processed, determines the human face region of the image to be processed.
In one embodiment, user's scene during shooting is often extremely complex, especially photographed scene
Light it is complicated and changeable, and user can not change photographed scene in shooting process, therefore can only be reached by post-processing
The effect wanted to user.Electronic equipment can obtain image to be processed, and image to be processed, which refers to, to need to carry out at light efficiency enhancing
The image of reason, light efficiency are a kind of image enhancement processings of analog light source effect.Specifically, light source effect can be natural light, dance
Platform light, film studio light, film light, rim(ming) light, light of announcing the items on a programme, dindar light efficiency and other effects.
Optionally, electronic equipment can be provided with portrait light efficiency switch on interface, and user can trigger portrait light efficiency switch, choosing
It selects and whether the processing of portrait light efficiency is carried out to image to be processed, wherein the processing of portrait light efficiency refers to adding in image to be processed
Light effects can simulate the cloth light effect in studio, carry out polishing to the portrait in image to be processed, manufacture good light
Effect.The mode of portrait light efficiency also may be selected in user, and the mode of portrait light efficiency may include but be not limited to rim(ming) light, stage light applications, take the photograph
Studio light etc., can also realize the light effects etc. of different colours, and user can voluntarily select according to actual needs.
In one embodiment, electronic equipment can carry out recognition of face to image to be processed, can be calculated by Face datection
Method determines that the human face region of image to be processed, Face datection algorithm may include detection method, eigenface based on geometrical characteristic
Detection method, linear discriminant analysis method, based on hidden markov model detection method etc., in the embodiment of the present application, to people
Face detection algorithm is not further to be limited.
In one embodiment, electronic equipment can extract the characteristics of image of image to be processed, and be known by preset face
Whether other model analyzes characteristics of image, judge in image to be processed comprising face.Human face recognition model can be in advance
The decision model constructed by machine learning can obtain a large amount of sample image when constructing human face recognition model, in sample image
Include facial image and unmanned image, whether can include that sample image is marked in face according to each sample image, and
It using the sample image of label as the input of human face recognition model, is trained by machine learning, obtains human face recognition model.
Human face region can be the rectangular area divided according to characteristics of image, include face in the rectangular area.Face area
Domain is also possible to the irregular area being made of the edge contour of face, and electronic equipment can obtain side according to the edge feature of face
Edge profile, so that it is determined that human face region.
It should be noted that the image to be processed can be the preview graph in the previews of electronic equipment shooting image
Picture is also possible to pre-stored image in the image or electronic equipment of electronic equipment shooting, it is not limited here.
Step 204, the luminance information and depth information of the human face region are obtained.
Electronic equipment can obtain the luminance information of human face region, and luminance information can be used for the bright-dark degree of color.Brightness letter
Breath can be indicated with the brightness value of human face region.The brightness value of human face region can be the average brightness of human face region.For example, electric
Sub- equipment can obtain the brightness value of each pixel in human face region, and average bright according to the calculating of the brightness value of each pixel
Degree, the average brightness can be used as the brightness value of human face region.Human face region can also be divided into multiple subregions by electronic equipment, and
The average brightness for calculating each sub-regions adds the average brightness of each sub-regions according to the weight that each sub-regions are distributed
Power and calculating, obtain the brightness value of human face region.It is to be appreciated that the brightness letter that other modes obtain human face region can also be used
Breath, however it is not limited to above-mentioned several ways.
Electronic equipment can also obtain the depth information of human face region.Electronic equipment, can be with during acquiring image
The corresponding depth map of shooting object is obtained simultaneously, and the range information of shooting object distance electronic equipment is carried in depth map.?
That is, depth information can be understood as the distance between the imaging device of shooting object and electronic equipment information.For example, depth information
It can be obtained based on the dual camera of electronic equipment, can also be obtained, can also be led to by the TOF technology of infrared camera
It crosses structure light to be obtained, the depth information of obtained shooting object can be 10 centimetres, 50 centimetres, 1 meter, 2 meters or 3 meters etc..
Therefore, electronic equipment can obtain the corresponding depth information of human face region after determining human face region from depth map.
Step 206, determine that the light efficiency in light efficiency model enhances coefficient according to the luminance information and depth information.
Electronic equipment can construct light efficiency model in advance, and light efficiency model can be used for being added light effects to image to be processed
Processing, the light efficiency of announcing the items on a programme that simulation stage is announced the items on a programme, realizes the effect that polishing is carried out to the portrait of image to be processed.Optionally, light efficiency
Model can be the superposition of two one-dimensional distribution functions, and the weight factor of each one-dimensional distribution function is different, for example, one of them
One-dimensional distribution function can be used for expressing the distribution characteristics of human face region X direction, another one-dimensional distribution function can be used for
The distribution characteristics of human face region y direction is expressed, but not limited to this.
It should be noted that transverse and longitudinal can be understood as the width direction of human face region, that is, width direction can be to send out from left side
The direction of border to right side hairline;The longitudinal axis can be understood as the length direction of human face region, that is, length direction can for from hair line to
The direction of lower chin.
Light efficiency model may include light efficiency enhancing coefficient, and light efficiency enhancing coefficient can have with the light effects intensity of addition to be associated with
Relationship, light efficiency enhancing coefficient is bigger, and the light intensity of addition is higher.Light efficiency enhances coefficient can be with the distribution range in light efficiency model
Association, light efficiency enhancing coefficient is bigger, and distribution range can be bigger, and light efficiency enhancing coefficient is smaller, and distribution range can be smaller.Electronic equipment
After the luminance information and depth information that obtain human face region, the light in light efficiency model can be determined according to luminance information and depth information
Effect enhancing coefficient.The luminance information of human face region can enhance coefficient with light efficiency and be negatively correlated relationship, the luminance information of human face region
Bigger, light efficiency enhances coefficient can be smaller, and the luminance information of human face region is smaller, and light efficiency enhances coefficient can be bigger;Human face region
Depth information can enhance coefficient with light efficiency and be negatively correlated relationship, and the depth information of human face region is bigger, and light efficiency enhancing coefficient can be got over
Small, the depth information of human face region is smaller, and light efficiency enhances coefficient can be bigger.For example, human face region is in the width direction, at the bridge of the nose
Light efficiency enhancing coefficient it is big, light efficiency at cheek enhancing coefficient is small;Light efficiency of the human face region along long width direction, forehead increases
Strong coefficient is big, and the light efficiency enhancing coefficient at lower jaw is small.
Step 208, coefficient is enhanced according to the light efficiency and light efficiency enhancing processing is carried out to the human face region, the light efficiency increases
Strong coefficient is the parameter for influencing light efficiency enhancing processing intensity.
It, can be according to determination after electronic equipment determines the light efficiency enhancing coefficient of light efficiency model according to luminance information and depth information
Light efficiency enhancing coefficient to human face region carry out light efficiency enhancing processing, that is, addition light effects processing.In one embodiment
In, light efficiency enhancing processing or the processing of addition light effects can be understood as the processing for enhancing the brightness of image.It should
Light efficiency enhancing coefficient can be used for determining the light intensity of addition, and light efficiency enhancing coefficient is bigger, and the light intensity of addition is higher.According to
Determining light efficiency enhances coefficient, can enhance coefficient according to light efficiency and carry out light efficiency enhancing to each pixel in image to be processed
Processing.Specifically can light efficiency enhance coefficient image to be processed is overlapped or product by way of carry out at light efficiency enhancing
Reason.
Optionally, light efficiency model is added light effects processing to image to be processed, may also include to image to be processed
It is changed the color etc. of image to be processed.The color for changing image to be processed may refer to change each in image to be processed
The color-values of pixel.The color-values can be the colors such as RGB (red, green, blue), HSV (tone, saturation degree, lightness) with pixel
Value in space.Electronic equipment can set the light of different colours, such as candle light light according to the needs of users, and according to light
Effect model calculates adjusted color-values of each pixel under the light color, and according to the color-values pair being calculated
Each pixel is adjusted, to can reach the effect for stamping different colours light in image to be processed.
In the present embodiment, recognition of face is carried out to image to be processed, determines the human face region of image to be processed;Obtain people
The luminance information and depth information in face region;The enhancing of the light efficiency in light efficiency model system is determined according to luminance information and depth information
Number;Enhance the processing that coefficient is added light effects to human face region according to light efficiency, light efficiency enhancing coefficient is for adjusting light
The intensity of effect can be such that portrait image has according to the luminance information and depth information dynamic regulation light effects intensity of face
Standby better light effects, and it is simple and efficient to handle.
As shown in figure 3, in one embodiment, step 206, determining light efficiency mould according to the luminance information and depth information
Light efficiency in type enhances system, comprising the following steps:
Step 302, brightness enhancement factor is obtained according to the luminance information.
Electronic equipment can set predetermined luminance value, which can be used under the predetermined luminance value, wait locating
The luminance information of reason image can achieve preferable effect.The predetermined luminance value can be set according to the demand of user, in this Shen
It please be not further to the specific value of its predetermined luminance value to be limited in embodiment.Electronic equipment is believed according to the brightness of acquisition
Breath and predetermined luminance value can obtain brightness enhancement factor.Brightness enhancement factor is influence light efficiency enhancing processing intensity one
A luminance parameter.
In one embodiment, brightness enhancement factor can be indicated with the ratio of predetermined luminance value and luminance information, example
Such as: k=L1/L2, wherein k is brightness enhancement factor, L1For predetermined luminance value;L2For the luminance information of human face region.Electronics is set
It is standby that brightness enhancement factor k can be adjusted according to current luminance information, it can prevent the light of addition from occurring too dark or too bright
The case where.
Step 304, determine that the light efficiency enhances coefficient according to the brightness enhancement factor and the depth information.
Electronic equipment can also obtain the depth information of human face region in image to be processed, can be true according to the depth information
Determine the brightness enhancing coefficient of light efficiency model.Wherein, brightness enhancing coefficient is another brightness for influencing light efficiency enhancing processing intensity
Parameter.It include multiple pixels in human face region, the corresponding image of each pixel has a depth information.
In one embodiment, light efficiency model includes the first distribution function and the second distribution function.Wherein, according to first point
Cloth function and depth information can calculate the first brightness enhancing coefficient of human face region, be believed according to the second distribution function and depth
Breath can calculate the second brightness enhancing coefficient of human face region.
Specifically, electronic equipment can also establish rectangular coordinate system in the picture, in rectangular coordinate system calculate characteristic point it
Between angle depth information.Electronic equipment establishes xy coordinate system in the picture with two mutually perpendicular straight lines.For example, a picture
The coordinate value of vegetarian refreshments P is (Px,Py), corresponding depth information is dp, then according to pixel PxAbscissa PxAnd depth information
dpThe first brightness enhancing coefficient is calculated, then according to pixel PxOrdinate PyAnd depth information dpCalculate the second brightness
Enhance coefficient.Wherein, the first brightness enhancing coefficient can be reduced with the increase of depth information.Second brightness enhances coefficient
Stage property coefficient, in the first range, the second brightness enhancing coefficient increases with the increase of depth information;In the second range
Interior, the second brightness enhancing coefficient is reduced with the increase of depth information.
It should be noted that the first range can be understood as ordinate range corresponding to forehead region in human face region;
Second range can be understood as ordinate range corresponding to other regions of human face region in addition to forehead region.
Electronic equipment can enhance the corresponding weight factor of coefficient and the second brightness according to the first brightness in turn enhances coefficient pair
The weight factor answered obtains the brightness enhancing coefficient of light efficiency model.Wherein, weight factor is to influence corresponding brightness to enhance coefficient
Parameter, weight factor is bigger, and influence property is also bigger.Specifically, the corresponding weight factor of the second brightness enhancing coefficient is big
In the corresponding weight factor of the first brightness enhancing coefficient.
Electronic equipment can then determine the light efficiency according to the brightness enhancement factor of acquisition and the product of enhanced strength coefficient
The light efficiency of model enhances coefficient.
In embodiment provided by the present application, the light efficiency of light efficiency model enhancing coefficient be it is adjustable, increased according to brightness
The strong factor and brightness enhancing coefficient can be adjusted to coefficient is enhanced according to the light efficiency of light efficiency model.
As shown in figure 4, in one embodiment, determining the light according to the brightness enhancement factor and the depth information
Effect enhancing coefficient, comprising the following steps:
Step 402, obtaining the first brightness according to the depth information and the first distribution function enhances coefficient.
In one embodiment, light efficiency model include the first distribution function and the second distribution function, the first distribution function and
Second distribution function has different weight factors.Specifically, light efficiency model can be expressed with following formula:
P (x, y)=k [af1(x)+bf2(y)]
Wherein, k is brightness enhancement factor, f1It (x) is the first distribution function, a is the weight factor of the first distribution function;f2
It (y) is the second distribution function, b is the weight factor of the second distribution function.
Specifically, the first distribution function f1(x) it can indicate are as follows:
In formula, xmidFor the abscissa of the pixel in human face region with minimum-depth information, x is to appoint in human face region
The abscissa of one pixel, w are the overall width of human face region.Wherein, xmidIt can be understood as the abscissa of nose highest point, or
The abscissa of forehead region highest point.W can be regarded as from the distance between leftmost side hairline and the rightmost side hairline information.
Electronic equipment can believe the abscissa of the depth information of image corresponding to each pixel and each pixel
Breath, brings into the first distribution function, can calculate the corresponding first brightness enhancing coefficient of each pixel.
Step 404, obtaining the second brightness according to the depth information and the second distribution function enhances coefficient.
Specifically, the second distribution function f2(y) it may be expressed as:
In formula, ynThe ordinate of corresponding pixel when for depth information in human face region being preset value, y are face area
The ordinate of any pixel point in domain, l are the total length of human face region.Wherein, the ordinate of pixel corresponding to preset value
It can be understood as the ordinate of the pixel at brow ridge with depth capacity information.L can be between forehead hairline line and lower chin
Range information.
Electronic equipment can believe the ordinate of the depth information of image corresponding to each pixel and each pixel
Breath, brings into the second distribution function, can calculate the corresponding second brightness enhancing coefficient of each pixel.
Step 406, institute is obtained according to the brightness enhancement factor, the first brightness enhancing coefficient, the second brightness enhancing coefficient
State light efficiency enhancing coefficient.
Electronic equipment can be by the cross of the depth information of image corresponding to each pixel and each pixel, ordinate
Information is brought into light efficiency model, and the corresponding light efficiency enhancing coefficient of each pixel can be calculated.
As shown in figure 5, in one embodiment, obtain the first brightness enhancing coefficient and obtain the second brightness enhancing coefficient it
Before, further include the steps that constructing the first distribution function and constructs the second distribution function.
Construct the second distribution function of the first distribution function and building, comprising the following steps:
Step 502, the first blast region with first direction and the second blast region with second direction are obtained.
Image to be processed is made of several pixels, this several pixel is according to certain aligned transfer at one
A two-dimensional pixel dot matrix.If establishing coordinate system as origin using the pixel in the most lower left corner of image, one two can be passed through
Dimension xy coordinate system is indicated the position of any one pixel in image.It wherein, can be by each transverse direction (with x-axis
Parallel direction) on pixel be referred to as pixel column, can will longitudinally in each on direction (direction parallel with y-axis) pixel
Referred to as pixel column.
Wherein, first direction can be understood as the direction parallel with y-axis (longitudinal direction), and first with first direction increases
Bright area, then the abscissa that can be regarded as all pixels point in the first blast region is identical, i.e. the first blast region is a certain picture
Element column.Correspondingly, second direction can be understood as the direction parallel with x-axis (transverse direction), second with second direction increases
Bright area, then the ordinate that can be regarded as all pixels point in the second blast region is identical, i.e. the second blast region is a certain picture
Plain row.
Electronic equipment can obtain the first blast region, and the first blast region may refer to carry out at blast image to be processed
The a certain pixel column region of reason.First blast region blast position can be considered as the light effects intensity added in x-axis direction
Highest pixel column region.Centered on the first blast region, the intensity for the light effects added to the first blast region two sides
It can gradually decrease.
Electronic equipment can obtain the second blast region, and the second blast region may refer to carry out at blast image to be processed
The a certain pixel column region of reason.Second blast region blast position can be considered as the light effects intensity added on y-axis direction
Highest pixel column region.Centered on the second blast region, the intensity for the light effects added to the second blast region side
It can gradually decrease, the intensity for the light effects added to the second blast region other side is constant.
Optionally, the first blast region and the second blast region can be the pixel column of the pre-set fixation of electronic equipment
Or pixel column.For example, the first blast region can be the center pixel row along the x-axis direction of human face region, the second blast region
It can be the pixel column along the y-axis direction of brow ridge region in human face region.
In one embodiment, electronic equipment can obtain the first enhancing region and second according to the depth information of acquisition
Enhance region.Electronic equipment can obtain the corresponding depth map of image, the pixel in depth map while acquiring image simultaneously
Point is corresponding with the pixel in image.Pixel in depth map indicates the depth information of respective pixel in image, depth information
As depth information of the corresponding object of pixel to electronic equipment.According to the depth map, the available each picture of human face region
The depth information of vegetarian refreshments.Electronic equipment can obtain the first mean depth of each pixel column in human face region according to the depth map
Information, and the second mean depth information of each pixel column in human face region is obtained, and will have maximum first mean depth
The pixel column of information is defined as the first enhancing region, and will there is the pixel column of maximum second mean depth information to be defined as the second increasing
Strong region.Certainly, the first enhancing region is also possible to other pre-set pixel columns, and the second enhancing region is also possible to other
Pre-set pixel column, is not limited to that.
Optionally, the first blast region, second enhancing region can also be user oneself selection position, user can to
It handles image and carries out slide, thus the first blast region needed for selection, the second enhancing region.Electronic equipment, which can receive, to be used
The slide at family, and slide obtains sliding trace based on the received, can be determined on first direction according to sliding trace
The second blast region on first blast region and second direction.
Specifically, the direction of available sliding trace and the coordinate information through pixel.When sliding trace and y-axis
When angle is less than the first preset value, then, it can be said that the blast region of the slide corresponding selection has first direction.Meanwhile
Available sliding trace the abscissa information through pixel, for example, if obtain sliding trace the quantity through pixel be
500, then the abscissa of this 500 pixels is obtained, the quantity of the pixel with same abscissa information is counted, and
Using the pixel column where the maximum abscissa of quantity as the first blast region.Correspondingly, when the angle of sliding trace and x-axis is small
When the second preset value, then, it can be said that the blast region of the slide corresponding selection has second direction.Meanwhile it can obtain
Take sliding trace the ordinate information through pixel, for example, if obtain sliding trace institute the quantity through pixel be 500,
The ordinate for obtaining this 500 pixels counts the quantity of the pixel with same ordinate information, and by quantity
Pixel column where maximum ordinate is as the second blast region.
User can select the first blast region and the second blast region according to actual needs, meet the needs of different user,
It can effectively improve the light effects of addition.
It is to be appreciated that the first blast region and the second blast region can also be used other modes and obtained, and not only
It is limited to above-mentioned several ways.
Step 504, according to first blast region determine the first distribution center and according to second blast region it is true
Fixed second distribution center.
Step 506, first distribution function is constructed according to first distribution center, and according in second distribution
The heart constructs second distribution function.
In one embodiment, light efficiency model include the first distribution function and the second distribution function, the first distribution function and
Second distribution function has different weight factors.
Wherein, k is brightness enhancement factor, f1It (x) is the first distribution function, a is the weight factor of the first distribution function;bf2
It (y) is the second distribution function, b is the weight factor of the second distribution function.
Electronic equipment can also determine the overall width w and total length l of human face region, wherein w can be regarded as sending out from the leftmost side
The distance between border and the rightmost side hairline information, l can be the distance between forehead hairline line and lower chin information.
Electronic equipment can determine the first distribution center according to determining first blast region, which can manage
Solution is the first distribution function f1(x) x inmid, wherein xmidFor the abscissa information in the first blast region.First brightness enhancing
Coefficient is maximum at first distribution center, and further away from first distribution center, corresponding first brightness enhances coefficient also just
Smaller, electronic equipment can enhance the variation tendency of coefficient according to the first brightness and the first distribution center just sees and determines the first distribution
Function f1(x)。
Specifically, the first distribution function f1(x) it can indicate are as follows:
Electronic equipment can determine the second distribution center according to determining second blast region, which is appreciated that
For the second distribution function f2(y) y inn, wherein ynFor the ordinate information in the second blast region.Second brightness enhancing coefficient exists
Maximum at second distribution center, in the first range, the second brightness enhancing coefficient is remained unchanged, remoter in the second range
From second distribution center, corresponding second brightness enhancing coefficient is also just smaller, and electronic equipment can enhance according to the second brightness
The variation tendency of coefficient and the second distribution center, which just see, determines the second distribution function f2(y)。
Specifically, the second distribution function bf2(y) it may be expressed as:
Therefore, electronic equipment can determine the first distribution center according to first blast region and increase according to described second
Bright area determines the second distribution center, and constructs first distribution function according to first distribution center, and according to described
Second distribution center constructs second distribution function.
Further, electronic equipment can also determine the weight factor a of the first distribution function and the power of the second distribution function
Repeated factor b determines light efficiency model according to determining the first distribution function and the second distribution function.
Specifically, light efficiency model can be expressed with following formula:
P (x, y)=k [af1(x)+bf2(y)]
Electronic equipment can construct light efficiency model according to the first determining distribution center, the second distribution center, and according to building
Light efficiency model to image to be processed carry out blast processing.
The light efficiency that electronic equipment can calculate each pixel of human face region according to light efficiency model enhances coefficient, and light efficiency is increased
Strong coefficient is as blast treated brightness value.Electronic equipment can enhance coefficient according to light efficiency and carry out blast processing to pixel,
Light effects are added in image to be processed.
In the present embodiment, electronic equipment can be by the superposition of the first distribution function and the second distribution function to form light efficiency
Model can be added the processing of light effects to image to be processed, and the brightness enhancing amplitude of the pixel of different location is different,
Image can be made to have better light effects, so that the light effects of addition are more true, natural.
It in one embodiment, further include described in removal before the luminance information and depth information that obtain the human face region
The step of Lighting information of image to be processed.
Electronic equipment can carry out maximum (minimum) value filtering to image to be processed and tentatively obtain illumination pattern;And to the illumination
Figure mean value (or Gauss) filtering obtain final illumination patterns figure, then removed according to image to be processed and illumination patterns figure to
Handle Lighting information in image.Optionally, electronic equipment be also based on RGB normalization, gamma transformation scheduling algorithm come remove to
Handle Lighting information in image.
In the present embodiment, electronic equipment can remove Lighting information in image to be processed, then remove no Lighting information
Human face region add light efficiency, image can be made to have better light effects so that addition light effects it is more true, oneself
So.Wherein, Lighting information can refer to object degree to be illuminated.
As shown in fig. 6, image processing method is further comprising the steps of:
Step 602, the portrait area of the image to be processed is detected according to the human face region.
Electronic equipment can detect the portrait area of image to be processed according to the human face region of identification, portrait area refer to
Handle the whole region of the portrait comprising acquisition in image.Human face region can belong to some in portrait area, portrait area
Other than face, it may also include four limbs, trunk of collected people etc..
In one embodiment, electronic equipment can obtain human face region pair after determining human face region from depth map
The depth information answered, then according to the corresponding depth information of the available portrait area of the corresponding depth information of human face region, so
The portrait area in image to be processed can be got according to the corresponding depth information of portrait area afterwards.
It is understood that portrait area can also be obtained by other methods, in the present embodiment without limiting.
Such as portrait area can also be obtained by the methods of artificial intelligence, region-growing method.
Step 604, it is partitioned into the portrait area from the image to be processed, to obtain background area.
Step 606, virtualization processing is carried out to the background area.
After electronic equipment detects portrait area, it can be partitioned into portrait area from image to be processed, to obtain in addition to people
As the background area other than region.Electronic equipment can reduce the brightness value of the background area in addition to portrait area, make background area
It is dimmed, and treated portrait area and dimmed background area are recombined to obtain treated image.Optionally, electronics
Equipment can carry out virtualization Fuzzy Processing to background area, and treated portrait area is recombined with dimmed background area
The image that obtains that treated.
In the present embodiment, electronic equipment can be such that the portrait area in background blurring treated image to be processed possesses more
Good light effects keep the light efficiency of announcing the items on a programme simulated in stage light curtain more true.
As shown in fig. 7, image processing method the following steps are included:
Step 702, the Lighting information of the image to be processed is removed;
Step 704, recognition of face is carried out to the image to be processed, determines the human face region of the image to be processed;
Step 706, the portrait area of the image to be processed is detected according to the human face region;
Step 708, it is partitioned into the portrait area from the image to be processed, to obtain background area;
Step 710, virtualization processing is carried out to the background area;
Step 712, the luminance information and depth information of the human face region are obtained;
Step 714, determine that the light efficiency in light efficiency model enhances coefficient according to the luminance information and depth information;
Step 716, coefficient is enhanced according to the light efficiency and light efficiency enhancing processing is carried out to the human face region, the light efficiency increases
Strong coefficient is the parameter for influencing light efficiency enhancing processing intensity.
In the present embodiment, electronic equipment can remove the Lighting information of image to be processed, and carry out light efficiency to human face region
Enhancing processing, and virtualization processing is carried out to background area, so that portrait area possesses better light effects, make to simulate stage light applications
Light efficiency of announcing the items on a programme in curtain is more true.
It should be understood that although each step in the flow chart of Fig. 3-7 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 3-7
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
As shown in figure 8, in one embodiment, providing a kind of image processing apparatus, including face recognition module 810, depth
Degree, which obtains module 820, coefficient determination module 830 and light efficiency, enhances module 840.
Face recognition module 810 determines the image to be processed for carrying out recognition of face to the image to be processed
Human face region;
Depth obtains module 820, for obtaining the luminance information and depth information of the human face region;
Coefficient determination module 830, for determining that the light efficiency in light efficiency model increases according to the luminance information and depth information
Strong coefficient;
Light efficiency enhances module 840, is added light effect to the human face region for enhancing coefficient according to the light efficiency
The processing of fruit, the light efficiency enhancing coefficient are used to adjust the intensity of the light effects.
In the present embodiment, recognition of face is carried out to image to be processed, determines the human face region of the image to be processed;It obtains
Take the luminance information and depth information of the human face region;It is determined in light efficiency model according to the luminance information and depth information
Light efficiency enhances coefficient;Enhance coefficient according to the light efficiency and light efficiency enhancing processing, the light efficiency enhancing are carried out to the human face region
Coefficient is the parameter for influencing light efficiency enhancing processing intensity, can be according to the luminance information and depth information dynamic regulation light of face
Effect intensity makes portrait image have better light effects, and simple and efficient to handle.
In one embodiment, coefficient determination module 830, comprising:
First factor determination unit obtains brightness enhancement factor according to the luminance information;The brightness enhancement factor is
Influence the first luminance parameter of light efficiency enhancing processing intensity;
Second factor determination unit determines light efficiency enhancing system according to the brightness enhancement factor and the depth information
Number.
In one embodiment, the light efficiency model includes the first distribution function and the second distribution function;
Second factor determination unit is used to obtain the first brightness enhancing system according to the depth information and the first distribution function
Number;Obtaining the second brightness according to the depth information and the second distribution function enhances coefficient;According to the brightness enhancement factor,
One brightness enhances coefficient, the second brightness enhancing coefficient obtains the light efficiency enhancing coefficient.
In one embodiment, the second factor determination unit is also according on the Depth Information Acquistion first direction
The second blast region on one blast region and second direction;The first distribution center and root are determined according to first blast region
The second distribution center is determined according to second blast region;First distribution function is constructed according to first distribution center,
And second distribution function is constructed according to second distribution center.
In one embodiment, the second factor determination unit is also in the slide for receiving user;According to the sliding rail
Mark determines the first blast region on first direction and the second blast region in second direction.
As shown in figure 9, in one embodiment, image processing apparatus includes face recognition module 910, depth acquisition module
920, coefficient determination module 930, light efficiency enhance module 940, further includes:
Illumination removes module 950, for removing the Lighting information of the image to be processed.
In the present embodiment, electronic equipment can remove Lighting information in image to be processed, then remove no Lighting information
Human face region add light efficiency, image can be made to have better light effects so that addition light effects it is more true, oneself
So.Wherein, Lighting information can refer to object degree to be illuminated.
In one embodiment, image processing apparatus, further includes:
Portrait detection module 960, for detecting the portrait area of the image to be processed according to the human face region;
Background confirmation module 970, for being partitioned into the portrait area from the image to be processed, to obtain background area
Domain;
Background blurring module 980, for carrying out virtualization processing to the background area.
In the present embodiment, electronic equipment can be such that the portrait area in background blurring treated image to be processed possesses more
Good light effects keep the light efficiency of announcing the items on a programme simulated in stage light curtain more true.
The embodiment of the present application also provides a kind of electronic equipment.It include image processing circuit in above-mentioned electronic equipment, at image
Reason circuit can use hardware and or software component realization, it may include define ISP (Image Signal Processing, figure
As signal processing) the various processing units of pipeline.Figure 10 is the schematic diagram of image processing circuit in one embodiment.Such as Figure 10 institute
Show, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present application.
As shown in Figure 10, image processing circuit includes ISP processor 1040 and control logic device 1050.Imaging device 1010
The image data of capture is handled by ISP processor 1040 first, and ISP processor 1040 analyzes image data can with capture
Image statistics for determining and/or imaging device 1010 one or more control parameters.Imaging device 1010 can wrap
Include the camera with one or more lens 1012 and imaging sensor 1014.Imaging sensor 1014 may include colour filter
Array (such as Bayer filter), imaging sensor 1014 can obtain the light captured with each imaging pixel of imaging sensor 1014
Intensity and wavelength information, and the one group of raw image data that can be handled by ISP processor 1040 is provided.1020 (such as top of sensor
Spiral shell instrument) parameter (such as stabilization parameter) of the image procossing of acquisition can be supplied to ISP processing based on 1020 interface type of sensor
Device 1040.1020 interface of sensor can use SMIA, and (Standard Mobile Imaging Architecture, standard are moved
Dynamic Imager Architecture) interface, other serial or parallel camera interfaces or above-mentioned interface combination.
In addition, raw image data can also be sent to sensor 1020 by imaging sensor 1014, sensor 1020 can base
Raw image data is supplied to ISP processor 1040 or sensor 1020 for original graph in 1020 interface type of sensor
As data storage is into video memory 1030.
ISP processor 1040 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 1040 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 1040 can also receive image data from video memory 1030.For example, 1020 interface of sensor will be former
Beginning image data is sent to video memory 1030, and the raw image data in video memory 1030 is available to ISP processing
Device 1040 is for processing.Video memory 1030 can be only in a part, storage equipment or electronic equipment of memory device
Vertical private memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
1014 interface of imaging sensor is come from or from 1020 interface of sensor or from video memory when receiving
When 1030 raw image data, ISP processor 1040 can carry out one or more image processing operations, such as time-domain filtering.Place
Image data after reason can be transmitted to video memory 1030, to carry out other processing before shown.ISP processor
1040 can also from video memory 1030 receive processing data, to above-mentioned processing data carry out original domain in and RGB and YCbCr
Image real time transfer in color space.Image data that treated may be output to display 1080, for user viewing and/or
It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor
1040 output also can be transmitted to video memory 1030, and display 1080 can read picture number from video memory 1030
According to.In one embodiment, video memory 1030 can be configured to realize one or more frame buffers.In addition, ISP is handled
The output of device 1040 can be transmitted to encoder/decoder 1070, so as to encoding/decoding image data.The image data of coding can
It is saved, and is decompressed before being shown in 1080 equipment of display.
The step of processing image data of ISP processor 1040 includes: to carry out VFE (Video Front to image data
End, video front) it handles and CPP (Camera Post Processing, camera post-processing) processing.To image data
VFE processing may include correct image data contrast or brightness, modification record in a digital manner illumination conditions data, to figure
As data compensate processing (such as white balance, automatic growth control, γ correction etc.), image data is filtered.
CPP processing to image data may include zooming in and out to image, providing preview frame and record frame to each path.Wherein, CPP
Different codecs can be used to handle preview frame and record frame.
Treated that image data can be transmitted to light efficiency module 1060 for ISP processor 1040, so as to the root before shown
The processing of light effects is added to image according to light efficiency model.Wherein, light efficiency module 1060 can be the CPU in electronic equipment
(Central Processing Unit, central processing unit), GPU or coprocessor etc..Treated the data of light efficiency module 1060
It can be transmitted to encoder/decoder 1070, so as to encoding/decoding image data.The image data of coding can be saved, and aobvious
It is decompressed before being shown in 1080 equipment of display.Wherein, light efficiency module 1060 may be additionally located at encoder/decoder 1070 and show
Show between device 1080, i.e., light efficiency module 1060 is added light efficiency processing to the image being imaged.Above-mentioned encoder/decoder
1070 can be CPU, GPU or coprocessor etc. in electronic equipment.
The statistical data that ISP processor 1040 determines, which can be transmitted, gives control logic device Unit 1050.For example, statistical data can
It is passed including the images such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 1012 shadow correction of lens
1014 statistical information of sensor.Control logic device 1050 may include executing the processor of one or more examples (such as firmware) and/or micro-
Controller, one or more routines can statistical data based on the received, determine at control parameter and the ISP of imaging device 1010
Manage the control parameter of device 1040.For example, the control parameter of imaging device 1010 may include that 1020 control parameter of sensor (such as increases
Benefit, spectrum assignment the time of integration), camera flash control parameter, 1012 control parameter of lens (such as focus or zoom coke
Away from) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example, in RGB processing
Period) 1012 shadow correction parameter of gain level and color correction matrix and lens.
In the present embodiment, above-mentioned image processing method can be realized with image processing techniques in Figure 10.
In one embodiment, a kind of electronic equipment, including memory and processor are provided, are stored with calculating in memory
Machine program, when computer program is executed by processor, so that processor executes following steps:
Recognition of face is carried out to image to be processed, determines the human face region of image to be processed;
Obtain the luminance information of human face region;
Determine that the brightness in light efficiency model enhances coefficient according to luminance information;
The processing of light effects is added to image to be processed according to light efficiency model, brightness enhancing coefficient is for adjusting light
The intensity of line effect.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, the calculating
Machine program realizes above-mentioned image processing method when being executed by processor.
In one embodiment, a kind of computer program product comprising computer program is provided, when it is in electronic equipment
When upper operation, so that electronic equipment realizes above-mentioned image processing method when executing.
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..
It may include as used herein non-volatile to any reference of memory, storage, database or other media
And/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM),
Electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include arbitrary access
Memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM is available in many forms, such as
It is static RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), enhanced
SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of image processing method characterized by comprising
Recognition of face is carried out to image to be processed, determines the human face region of the image to be processed;
Obtain the luminance information and depth information of the human face region;
Determine that the light efficiency in light efficiency model enhances coefficient according to the luminance information and depth information;
Enhance coefficient according to the light efficiency and light efficiency enhancing processing is carried out to the human face region, the light efficiency enhancing coefficient is to influence
The parameter of light efficiency enhancing processing intensity.
2. the method according to claim 1, wherein described determine light according to the luminance information and depth information
The light efficiency imitated in model enhances coefficient, comprising:
Brightness enhancement factor is obtained according to the luminance information;The brightness enhancement factor is to influence light efficiency enhancing processing intensity
First luminance parameter;
The light efficiency enhancing coefficient is determined according to the brightness enhancement factor and the depth information.
3. according to the method described in claim 2, it is characterized in that, the light efficiency model includes the first distribution function and second point
Cloth function;
It is described to determine that the light efficiency enhances coefficient according to the brightness enhancement factor and the depth information, comprising:
Obtaining the first brightness according to the depth information and the first distribution function enhances coefficient;
Obtaining the second brightness according to the depth information and the second distribution function enhances coefficient;
Light efficiency enhancing system is obtained according to the brightness enhancement factor, the first brightness enhancing coefficient, the second brightness enhancing coefficient
Number.
4. according to the method described in claim 3, it is characterized in that, before the first brightness of acquisition enhancing coefficient, further includes:
Obtain the second blast region on the first blast region and second direction on first direction;
The first distribution center is determined according to first blast region and is determined in the second distribution according to second blast region
The heart;
First distribution function is constructed according to first distribution center, and according to second distribution center building described the
Two distribution functions.
5. according to the method described in claim 4, it is characterized in that, the first blast region obtained on first direction and the
The second blast region on two directions, further includes:
Receive the slide of user;
The first blast region on first direction and the second blast region in second direction are determined according to the sliding trace.
6. the method according to claim 1, wherein the luminance information and depth for obtaining the human face region
Before information, further includes:
Remove the Lighting information of the image to be processed.
7. method according to claim 1-6, which is characterized in that the method also includes:
The portrait area of the image to be processed is detected according to the human face region;
It is partitioned into the portrait area from the image to be processed, to obtain background area;
Virtualization processing is carried out to the background area.
8. a kind of image processing apparatus characterized by comprising
Face recognition module determines the face area of the image to be processed for carrying out recognition of face to the image to be processed
Domain;
Depth obtains module, for obtaining the luminance information and depth information of the human face region;
Coefficient determination module, for determining that the light efficiency in light efficiency model enhances coefficient according to the luminance information and depth information;
Light efficiency enhances module, for enhancing the place that coefficient is added light effects to the human face region according to the light efficiency
Reason, the light efficiency enhancing coefficient are used to adjust the intensity of the light effects.
9. a kind of electronic equipment, including memory and processor, computer program, the computer are stored in the memory
When program is executed by the processor, so that the processor realizes the method as described in claim 1 to 7 is any.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The method as described in claim 1 to 7 is any is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810997702.XA CN109242794B (en) | 2018-08-29 | 2018-08-29 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810997702.XA CN109242794B (en) | 2018-08-29 | 2018-08-29 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109242794A true CN109242794A (en) | 2019-01-18 |
CN109242794B CN109242794B (en) | 2021-05-11 |
Family
ID=65068721
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810997702.XA Expired - Fee Related CN109242794B (en) | 2018-08-29 | 2018-08-29 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109242794B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110276290A (en) * | 2019-06-17 | 2019-09-24 | 深圳市繁维科技有限公司 | Fast face face mould acquisition method and fast face face mould acquisition device based on TOF mould group |
CN110354499A (en) * | 2019-07-15 | 2019-10-22 | 网易(杭州)网络有限公司 | The method and device of profile photocontrol |
CN110706162A (en) * | 2019-09-02 | 2020-01-17 | 深圳传音控股股份有限公司 | Image processing method and device and computer storage medium |
CN111314618A (en) * | 2020-03-17 | 2020-06-19 | Tcl移动通信科技(宁波)有限公司 | Shooting method, shooting device, storage medium and mobile terminal |
CN112102207A (en) * | 2020-10-29 | 2020-12-18 | 北京澎思科技有限公司 | Method and device for determining temperature, electronic equipment and readable storage medium |
CN113096231A (en) * | 2021-03-18 | 2021-07-09 | 北京达佳互联信息技术有限公司 | Image processing method and device, electronic equipment and storage medium |
CN114066909A (en) * | 2021-10-19 | 2022-02-18 | 北京达佳互联信息技术有限公司 | Image processing method and device |
CN114615440A (en) * | 2022-03-08 | 2022-06-10 | 维沃移动通信有限公司 | Photographing method, photographing apparatus, electronic device, and readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308572A (en) * | 2008-06-24 | 2008-11-19 | 北京中星微电子有限公司 | Luminous effect processing method and apparatus |
CN102499711A (en) * | 2011-09-28 | 2012-06-20 | 无锡祥生医学影像有限责任公司 | Three-dimensional or four-dimensional automatic ultrasound image optimization and adjustment method |
CN104349072A (en) * | 2013-08-09 | 2015-02-11 | 联想(北京)有限公司 | Control method, device and electronic equipment |
WO2017108703A1 (en) * | 2015-12-24 | 2017-06-29 | Unilever Plc | Augmented mirror |
CN107018323A (en) * | 2017-03-09 | 2017-08-04 | 广东欧珀移动通信有限公司 | Control method, control device and electronic installation |
CN107241557A (en) * | 2017-06-16 | 2017-10-10 | 广东欧珀移动通信有限公司 | Image exposure method, device, picture pick-up device and storage medium |
CN107241558A (en) * | 2017-06-16 | 2017-10-10 | 广东欧珀移动通信有限公司 | Exposure processing method, device and terminal device |
CN107451969A (en) * | 2017-07-27 | 2017-12-08 | 广东欧珀移动通信有限公司 | Image processing method, device, mobile terminal and computer-readable recording medium |
CN107730445A (en) * | 2017-10-31 | 2018-02-23 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN108419028A (en) * | 2018-03-20 | 2018-08-17 | 广东欧珀移动通信有限公司 | Image processing method, device, computer readable storage medium and electronic equipment |
-
2018
- 2018-08-29 CN CN201810997702.XA patent/CN109242794B/en not_active Expired - Fee Related
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308572A (en) * | 2008-06-24 | 2008-11-19 | 北京中星微电子有限公司 | Luminous effect processing method and apparatus |
CN102499711A (en) * | 2011-09-28 | 2012-06-20 | 无锡祥生医学影像有限责任公司 | Three-dimensional or four-dimensional automatic ultrasound image optimization and adjustment method |
CN104349072A (en) * | 2013-08-09 | 2015-02-11 | 联想(北京)有限公司 | Control method, device and electronic equipment |
WO2017108703A1 (en) * | 2015-12-24 | 2017-06-29 | Unilever Plc | Augmented mirror |
CN107018323A (en) * | 2017-03-09 | 2017-08-04 | 广东欧珀移动通信有限公司 | Control method, control device and electronic installation |
CN107241557A (en) * | 2017-06-16 | 2017-10-10 | 广东欧珀移动通信有限公司 | Image exposure method, device, picture pick-up device and storage medium |
CN107241558A (en) * | 2017-06-16 | 2017-10-10 | 广东欧珀移动通信有限公司 | Exposure processing method, device and terminal device |
CN107451969A (en) * | 2017-07-27 | 2017-12-08 | 广东欧珀移动通信有限公司 | Image processing method, device, mobile terminal and computer-readable recording medium |
CN107730445A (en) * | 2017-10-31 | 2018-02-23 | 广东欧珀移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
CN108419028A (en) * | 2018-03-20 | 2018-08-17 | 广东欧珀移动通信有限公司 | Image processing method, device, computer readable storage medium and electronic equipment |
Non-Patent Citations (3)
Title |
---|
杨梅: "变化光照环境下的人脸识别", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
王称意: "一种复杂光照条件下的人眼定位方法", 《电子测试》 * |
胡珍珍: "基于深度数据的人脸旋转角度估计及三维人脸识别的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110276290A (en) * | 2019-06-17 | 2019-09-24 | 深圳市繁维科技有限公司 | Fast face face mould acquisition method and fast face face mould acquisition device based on TOF mould group |
CN110276290B (en) * | 2019-06-17 | 2024-04-19 | 深圳市繁维科技有限公司 | Quick face model acquisition method and quick face model acquisition device based on TOF module |
CN110354499A (en) * | 2019-07-15 | 2019-10-22 | 网易(杭州)网络有限公司 | The method and device of profile photocontrol |
CN110706162A (en) * | 2019-09-02 | 2020-01-17 | 深圳传音控股股份有限公司 | Image processing method and device and computer storage medium |
CN111314618A (en) * | 2020-03-17 | 2020-06-19 | Tcl移动通信科技(宁波)有限公司 | Shooting method, shooting device, storage medium and mobile terminal |
CN111314618B (en) * | 2020-03-17 | 2021-09-28 | Tcl移动通信科技(宁波)有限公司 | Shooting method, shooting device, storage medium and mobile terminal |
CN112102207A (en) * | 2020-10-29 | 2020-12-18 | 北京澎思科技有限公司 | Method and device for determining temperature, electronic equipment and readable storage medium |
CN113096231A (en) * | 2021-03-18 | 2021-07-09 | 北京达佳互联信息技术有限公司 | Image processing method and device, electronic equipment and storage medium |
CN113096231B (en) * | 2021-03-18 | 2023-10-31 | 北京达佳互联信息技术有限公司 | Image processing method and device, electronic equipment and storage medium |
CN114066909A (en) * | 2021-10-19 | 2022-02-18 | 北京达佳互联信息技术有限公司 | Image processing method and device |
CN114615440A (en) * | 2022-03-08 | 2022-06-10 | 维沃移动通信有限公司 | Photographing method, photographing apparatus, electronic device, and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109242794B (en) | 2021-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109242794A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108537155A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108537749A (en) | Image processing method, device, mobile terminal and computer readable storage medium | |
CN105144233B (en) | Reference picture selection for moving ghost image filtering | |
CN110149482A (en) | Focusing method, device, electronic equipment and computer readable storage medium | |
CN108419028B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN107862657A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN108540716A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108764370A (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN108632512A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN108055452A (en) | Image processing method, device and equipment | |
CN107993209B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN108810418A (en) | Image processing method, device, mobile terminal and computer readable storage medium | |
CN109191403A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN107808137A (en) | Image processing method, device, electronic equipment and computer-readable recording medium | |
CN107730446A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN108024054A (en) | Image processing method, device and equipment | |
CN107886484A (en) | U.S. face method, apparatus, computer-readable recording medium and electronic equipment | |
CN107509031A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN108846807A (en) | Light efficiency processing method, device, terminal and computer readable storage medium | |
CN108111749A (en) | Image processing method and device | |
CN109002843A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN108875619A (en) | Method for processing video frequency and device, electronic equipment, computer readable storage medium | |
CN108810406A (en) | Portrait light efficiency processing method, device, terminal and computer readable storage medium | |
CN108717530A (en) | Image processing method, device, computer readable storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210511 |
|
CF01 | Termination of patent right due to non-payment of annual fee |