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.