[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105681774B - The method and terminal of a kind of image procossing - Google Patents

The method and terminal of a kind of image procossing Download PDF

Info

Publication number
CN105681774B
CN105681774B CN201610107557.4A CN201610107557A CN105681774B CN 105681774 B CN105681774 B CN 105681774B CN 201610107557 A CN201610107557 A CN 201610107557A CN 105681774 B CN105681774 B CN 105681774B
Authority
CN
China
Prior art keywords
target
specular reflection
areas
chromatic value
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610107557.4A
Other languages
Chinese (zh)
Other versions
CN105681774A (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.)
Shenzhen Microphone Holdings Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201610107557.4A priority Critical patent/CN105681774B/en
Publication of CN105681774A publication Critical patent/CN105681774A/en
Application granted granted Critical
Publication of CN105681774B publication Critical patent/CN105681774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The embodiments of the invention provide a kind of method of image procossing, methods described includes:Face datection is carried out to pending image, to obtain the human face region in the pending image;Determine the target areas of specular reflection in the human face region;The target areas of specular reflection is projected into IIC spaces, to obtain the data for projection of the target areas of specular reflection;The data for projection is fitted, to obtain fitting a straight line;Multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line;The target chromatic value of default passage is estimated according to the multiple chromatic value, wherein, the default passage is any passage in r, g, b passage;The colour temperature of the pending image is determined by the target chromatic value;The pending image is handled according to the colour temperature.The embodiment of the present invention additionally provides a kind of terminal.It may be such that personage's colour of skin in image is more natural by the embodiment of the present invention.

Description

The method and terminal of a kind of image procossing
Technical field
The present invention relates to technical field of image processing, and in particular to the method and terminal of a kind of image procossing.
Background technology
At present, no matter the camera of dedicated video camera or terminal (such as mobile phone, tablet personal computer) is during taking pictures, White balancing techniques are the technologies that must be used.The application target of white balancing techniques and the color constancy of human eye have directly Relation.So-called color constancy refers to that people are to the color of object surface when the color of light for irradiating body surface changes Consciousness remain in that constant perceptual properties.And the purpose of white balancing techniques is exactly image and the people in order to ensure to shoot to come The scene arrived soon does not have aberration.Current white balancing techniques in particular circumstances, such as:Under noctovision environment either scene light Under the complex environment of line effect, it is serious that personage's colour of skin colour cast can be produced during handling image.
The content of the invention
The embodiments of the invention provide a kind of method of image procossing and terminal, it can cause personage's colour of skin in image more It is natural.
First aspect of the embodiment of the present invention provides a kind of method of image procossing, including:
Face datection is carried out to pending image, to obtain the human face region in the pending image;
Determine the target areas of specular reflection in the human face region;
The target areas of specular reflection is projected into IIC spaces, to obtain the projection of the target areas of specular reflection Data;
The data for projection is fitted, to obtain fitting a straight line;
Multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line;
The target chromatic value of default passage is estimated according to the multiple chromatic value, is led to wherein the default passage is r, g, b Any passage in road;
The colour temperature of the pending image is determined by the target chromatic value;
The pending image is handled according to the colour temperature.
Second aspect of the embodiment of the present invention provides a kind of terminal, including:
Detection unit, for carrying out Face datection to pending image, to obtain the face area in the pending image Domain;
First determining unit, the target mirror-reflection in the human face region detected for determining the detection unit Region;
Projecting cell, the target areas of specular reflection for first determining unit to be determined project to IIC skies Between, to obtain the data for projection of the target areas of specular reflection;
Fitting unit, the data for projection for the projection unit projects to be obtained is fitted, to be fitted Straight line;
First computing unit, the fitting a straight line for being fitted to obtain based on the fitting unit calculate the target mirror Multiple chromatic values of face reflector space;
First evaluation unit, the multiple chromatic value estimation for being calculated according to first computing unit are default logical The target chromatic value in road, wherein the default passage is any passage in r, g, b passage;
Second determining unit, for the target chromatic value that is estimated by first evaluation unit determine described in treat Handle the colour temperature of image;
Processing unit, for being carried out according to the colour temperature that second determining unit is determined to the pending image Processing.
Implement the embodiment of the present invention, have the advantages that:
By the embodiment of the present invention, Face datection is carried out to pending image, to obtain the face in the pending image Region, the target areas of specular reflection in the human face region is determined, and the target areas of specular reflection is projected into IIC spaces, To obtain the data for projection of the target areas of specular reflection, the data for projection is fitted, to obtain fitting a straight line, based on this Fitting a straight line calculates multiple chromatic values of the target areas of specular reflection, and the target of default passage is estimated according to the plurality of chromatic value Chromatic value, the wherein default passage are any passage in r, g, b passage;The pending image is determined by the target chromatic value Colour temperature, the pending image is handled according to the colour temperature.So as to, Face datection only is carried out to pending image, will Human face region in the pending image determines the colour temperature in whole pending image, therefore, may be such that personage's skin in image Color is more natural.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.
Fig. 1 is a kind of first embodiment schematic flow sheet of the method for image procossing provided in an embodiment of the present invention;
Fig. 1 a are a kind of exemplary plots projected based on IIC models provided in an embodiment of the present invention;
Fig. 1 b are colour temperature curve exemplary plots provided in an embodiment of the present invention;
Fig. 2 is a kind of second embodiment schematic flow sheet of the method for image procossing provided in an embodiment of the present invention;
Fig. 3 is a kind of 3rd embodiment schematic flow sheet of the method for image procossing provided in an embodiment of the present invention;
Fig. 4 is a kind of first embodiment structural representation of terminal provided in an embodiment of the present invention;
Fig. 5 is a kind of second embodiment structural representation of terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Terminal described by the embodiment of the present invention can include smart mobile phone (such as Android phone, iOS mobile phones, Windows Phone mobile phones etc.), tablet personal computer, palm PC, notebook computer, mobile internet device (MID, Mobile Internet Devices) or Wearable etc., above-mentioned terminal is only citing, and non exhaustive, including but not limited to above-mentioned end End.
Referring to Fig. 1, illustrate for a kind of first embodiment flow of method of image procossing provided in an embodiment of the present invention Figure.The method of image procossing described in the present embodiment, comprises the following steps:
101st, Face datection is carried out to pending image, to obtain the human face region in the pending image.
In the embodiment of the present invention, pending image can be the image shot using the camera of terminal, in the shooting of terminal After head is shot, raw images are can obtain, linearization process can be carried out to the raw images, in the linearisation and then entered Row Demosaic processing, can be to obtain the pending image in the present invention.
Wherein, the step of being shot using the camera of terminal to obtain pending image is as follows:To utilizing terminal The raw images that camera shoots to obtain carry out linearization process.Linearization process can be according to equation below:
Wherein, raw_data is raw view data, and liner_data is the data after linearization process.
Then, demosaic processing is carried out to the data after above-mentioned linearization process, carries out the main of demosaic processing Reason is:Because sensor can only experience " intensity " rather than " color " of light, it is then desired to be placed before sensor The optical filter of specific wavelength so that the optical signal acted on after these optical filters on a sensor is the product of single wavelength Form (such as 550nm), rather than the integrated form of whole visible light wave range (380nm~780nm).Realize that this function is most common Optical filter be exactly Bayer filter.
Grey parts are CMOS, and chrominance section is the filter of corresponding color, and pixel corresponding to each filter lower section can only Receive the optical signal of the filter corresponding wavelength, rather than the optical signal of whole limit of visible spectrum.According to the filter of four, the upper left corner The order of mirror from left to right, from top to bottom typically has " RGGB ", " GBRG ", " GRBG ", " BGGR " several.Therefore, as long as learning The arrangement mode can of the Bayer filter of sensor calculates Demosaic.Common interpolation algorithm is all typically used, for example, it is double The interpolation algorithm such as linear interpolation, intermediate value interpolation, but from the point of view of algorithm complex and algorithm practicality, it is preferable that use Directly every four pixels are synthesized into a pixel is handled, and it is as follows to calculate program (in Matlab):
Wherein, r, g, b are the value of the red, green, blue triple channel of image, and row is the width of image, and col is the height of image.From And linearization process and Demosaic processing are carried out to raw images, can be to obtain pending image.
Wherein, terminal can carry out Face datection to pending image, so as to, it may be determined that the face area in pending image Domain.Wherein, in the case of in pending image comprising a face, it may be determined that 1 human face region in the pending image; In the case of multiple faces being included in pending image, it may be determined that multiple human face regions in the pending image.
102nd, the target areas of specular reflection in the human face region is determined.
In the embodiment of the present invention, terminal, which can cut out the human face region in pending image, to be come, and to the human face region Areas of specular reflection detection is carried out, so as to, it may be determined that the target areas of specular reflection in the human face region.It can be seen that target minute surface Reflector space is the subregion in human face region.Terminal carries out Face datection in pending image, it may be determined that this waits to locate The human face region in image is managed, image segmentation can be carried out to the pending image, to obtain the target mirror in the pending image Face reflector space, more precisely, target areas of specular reflection is the part in human face region.In actual applications, target Areas of specular reflection is made up of more sub-regions.
Step 102 can be realized by dark is theoretical, as follows:Theoretical, the higher dark region of brightness from dark, It is bigger for the probability of areas of specular reflection, and detection face reflector space can be realized by formula (3), as follows:
Wherein, Ω (x) is any facial image of the center in x in formula (3), wherein, x is the centre coordinate of subgraph, y It is ordinate corresponding to the centre coordinate x of subgraph, c represents any passage, and r, g, b are respectively that the red of pending image is led to Road, green channel and blue channel, I are dark channel image.
Alternatively, terminal can first determine the areas of specular reflection in human face region, then, then the areas of specular reflection be entered Row areas of specular reflection detects, to obtain the target areas of specular reflection in the areas of specular reflection.That is, human face region is carried out Areas of specular reflection detects twice, so, can improve the precision of areas of specular reflection.Further, terminal can also be to face area Domain carries out multiple areas of specular reflection detection, is illustrated by taking the detection of 3 secondary mirror reflector spaces as an example, first, to human face region Areas of specular reflection detection is carried out, to obtain the first areas of specular reflection, because the first areas of specular reflection often includes one A little irreflexive regions, therefore, areas of specular reflection detection can be carried out to first areas of specular reflection again, to obtain second Areas of specular reflection, finally, in order to improve white balance precision, can also areas of specular reflection be carried out to second areas of specular reflection Detection, using the region eventually detected as target areas of specular reflection.
103rd, the target areas of specular reflection is projected into IIC spaces, to obtain the target areas of specular reflection Data for projection.
In the embodiment of the present invention, terminal can project to target areas of specular reflection in IIC spaces, first, can calculation procedure The chroma of the value of r, g, b triple channel of image and corresponding passage corresponding to the target areas of specular reflection inputted in 102 Value, such as formula (4):
Wherein, in formula (4), any passage, chroma in c r, g, bcFor c passage chroma values, also referred to as chromaticity Value.I is image corresponding to target areas of specular reflection.
In IIC spaces, theoretical from dichromatic reflection model (DRM model), any image can be by diffusing reflection and mirror Two parts are reflected to represent in face, and involved image is not also for example, as shown in below equation (5) in this implementation:
Ic(x)=md(x)Λc(x)+ms(x)Γc (5)
Wherein, m in formula (5)d(x) can represent shaped like formula (6):
Wherein, m in formula (5)s(x) can represent shaped like formula (7):
It can be released by formula (5) and formula (4), the chromatic value chromaticity of image can be expressed as
Wherein, I in formula (5)-formula (8)c(x) light source, Γ are representedcRepresent mirror-reflection, Λc(x) diffusing reflection is represented, md(x) parameter, m are assessed for diffusing reflections(x) parameter is assessed for mirror-reflection.
Then, can be derived by formula (8)
It is available to bring the result of above-mentioned formula (9) into formula (8):
Wherein, p in formula (9)c(x) it can represent as follows:
pc(x)=md(x)(Λc(x)-Γc) (11)
From above-mentioned formula (10), after target areas of specular reflection is projected in IIC spaces, the intercept of gained The as colour temperature to be calculated in the present embodiment.As shown in Figure 1a, the target areas of specular reflection can be according to described by Fig. 1 a Model is detected.
From Fig. 1 a, horizontal straight line is diffusing reflection part in Fig. 1 a, and slope major part and is met at a bit with Y-axis For specular reflection component.Reference can be made to Fig. 1 a, can have following equation summary by the model in Fig. 1 a:
Y=kx+b, x > Threshold
Y=N, x≤Threshold (11)
Under the description of formula (11), it is only necessary to which Threshold cans corresponding to obtaining effectively remove diffusing reflection portion Divide influence of the pixel to arithmetic result.And belong to graded at Threshold it can be seen from the model described in Fig. 1 a Point, therefore graded point is obtained using first derivative, such as formula (12):
Wherein, the ii shown in formula (12) represents anti-enhancing (inverse intensity), specifically such as formula (13) institute Show:
Wherein, step can be set according to specific actual conditions, and default step scope is 0.05-0.2 by this patent, can Selection of land, step can be between 0-1 herein, it is preferable that 0.05-0.2.
Solution first derivative is carried out to formula (11), as shown in formula (14):
Preferably, in above-mentioned formula, Threshold can be first element for being more than 0 in T.
104th, the data for projection is fitted, to obtain fitting a straight line.
In the embodiment of the present invention, the data for projection in step 103 can be fitted by terminal using least square method, be one Bar straight line simultaneously calculates its slope and intercept.Specifically, as shown in formula (15):
D=yave-a·xave (15)
Wherein, ave subscripts represent all data points are equidistantly averaged according to x-axis formula (15) in this patent The data point of processing.Middle a represents slope, and d represents intercept.Due to, target areas of specular reflection be it is multiple, thus, correspond to more Individual a and multiple d.
105th, multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line.
In the embodiment of the present invention, terminal can pass through multiple chromatic values of any passage in r, g, b.For either objective minute surface Reflector space, all can be by a and d.Wherein, d is the chromatic value that our necessary requirements obtain.
106th, the target chromatic value of default passage is estimated according to the multiple chromatic value, wherein the default passage be r, g, Any passage in b passages.
In the embodiment of the present invention, terminal can carry out estimating target chromatic value to any passage in r, g, b, for example, with r passages Exemplified by illustrate,
Specifically, probabilistic goal chromatic value can be obtained by probability density algorithm.Its theoretical and embodiment is as follows:
From the knowledge of probability theory, it is assumed that sampled data values obey a unknown probability density function in D dimension spaces, Probability so in the R of region is:
P=∫Rp(x)dx (16)
In the present embodiment, D is 2 dimension spaces, and R is target areas of specular reflection, and sample data can be above-mentioned intercept d, probability P The implication probability that just falls into region R for each sample number strong point be P.Assuming that N number of sample number strong point has K to fall into region R, It so should just obey bi-distribution:
When N sample datas are very big, K is approximately equal to N*P.It is on the contrary, it is assumed that if region R is sufficiently small, then P is approximately equal to p (x) * V (V is region R space).
I.e.:
p≈p(x)·V (18)
By formula (17) and (18), can obtain:
Alternatively, the maximum chromatic value of probability density is tried to achieve as target chromatic value according to formula (18).Further, eventually End can also be using second largest chromatic value of concept density as target chromatic value.
107th, the colour temperature of the pending image is determined by the target chromatic value.
In the embodiment of the present invention, colour temperature can be the chromatic value of tri- passages of r, g, b, because pending image can be by r, g, b Three passages are formed, so as to when the chromatic value of a certain passage determines in three passages, solve the color of two other passage Performance number.
Specifically, due to dichromatic reflection model (Dichromatic Reflection Model, DRM) model and anti-enhancing The theory of tone (Inverse Intensity Chroma, IIC) model is based on certain condition and is calculating object minute surface It can also happen that error, then, can introduce colour temperature curve and be verified during the region of reflection.The fitting of colour temperature curve can be in reality It is acquired using gray card using fixed component under the conditions of testing, and is fitted according to the data point of collection, the present invention exists In specific implementation process, inventor is acquired using the video camera component of Gionee S5.1PRO mobile phones and environment is shot, So as to which as shown in Figure 1 b, the transverse axis of the colour temperature curve is the chromatic value (being represented by x) of r passages to the colour temperature curve of fitting, and the longitudinal axis is The chromatic value (being represented by y) of g passages, the relation of the chromatic value of r passages and the chromatic value of g passages, can be such as formula (20):
Y=3.1627x2+ 1.8346x=0.1826 (20)
Wherein, if x is certain, then can directly obtain y, i.e., known to the chromatic value in r passages in the case of, can direct solution Go out the chromatic value of y passages.
Alternatively, terminal also can obtain the colour temperature curve about r passages Yu b passages, or, the colour temperature of g passages and b passages Curve, thus, a demand solves the chromatic value of any passage, can be in the hope of the chromatic value of other passages, Suo Youtong The chromatic value in road may make up the colour temperature of image.
108th, the pending image is handled according to the colour temperature.
In the embodiment of the present invention, the colour temperature that available step 108 obtains is handled pending image.
By the embodiment of the present invention, Face datection is carried out to pending image, to obtain the face in the pending image Region, the target areas of specular reflection in the human face region is determined, and the target areas of specular reflection is projected into IIC spaces, To obtain the data for projection of the target areas of specular reflection, the data for projection is fitted, to obtain fitting a straight line, based on this Fitting a straight line calculates multiple chromatic values of the target areas of specular reflection, and the target of default passage is estimated according to the plurality of chromatic value Chromatic value, the wherein default passage are any passage in r, g, b passage;The pending image is determined by the target chromatic value Colour temperature, the pending image is handled according to the colour temperature.So as to, Face datection only is carried out to pending image, will Human face region in the pending image determines the colour temperature in whole pending image, therefore, may be such that personage's skin in image Color is more natural.
Referring to Fig. 2, illustrate for a kind of second embodiment flow of method of image procossing provided in an embodiment of the present invention Figure.The method of image procossing described in the present embodiment, comprises the following steps:
201st, Face datection is carried out to pending image, to obtain the human face region in the pending image.
202nd, the human face region is divided into the multiple separate blocks regions of size identical.
In the embodiment of the present invention, terminal can divide to human face region, be divided into the multiple independences of size identical Square areas, wherein, the size in each separate blocks region can be 3 × 3,5 × 5,7 × 7,9 × 9,11 × 11 etc.. When human face region is multiple, each human face region can be divided into the multiple separate blocks regions of size identical respectively.
203rd, the dark channel value in the multiple separate blocks region is calculated respectively, to obtain multiple dark channel values.
In the embodiment of the present invention, each separate blocks region corresponds to a dark channel value, so as to can obtain multiple help secretly Road value.
Theoretical, the higher dark region of brightness from dark, it is bigger for the probability of areas of specular reflection, inspection Surveying face reflector space can be realized by equation below, as follows:
Wherein, Ω (x) is a certain facial image that center is x, wherein, x is the centre coordinate of the image, and y is the image Centre coordinate x corresponding to ordinate, c represents any passage, and r, g, b are respectively that the red channel of pending image, green are logical Road and blue channel, I are dark channel image.
204th, separate blocks region corresponding to the target dark channel value in the multiple dark channel value is specularly reflecting Region, wherein the target dark channel value is all higher than predetermined threshold value.
In the embodiment of the present invention, terminal can be to multiple dark channel values compared with predetermined threshold value, if dark channel value i is more than Predetermined threshold value, then using dark channel value i as target dark channel value, wherein, dark channel value i is in the plurality of dark channel value Any one.Wherein, predetermined threshold value can be determined by empirical value, or, set by user.
205th, areas of specular reflection detection is carried out to the areas of specular reflection, to obtain in the areas of specular reflection Target areas of specular reflection.
206th, the target areas of specular reflection is projected into IIC spaces, to obtain the target areas of specular reflection Data for projection.
207th, the data for projection is fitted, to obtain fitting a straight line.
208th, multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line.
209th, the target chromatic value of default passage is estimated according to the multiple chromatic value, wherein the default passage be r, g, Any passage in b passages.
In the embodiment of the present invention, terminal can construct probability density function, be gone out to preset according to the PDF estimation logical The target chromatic value in road.
210th, the colour temperature of the pending image is determined by the target chromatic value.
211st, the pending image is handled according to the colour temperature.
By the embodiment of the present invention, Face datection is carried out to pending image, to obtain the face in the pending image Region, the areas of specular reflection in the human face region is determined, and the areas of specular reflection is divided into multiple separate blocks regions, The dark channel value in each separate blocks region is calculated, is more than in the dark channel value corresponding to the target dark channel value of predetermined threshold value solely Cubic block region projects to IIC spaces as target areas of specular reflection, and by the target areas of specular reflection, to obtain the mesh The data for projection of areas of specular reflection is marked, the data for projection is fitted, to obtain fitting a straight line, based on the fitting a straight line meter Multiple chromatic values of the target areas of specular reflection are calculated, the target chromatic value of default passage is estimated according to the plurality of chromatic value, its In the default passage be any passage in r, g, b passage;The colour temperature of the pending image, root are determined by the target chromatic value The pending image is handled according to the colour temperature.So that only Face datection is carried out to pending image, by the pending figure Human face region as in determines the colour temperature in whole pending image, and the colour temperature of pending image is being determined according to human face region During, pending image is divided into multiple separate blocks regions, dark channel value in multiple separate blocks regions is more than pre- If the separate blocks region of threshold value, so as to improve the precision of white balance, therefore, may be such that personage's colour of skin in image more It is natural.
Referring to Fig. 3, illustrate for a kind of 3rd embodiment flow of method of image procossing provided in an embodiment of the present invention Figure.The method of image procossing described in the present embodiment, comprises the following steps:
301st, Face datection is carried out to pending image, to obtain the human face region in the pending image.
302nd, the target areas of specular reflection in the human face region is determined.
303rd, the target areas of specular reflection is projected into IIC spaces, to obtain the target areas of specular reflection Data for projection.
304th, the data for projection is fitted, to obtain fitting a straight line.
305th, multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line.
306th, the target chromatic value of default passage is estimated according to the multiple chromatic value, wherein the default passage be r, g, Any passage in b passages.
307th, obtain the pending image colour temperature curve in the environment.
In the embodiment of the present invention, the theory based on dichromatic reflection model model and anti-enhancing tone model is based on certain bar Part and calculate object mirror-reflection region when it can also happen that error, then, can introduce colour temperature curve and be verified.Color The fitting of warm curve can be acquired using fixed component using gray card under experimental conditions, and according to the data of collection Point is fitted, and in specific implementation process, inventor is carried out the present invention using the video camera component of Gionee S5.1PRO mobile phones Collection is shot to environment, so as to which as shown in Figure 1 b, the transverse axis of the colour temperature curve is the color of r passages to the colour temperature curve of fitting Performance number (is represented) that the longitudinal axis is the pass of the chromatic value (being represented by y) of g passages, the chromatic value of r passages and the chromatic value of g passages by x System, can be such as following formula:
Y=3.1627x2+ 1.8346x=0.1826
Wherein, if x is certain, then can directly obtain y, i.e., known to the chromatic value in r passages in the case of, can direct solution Go out the chromatic value of y passages.
Alternatively, terminal also can obtain the colour temperature curve about r passages Yu b passages, or, the colour temperature of g passages and b passages Curve, thus, a demand solves the chromatic value of any passage, can be in the hope of the chromatic value of other passages, Suo Youtong The chromatic value in road may make up the colour temperature of image.
308th, other passages outside the default passage are determined according to the target chromatic value and the colour temperature curve Chromatic value.
309th, the pending image is handled according to the chromatic value of the target chromatic value and other passages.
By the embodiment of the present invention, Face datection is carried out to pending image, to obtain the face in the pending image Region, the target areas of specular reflection in the human face region is determined, and the target areas of specular reflection is projected into IIC spaces, To obtain the data for projection of the target areas of specular reflection, the data for projection is fitted, to obtain fitting a straight line, based on this Fitting a straight line calculates multiple chromatic values of the target areas of specular reflection, and the target of default passage is estimated according to the plurality of chromatic value Chromatic value, the wherein default passage are any passage in r, g, b passage;The pending image is determined by the target chromatic value Colour temperature, the pending image is handled according to the colour temperature.So as to, Face datection only is carried out to pending image, will Human face region in the pending image determines the colour temperature in whole pending image, therefore, may be such that personage's skin in image Color is more natural.
Referring to Fig. 4, the first embodiment structural representation for a kind of terminal provided in an embodiment of the present invention.The present embodiment Described in terminal, including:
Detection unit 401, for carrying out Face datection to pending image, to obtain the face in the pending image Region;
First determining unit 402, the target mirror in the human face region detected for determining the detection unit 401 Face reflector space;
Projecting cell 403, the target areas of specular reflection for first determining unit 402 to be determined project to IIC spaces, to obtain the data for projection of the target areas of specular reflection;
Fitting unit 404, the data for projection for the projecting cell 403 projection to be obtained are fitted, with To fitting a straight line;
First computing unit 405, for being fitted based on the fitting unit 404 described in the calculating of the obtained fitting a straight line Multiple chromatic values of target areas of specular reflection;
First evaluation unit 406, the multiple chromatic value estimation for being calculated according to the computing unit 405 are default The target chromatic value of passage, wherein the default passage is any passage in r, g, b passage;
Second determining unit 407, the target chromatic value for being estimated by first evaluation unit 406 determine The colour temperature of the pending image;
Processing unit 408, for according to the colour temperature that second determining unit 407 is determined to the pending figure As being handled.
Alternatively, first determining unit 402 includes:
3rd determining unit 4021, for determining the areas of specular reflection in the human face region;
Detection unit 4022, the areas of specular reflection for being determined to the 3rd determining unit 4021 carry out minute surface Reflector space detects, to obtain the target areas of specular reflection in the areas of specular reflection.
Alternatively, the 3rd determining unit 4021 includes:
Division unit 409, for the human face region to be divided into the multiple separate blocks regions of size identical;
Second computing unit 410, the multiple separate blocks region divided for calculating the division unit 409 respectively Dark channel value, to obtain multiple dark channel values;
4th determining unit 411, in the multiple dark channel value that calculates second computing unit 410 Separate blocks region is specularly reflecting region corresponding to target dark channel value, wherein the target dark channel value is all higher than presetting Threshold value.
Alternatively, first evaluation unit 406 includes:
Structural unit 4061, for forming the probability density function on predeterminable area according to the multiple chromatic value;
Second evaluation unit 4062, the probability density function estimation for being constructed according to the structural unit are default logical The target chromatic value in road.
Alternatively, second determining unit 407 includes:
Acquiring unit 4071, for obtain the pending image colour temperature curve in the environment;
5th determining unit 4072, for the color according to the target chromatic value and the acquisition of the acquiring unit 4071 Warm curve determines the chromatic value of other passages outside the default passage.
Face datection can be carried out to pending image by the terminal described by the embodiment of the present invention, it is pending to obtain this Human face region in image, the target areas of specular reflection in the human face region is determined, and the target areas of specular reflection is thrown Shadow to obtain the data for projection of the target areas of specular reflection, the data for projection is fitted, to be intended to IIC spaces Straight line is closed, multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line, is estimated according to the plurality of chromatic value The target chromatic value of default passage, the wherein default passage are any passage in r, g, b passage;It is true by the target chromatic value The colour temperature of the fixed pending image, is handled the pending image according to the colour temperature.So as to only enter to pending image Row Face datection, the human face region in the pending image is determined into the colour temperature in whole pending image, therefore, may be such that figure Personage's colour of skin as in is more natural.
Referring to Fig. 5, the second embodiment structural representation for a kind of terminal provided in an embodiment of the present invention.The present embodiment Described in terminal, including:At least one input equipment 1000;At least one output equipment 2000;At least one processor 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, processor 3000 and memory 4000 are connected by bus 5000.
Wherein, above-mentioned input equipment 1000 concretely contact panel, physical button or mouse.
Above-mentioned output equipment 2000 concretely display screen.
Above-mentioned memory 4000 can be high-speed RAM memory, or non-labile memory (non-volatile ), such as magnetic disk storage memory.Above-mentioned memory 4000 is used to store batch processing code, above-mentioned input equipment 1000, defeated Go out equipment 2000 and processor 3000 is used to call the program code stored in memory 4000, perform following operation:
Above-mentioned processor 3000, is used for:
Face datection is carried out to pending image, to obtain the human face region in the pending image;
Determine the target areas of specular reflection in the human face region;
The target areas of specular reflection is projected into IIC spaces, to obtain the projection of the target areas of specular reflection Data;
The data for projection is fitted, to obtain fitting a straight line;
Multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line;
The target chromatic value of default passage is estimated according to the multiple chromatic value, is led to wherein the default passage is r, g, b Any passage in road;
The colour temperature of the pending image is determined by the target chromatic value;
The pending image is handled according to the colour temperature.
Alternatively, above-mentioned processor 3000 determines the target areas of specular reflection in the human face region, including:
Determine the areas of specular reflection in the human face region;
Areas of specular reflection detection is carried out to the areas of specular reflection, to obtain the target in the areas of specular reflection Areas of specular reflection.
Alternatively, above-mentioned processor 3000 determines the areas of specular reflection in the human face region, including:
The human face region is divided into the multiple separate blocks regions of size identical;
The dark channel value in the multiple separate blocks region is calculated respectively, to obtain multiple dark channel values;
Separate blocks region corresponding to target dark channel value in the multiple dark channel value is specularly reflecting region, Wherein described target dark channel value is all higher than predetermined threshold value.
Alternatively, above-mentioned processor 3000 estimates the target chromatic value of default passage according to the multiple chromatic value, including:
Probability density function on predeterminable area is formed according to the multiple chromatic value;
The target chromatic value of default passage is estimated according to the probability density function.
Alternatively, above-mentioned processor 3000 determines the colour temperature of the pending image by the target chromatic value, including:
Obtain the pending image colour temperature curve in the environment;
The chromaticity of other passages outside the default passage is determined according to the target chromatic value and the colour temperature curve Value.
In the specific implementation, input equipment 1000, output equipment 2000 and processor described in the embodiment of the present invention 3000 executable a kind of first embodiment of the method for image procossing, second embodiment and the 3rd realities provided in an embodiment of the present invention The implementation described in example is applied, also can perform described in a kind of first embodiment of terminal provided in an embodiment of the present invention Terminal implementation, will not be repeated here.
Unit in all embodiments of the invention, universal integrated circuit, such as CPU (Central can be passed through Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated Circuit, application specific integrated circuit) realize.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Unit in terminal of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, abbreviation RAM) etc..
The method and terminal of a kind of image procossing provided above the embodiment of the present invention are described in detail, herein In apply specific case to the present invention principle and embodiment be set forth, the explanation of above example is only intended to help Assistant solves the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, the think of according to the present invention Think, in specific embodiments and applications there will be changes, in summary, this specification content should not be construed as pair The limitation of the present invention.

Claims (10)

  1. A kind of 1. method of image procossing, it is characterised in that including:
    Face datection is carried out to pending image, to obtain the human face region in the pending image;
    Determine the target areas of specular reflection in the human face region;
    The target areas of specular reflection is projected into IIC spaces, to obtain the data for projection of the target areas of specular reflection;
    The data for projection is fitted, to obtain fitting a straight line;
    Multiple chromatic values of the target areas of specular reflection are calculated based on the fitting a straight line;
    The target chromatic value of default passage is estimated according to the multiple chromatic value, wherein, the default passage is in r, g, b passage Any passage;
    The colour temperature of the pending image is determined by the target chromatic value;
    The pending image is handled according to the colour temperature.
  2. 2. according to the method for claim 1, it is characterised in that the target mirror-reflection determined in the human face region Region, including:
    Determine the areas of specular reflection in the human face region;
    Areas of specular reflection detection is carried out to the areas of specular reflection, to obtain the target minute surface in the areas of specular reflection Reflector space.
  3. 3. according to the method for claim 2, it is characterised in that the mirror-reflection area determined in the human face region Domain, including:
    The human face region is divided into the multiple separate blocks regions of size identical;
    The dark channel value in the multiple separate blocks region is calculated respectively, to obtain multiple dark channel values;
    Separate blocks region corresponding to target dark channel value in the multiple dark channel value is specularly reflecting region, wherein The target dark channel value is all higher than predetermined threshold value.
  4. 4. the method as described in any one of claims 1 to 3, it is characterised in that described to be estimated in advance according to the multiple chromatic value If the target chromatic value of passage, including:
    Probability density function on predeterminable area is formed according to the multiple chromatic value;
    The target chromatic value of default passage is estimated according to the probability density function.
  5. 5. according to the method described in any one of claims 1 to 3, it is characterised in that described to be determined by the target chromatic value The colour temperature of the pending image, including:
    Obtain the pending image colour temperature curve in the environment;
    The chromatic value of other passages outside the default passage is determined according to the target chromatic value and the colour temperature curve.
  6. A kind of 6. terminal, it is characterised in that including:
    Detection unit, for carrying out Face datection to pending image, to obtain the human face region in the pending image;
    First determining unit, the target minute surface echo area in the human face region detected for determining the detection unit Domain;
    Projecting cell, the target areas of specular reflection for first determining unit to be determined project to IIC spaces, with Obtain the data for projection of the target areas of specular reflection;
    Fitting unit, the data for projection for the projection unit projects to be obtained is fitted, to obtain fitting a straight line;
    First computing unit, it is anti-that the fitting a straight line for being fitted to obtain based on the fitting unit calculates the target minute surface Penetrate multiple chromatic values in region;
    Passage is preset in first evaluation unit, the multiple chromatic value estimation for being calculated according to first computing unit Target chromatic value, wherein, the default passage is any passage in r, g, b passage;
    Second determining unit, the target chromatic value for being estimated by first evaluation unit determine described pending The colour temperature of image;
    Processing unit, at according to the colour temperature that second determining unit is determined to the pending image Reason.
  7. 7. terminal according to claim 6, it is characterised in that first determining unit includes:
    3rd determining unit, for determining the areas of specular reflection in the human face region;
    Detection unit, the areas of specular reflection for being determined to the 3rd determining unit carry out areas of specular reflection inspection Survey, to obtain the target areas of specular reflection in the areas of specular reflection.
  8. 8. terminal according to claim 7, it is characterised in that the 3rd determining unit includes:
    Division unit, for the human face region to be divided into the multiple separate blocks regions of size identical;
    Second computing unit, the dark in the multiple separate blocks region for calculating the division unit division respectively Value, to obtain multiple dark channel values;
    4th determining unit, for the target dark in the multiple dark channel value that calculates second computing unit Separate blocks region is specularly reflecting region corresponding to value, wherein the target dark channel value is all higher than predetermined threshold value.
  9. 9. the terminal as described in any one of claim 6 to 8, it is characterised in that first evaluation unit includes:
    Structural unit, for forming the probability density function on predeterminable area according to the multiple chromatic value;
    Second evaluation unit, for the target of the default passage of probability density function estimation constructed according to the structural unit Chromatic value.
  10. 10. according to the terminal described in any one of claim 6 to 8, it is characterised in that second determining unit includes:
    Acquiring unit, for obtain the pending image colour temperature curve in the environment;
    5th determining unit, for determining institute according to the colour temperature curve of the target chromatic value and acquiring unit acquisition State the chromatic value of other passages outside default passage.
CN201610107557.4A 2016-02-26 2016-02-26 The method and terminal of a kind of image procossing Active CN105681774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610107557.4A CN105681774B (en) 2016-02-26 2016-02-26 The method and terminal of a kind of image procossing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610107557.4A CN105681774B (en) 2016-02-26 2016-02-26 The method and terminal of a kind of image procossing

Publications (2)

Publication Number Publication Date
CN105681774A CN105681774A (en) 2016-06-15
CN105681774B true CN105681774B (en) 2017-11-17

Family

ID=56305173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610107557.4A Active CN105681774B (en) 2016-02-26 2016-02-26 The method and terminal of a kind of image procossing

Country Status (1)

Country Link
CN (1) CN105681774B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547887A (en) 2016-06-28 2018-01-05 深圳富泰宏精密工业有限公司 Electronic installation and its color temperature adjusting method
CN111986119B (en) * 2020-09-01 2023-11-28 安徽萤瞳科技有限公司 Interference filtering method for brightness value of dark channel image and sea fog removing method for sea fog image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242476A (en) * 2008-03-13 2008-08-13 北京中星微电子有限公司 Automatic correction method of image color and digital camera system
CN101674490A (en) * 2009-09-23 2010-03-17 电子科技大学 Color image color constant method based on retina vision mechanism
CN102301694A (en) * 2009-11-18 2011-12-28 松下电器产业株式会社 Image processing method, and image processing device
JP2015005927A (en) * 2013-06-21 2015-01-08 キヤノン株式会社 Image processing apparatus and control method of the same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100547992B1 (en) * 2003-01-16 2006-02-01 삼성테크윈 주식회사 Digital camera and control method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242476A (en) * 2008-03-13 2008-08-13 北京中星微电子有限公司 Automatic correction method of image color and digital camera system
CN101674490A (en) * 2009-09-23 2010-03-17 电子科技大学 Color image color constant method based on retina vision mechanism
CN102301694A (en) * 2009-11-18 2011-12-28 松下电器产业株式会社 Image processing method, and image processing device
JP2015005927A (en) * 2013-06-21 2015-01-08 キヤノン株式会社 Image processing apparatus and control method of the same

Also Published As

Publication number Publication date
CN105681774A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
EP3284060B1 (en) Convolutional color correction
Galdran et al. Enhanced variational image dehazing
CN106331492B (en) A kind of image processing method and terminal
EP2962278B1 (en) Multi-spectral imaging system for shadow detection and attenuation
US8374428B2 (en) Color balancing for partially overlapping images
JP7031697B2 (en) Information processing device and recognition support method
CN107977940A (en) background blurring processing method, device and equipment
CN109408008B (en) Image identification system and information display method thereof
CN104052979B (en) For device and the technology of image processing
CN105118027B (en) A kind of defogging method of image
Navarrete et al. Color smoothing for RGB-D data using entropy information
WO2018093785A1 (en) Fast fourier color constancy
WO2018082389A1 (en) Skin colour detection method and apparatus, and terminal
CN109903321A (en) Image processing method, image processing apparatus and storage medium
CN108230407B (en) Image processing method and device
Barros et al. Single-shot underwater image restoration: A visual quality-aware method based on light propagation model
WO2023273111A1 (en) Image processing method and apparatus, and computer device and storage medium
CN105681775A (en) White balance method and device
CN113052923B (en) Tone mapping method, tone mapping apparatus, electronic device, and storage medium
CN105681774B (en) The method and terminal of a kind of image procossing
CN110473281B (en) Method and device for processing edges of three-dimensional model, processor and terminal
Ulucan et al. BIO-CC: Biologically inspired color constancy.
CN116263942A (en) Method for adjusting image contrast, storage medium and computer program product
CN109377468A (en) The pseudo-colours fusion method of infra-red radiation and polarization image based on multiple features
Rahman et al. Color photometric stereo using a rainbow light for non-Lambertian multicolored surfaces

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20180428

Granted publication date: 20171117

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20210428

Granted publication date: 20171117

PD01 Discharge of preservation of patent
TR01 Transfer of patent right

Effective date of registration: 20210617

Address after: 518057 Desai Science and Technology Building, 9789 Shennan Avenue, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 17th Floor (15th Floor of Natural Floor) 1702-1703

Patentee after: Shenzhen Microphone Holdings Co.,Ltd.

Address before: 518040 21 floor, east block, Times Technology Building, 7028 Shennan Road, Futian District, Shenzhen, Guangdong.

Patentee before: DONGGUAN GOLDEX COMMUNICATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right