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 is described, it is clear that described embodiment is a part of embodiment of the 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.
Fig. 1 is a kind of method flow diagram for adjusting text importing image provided in an embodiment of the present invention.It is of the invention real
Applying the method for the adjustment text importing image of example offer can realize in mobile phone, PAD, notebook computer or PC etc.
On terminal device.The flow of adjustment text importing image in the present embodiment as shown in Figure 1 can include:
Step S110, obtains Target Photo and the corresponding text importing region of the Target Photo.
Specifically, terminal can promote news for every in advance sets corresponding picture and word, when getting user
For the corresponding click commands for promoting news of the Target Photo, or, reach that the display Target Photo is corresponding and promote
The display cycle of information, terminal then obtains the Target Photo and the corresponding text importing region of the Target Photo.
Wherein, the text importing region is used to show the corresponding word of the Target Photo, the text importing region
Particular location on the Target Photo, the present invention is not limited.
Step S120, obtains the colour of at least one sampled point in the Target Photo.
In RGB color pattern, color is mixed by red, green, blueness, and colour represents color in RGB color mould
Corresponding value in formula, for example, red corresponding value in RGB color pattern is 255,0,0;Green is in RGB color pattern
In corresponding value be 0,255,0;Blueness value corresponding in RGB color pattern is 0,0,255.
Specifically, when terminal gets Target Photo, terminal can obtain at least one in the Target Photo and adopt
The colour of sampling point.
Wherein, the sampled point acquired can be evenly distributed on the Target Photo, for example, by Target Photo
Four regions are evenly dividing into, a sampled point is obtained in each area, wherein, the quantity in the region of division and each
The quantity for the sampled point that region is obtained, the present invention is not limited.
Optionally, terminal can be sampled for Target Photo with text importing region lap, so that described
The colour of at least one sampled point is obtained in the lap of Target Photo, with the tone energy in the text importing region finally determined
It is enough close with the tone of Target Photo lap.
Step S130, according to the colour of the sampled point acquired, determines the tone of the Target Photo.
Tone can be determined in terms of form and aspect H (Hue), Reinheitszahl S (saturation) and lightness B (brightness) three
Justice, i.e., represented with HSB values, for representing the general inclination in certain color, such as partially blue, partially red, partially warm or colder, its
In, the maximum of form and aspect is 255, and the maximum of Reinheitszahl is 100%, and the maximum of lightness is 100%.
As an alternative embodiment, terminal can be according to the colour of the sampled point acquired, described
Reference sample point is determined in each sampled point, further according to the colour of the reference sample point, the tone of the Target Photo is determined.
In the specific implementation, terminal can calculate the pure of each sampled point according to the colour of acquired obtained sampled point
Angle value S, the reference sample point is defined as by the sampled point of the Reinheitszahl maximum for calculating and obtaining;Or, terminal can be by
Any one sampled point of Reinheitszahl S in the range of default Reinheitszahl is defined as the reference sample point;Terminal is further according to described
The colour of reference sample point, determines the tone of the Target Photo, optionally, and terminal can be according to the conversion of rgb value to HSB values
Relation, determines the tone of the Target Photo.
Wherein, the form and aspect H that terminal calculates Target Photo according to rgb value may be referred to below equation:
H=(0+ (G-B)/(MAX-MIN)) * 60, IF R=MAX;
H=(2+ (B-R)/(MAX-MIN)) * 60, IF G=MAX;
H=(4+ (R-G)/(MAX-MIN)) * 60, IF B=MAX;
Terminal can calculate the purity of sampled point according to maximum in rgb value and the difference and the ratio of maximum of minimum value
Value, for example, the rgb value of sampled point is 0,255,180, the Reinheitszahl of the sampled point is equal to 100% according to knowable to calculating.
The ratio of maximum in rgb value and 255 can be defined as lightness B by terminal, for example, rgb value is 0,90,200,
So, maximum is 200, then brightness value B is 200/255=0.784=78%.
As another optional embodiment, if terminal obtains at least two sampled points in the Target Photo
Colour, then terminal the pure of each sampled point can be calculated according to the colours of at least two sampled points acquired
Angle value, first sampled point is defined as by the maximum sampled point of obtained Reinheitszahl that calculates, and Reinheitszahl is minimum
Sampled point is defined as the second sampled point;Exemplified by 2 points, the colour of the first sampled point is the colour of R1, G1, B1, the second sampled point
For R2, G2, B2, then the interval for calculating the colour between the first obtained sampled point and the second sampled point is R1-R2, G1-G2,
B1-B2;If terminal determines at least three sampled points in Target Photo, terminal is then according to the Reinheitszahl of each sampled point in institute
State and the first sampled point and the second sampled point are determined in sampled point.
Terminal determines the Target Photo further according to the interval of the colour between first sampled point and the second sampled point
Tone.
Optionally, terminal can determine one in the interval of the colour between first sampled point and the second sampled point
Individual colour, the tone of the Target Photo is determined according to the colour determined.For example, between the first sampled point and the second sampled point
Colour interval be 10-110,35-75,65-200, then terminal a colour can be determined in the interval value, for example
56,70,100 or 80,40,150 etc., terminal can determine the Target Photo according to colour and the transformational relation of tone
Tone.
Wherein, terminal can also the colour between first sampled point and the second sampled point it is interval in determine to
Few two colours, the multiple color tones of the Target Photo are calculated according to each colour correspondence determined.First sampled point with
Exemplified by interval still with 10-110, the 35-75 of colour between second sampled point, 65-200, terminal can be in the interval value
Determine at least two colours, such as 56,70,100,80,40,150 and 90,60,180 etc., terminal can calculate institute respectively
The corresponding tone of each colour is stated, the tone calculated is defined as to the tone of the Target Photo.
Step S140, according to the tone of the Target Photo, adjusts the tone in the text importing region.
Specifically, if terminal only determines a kind of tone of the Target Photo, terminal can be by the text importing area
The hue adjustment in domain is the tone of the Target Photo;If terminal determines at least two tones of the Target Photo, terminal
The tone in the text importing region can be adjusted with reference to the multiple color tones of the Target Photo, i.e., according to the target figure determined
The number of the tone of piece is by text importing region division into different region parts, and the tone of different zones part is different.
Further alternative, terminal can also control the gradation of hue in the text importing region, that is, control the word
The tone of viewing area gradually becomes shallower as or gradually deepened etc..
The embodiment of the present invention, terminal can obtain the colour of at least one sampled point in Target Photo, according to obtaining
The colour of the sampled point arrived, determines the tone of the Target Photo, according to the tone of the Target Photo, adjusts the word and shows
Show the tone in region, realize the tone according to the corresponding text importing region of the hue adjustment of the picture picture, enhance aobvious
Show effect, so as to enhance Consumer's Experience.
Fig. 2 is the method flow diagram of another adjustment text importing image provided in an embodiment of the present invention.The present invention
The method for the adjustment text importing image that embodiment is provided can be realized in mobile phone, PAD, notebook computer or PC
Deng on terminal device.The flow of adjustment text importing image in the present embodiment as shown in Figure 2 can include:
Step S210, obtains Target Photo and the corresponding text importing region of the Target Photo.
Specifically, terminal can promote news for every in advance sets corresponding picture and word, when getting user
For the corresponding click commands for promoting news of the Target Photo, or, reach that the display Target Photo is corresponding and promote
The display cycle of information, terminal then obtains the Target Photo and the corresponding text importing region of the Target Photo.
Step S220, obtains the colour of at least one sampled point in the Target Photo.
Specifically, when terminal gets Target Photo, terminal can obtain at least one in the Target Photo and adopt
The colour of sampling point.
Wherein, the sampled point acquired can be evenly distributed on the Target Photo, for example, by Target Photo
Four regions are evenly dividing into, a sampled point is obtained in each area, wherein, the quantity in the region of division and each
The quantity for the sampled point that region is obtained, the present invention is not limited.
Optionally, terminal can be sampled for Target Photo with text importing region lap, so that described
The colour of at least one sampled point is obtained in the lap of Target Photo, with the tone energy in the text importing region finally determined
It is enough close with the tone of Target Photo lap.
Step S230, according to the colour of the sampled point acquired, determines the tone of the Target Photo.
As an alternative embodiment, terminal can be according to the colour of the sampled point acquired, described
Reference sample point is determined in each sampled point, further according to the colour of the reference sample point, the tone of the Target Photo is determined.
In the specific implementation, terminal can calculate the pure of each sampled point according to the colour of acquired obtained sampled point
Angle value S, the reference sample point is defined as by the sampled point of the Reinheitszahl maximum for calculating and obtaining;Or, terminal can be by
Any one sampled point of Reinheitszahl S in the range of default Reinheitszahl is defined as the reference sample point;Terminal is further according to described
The colour of reference sample point, determines the tone of the Target Photo, optionally, and terminal can be according to the conversion of rgb value to HSB values
Relation, determines the tone of the Target Photo.
Wherein, the form and aspect H that terminal calculates Target Photo according to rgb value refer to the form and aspect calculating section of embodiment one,
This is not repeated.
Terminal can calculate the purity of sampled point according to maximum in rgb value and the difference and the ratio of maximum of minimum value
Value, for example, the rgb value of sampled point is 0,255,180, the Reinheitszahl of the sampled point is equal to 100% according to knowable to calculating.
The ratio of maximum in rgb value and 255 can be defined as lightness B by terminal, for example, rgb value is 0,90,200,
So, maximum is 200, then brightness value B is 200/255=0.784=78%.
As another optional embodiment, if terminal obtains at least two sampled points in the Target Photo
Colour, then terminal the pure of each sampled point can be calculated according to the colours of at least two sampled points acquired
Angle value, first sampled point is defined as by the maximum sampled point of obtained Reinheitszahl that calculates, and Reinheitszahl is minimum
Sampled point is defined as the second sampled point;Exemplified by 2 points, the colour of the first sampled point is the colour of R1, G1, B1, the second sampled point
For R2, G2, B2, then the interval for calculating the colour between the first obtained sampled point and the second sampled point is R1-R2, G1-G2,
B1-B2;If terminal determines at least three sampled points in Target Photo, terminal is then according to the Reinheitszahl of each sampled point in institute
State and the first sampled point and the second sampled point are determined in sampled point.
Terminal determines the Target Photo further according to the interval of the colour between first sampled point and the second sampled point
Tone.
Optionally, terminal can determine one in the interval of the colour between first sampled point and the second sampled point
Individual colour, the tone of the Target Photo is determined according to the colour determined.For example, between the first sampled point and the second sampled point
Colour interval be 10-110,35-75,65-200, then terminal a colour can be determined in the interval value, for example
56,70,100 or 80,40,150 etc., terminal can determine the Target Photo according to colour and the transformational relation of tone
Tone.
Wherein, terminal can also the colour between first sampled point and the second sampled point it is interval in determine to
Few two colours, the multiple color tones of the Target Photo are calculated according to each colour correspondence determined.First sampled point with
Exemplified by interval still with 10-110, the 35-75 of colour between second sampled point, 65-200, terminal can be in the interval value
Determine at least two colours, such as 56,70,100,80,40,150 and 90,60,180 etc., terminal can calculate institute respectively
The corresponding tone of each colour is stated, the tone calculated is defined as to the tone of the Target Photo.
Step S240, obtains the color of the word in the text importing region.
It is pointed out that in the embodiment of the present invention, terminal is just performed after the tone of the Target Photo is determined
In the step of color of the word for obtaining the text importing region, other embodiment, terminal can determine it is described
Before the tone of Target Photo, the color of the word in the text importing region is just got.
Step S250, with reference to the tone and the color of the word of the Target Photo, adjusts the text importing region
Tone.
As an alternative embodiment, tone includes form and aspect, Reinheitszahl and lightness, if the color of the word is white
Color, the then lightness for calculating the Target Photo is multiplied by the first predetermined threshold value n1 result and is used as the color in the text importing region
Adjust, i.e., the lightness of the Target Photo is only multiplied by the first predetermined threshold value n1, form and aspect keep constant with Reinheitszahl, calculating is obtained
Lightness with reference to the tone of original form and aspect and original Reinheitszahl as the text importing region, wherein, 0<n1<1, it is assumed that n1
Equal to 1/2, the tone HSB values for the Target Photo that terminal is determined are 162,100,100, then the color and mesh of terminal combination word
Mark on a map piece tone can determine the text importing region tone be 162,100,50.
As another optional embodiment, if the color of the word is black, the Target Photo is calculated
Lightness is multiplied by the second predetermined threshold value n2 result as the tone in the text importing region, i.e., only by the bright of the Target Photo
Degree is multiplied by the second predetermined threshold value n2, and form and aspect keep constant with Reinheitszahl, and the lightness that calculating is obtained combines original form and aspect and original
Reinheitszahl as the text importing region tone, wherein, n2>1, it is assumed that n2 is equal to 3/2, the Target Photo that terminal is determined
Tone HSB values be 162,100,50, then the tone of the color of terminal combination word and Target Photo can determine the text
The tone of word viewing area is 162,100,75.
If it is pointed out that the lightness of the Target Photo is multiplied by maximum of the value after n2 beyond lightness
100%, then ignore the part exceeded, i.e., lightness is defined as 100%, for example, the HSB values of Target Photo are 162,100,90,
N2 is equal to 1.5, then the tone for calculating the text importing region is 162,100,100.
Further alternative, terminal can also control the gradation of hue in the text importing region, that is, control the word
The tone of viewing area gradually becomes shallower as or gradually deepened etc..
The embodiment of the present invention, terminal can further combined with word color, the tone in adjustment text importing region compares
For a upper embodiment, be further conducive to user to read text information, enhance Consumer's Experience.
Fig. 3 is a kind of structural representation of terminal provided in an embodiment of the present invention.Terminal bag provided in an embodiment of the present invention
Include mobile phone, PAD, notebook computer or PC etc..Terminal 30 in the embodiment of the present invention as shown in Figure 3 can at least be wrapped
Acquiring unit 31, colour sampling unit 32, tone determining unit 33 and adjustment unit 34 are included, wherein:
Acquiring unit 31, for obtaining Target Photo and the corresponding text importing region of the Target Photo.
In the specific implementation, terminal can promote news for every in advance sets corresponding picture and word, it is single when obtaining
Member 31 gets user for the corresponding click commands for promoting news of the Target Photo, or, reach the display target
The display cycle of the corresponding promotion message of picture, acquiring unit 31 then obtains the Target Photo and Target Photo correspondence
Text importing region.
Colour sampling unit 32, the colour for obtaining at least one sampled point in the Target Photo.
In the specific implementation, when acquiring unit 31 gets Target Photo, colour sampling unit 32 can be in the target
The colour of at least one sampled point is obtained in picture.
Wherein, the sampled point acquired can be evenly distributed on the Target Photo, for example, by Target Photo
Four regions are evenly dividing into, a sampled point is obtained in each area, wherein, the quantity in the region of division and each
The quantity for the sampled point that region is obtained, the present invention is not limited.
Optionally, colour sampling unit 32 can be sampled for Target Photo with text importing region lap,
So as to obtain the colour of at least one sampled point in the lap of the Target Photo, with the text importing area finally determined
The tone in domain can be close with the tone of Target Photo lap.
Tone determining unit 33, for the colour of the sampled point acquired according to, determines the Target Photo
Tone.
Optionally, the tone determining unit 33 can further include reference sample point determining unit 331 as shown in Figure 4
And first determining unit 332, wherein:
Reference sample point determining unit 331, for the colour of the sampled point acquired according to, is adopted in described each
Reference sample point is determined in sampling point;First determining unit 332, for the colour according to the reference sample point, determines the mesh
Mark on a map the tone of piece.
Optionally, the reference sample point determining unit 331 can further include the calculating of the first Reinheitszahl as shown in Figure 5
The determining unit 3312 of unit 3311 and second, wherein:
First Reinheitszahl computing unit 3311, for the colour of the sampled point acquired according to, calculates described each
The Reinheitszahl of individual sampled point;Second determining unit 3312, for the maximum sampled point of obtained Reinheitszahl that calculates to be determined
For the reference sample point, second determining unit 3312 can be also used for the appointing in the range of default Reinheitszahl by Reinheitszahl
One sampled point of meaning is defined as the reference sample point.
First determining unit 332 can utilize rgb value to the transformational relation of HSB values, be determined according to reference sample point
The colour of reference sample point determines the tone of the Target Photo determined by unit 331.
If the colour sampling unit 32 obtains the colour of at least two sampled points, the color in the Target Photo
Adjust determining unit 33 as shown in Figure 4 further can include the second Reinheitszahl computing unit 333, the 3rd determining unit 334 and
4th determining unit 335, wherein:
Second Reinheitszahl computing unit 333, for the colour of at least two sampled points acquired according to, is calculated
The Reinheitszahl of each sampled point;3rd determining unit 334, for calculating the maximum sampled point of obtained Reinheitszahl by described
It is defined as the first sampled point, and the minimum sampled point of Reinheitszahl is defined as the second sampled point;4th determining unit 335, is used for
According to the interval of the colour between first sampled point and the second sampled point, the tone of the Target Photo is determined.
Exemplified by 2 points, it is assumed that the colour for the first sampled point that the 3rd determining unit 334 is determined is adopted for R1, G1, B1, the second
The colour of sampling point is R2, G2, B2, then between the calculating of the 4th determining unit 335 is obtained the first sampled point and the second sampled point
The interval of colour is R1-R2, G1-G2, B1-B2;If colour sampling unit 32 determines at least three samplings in Target Photo
Point, the second Reinheitszahl computing unit 333 then determines the first sampling according to the Reinheitszahl of each sampled point in the sampled point
Point and the second sampled point.
Wherein, the 4th determining unit 335 can be in the interval of the colour between first sampled point and the second sampled point
In determine a colour, the tone of the Target Photo is determined according to the colour determined.For example, the first sampled point and second
The interval of colour between sampled point is 10-110,35-75,65-200, then the 4th determining unit 335 can be in the interval value
In determine a colour, such as 56,70,100 or 80,40,150 etc., the 4th determining unit 335 can be according to colour and color
The transformational relation of tune, determines the tone of the Target Photo.
4th determining unit 335 can also be in the interval of the colour between first sampled point and the second sampled point really
At least two colours are made, the multiple color tones of the Target Photo are calculated according to each colour correspondence determined.First adopts
Exemplified by interval still with 10-110, the 35-75 of colour between sampling point and the second sampled point, 65-200, the 4th determining unit 335 can
To determine at least two colours, such as 56,70,100,80,40,150 and 90,60,180 etc., the 4th in the interval value
Determining unit 335 can calculate the corresponding tone of each described colour respectively, the tone calculated is defined as described
The tone of Target Photo.
The tone determining unit 33 can also include connection unit 336, for connecting reference sample point determining unit 331
With the second Reinheitszahl computing unit 333, connection unit 3365 can be common connection member.
Adjustment unit 34, for the tone according to the Target Photo, adjusts the tone in the text importing region.
If in the specific implementation, tone determining unit 33 only determines a kind of tone of the Target Photo, adjustment unit 34
Can be by tone of the hue adjustment in the text importing region for the Target Photo;If tone determining unit 33 determines institute
At least two tones of Target Photo are stated, adjustment unit 34 can adjust the word with reference to the multiple color tones of the Target Photo
The tone of viewing area, i.e., according to the number for the tone of Target Photo determined by text importing region division into different areas
Domain part, the tone of different zones part is different.
Further, the terminal 30 can also include text color acquiring unit 35, for obtaining the text importing
The color of the word in region, the adjustment unit 34 can be also used for the face of the tone and the word with reference to the Target Photo
Color, adjusts the tone in the text importing region,
It is pointed out that acquiring unit 31, colour sampling unit 32 or tone determining unit 33 can trigger described
Text color acquiring unit 35 obtains the color of the word in the text importing region, that is to say, that when acquiring unit 31 is obtained
During to Target Photo and the corresponding text importing region of the Target Photo, or, colour sampling unit 32 is in the target
When the colour of at least one sampled point is got in picture, or, tone determining unit 33 is according to the sampling acquired
The colour of point, when determining the tone of the Target Photo, can trigger the text color acquiring unit 35 and obtain described
The color of the word in text importing region, the present invention is not construed as limiting.
Wherein, the adjustment unit 34 can include the first hue calculation unit 341 and/or the second hue calculation unit
342, wherein:
First hue calculation unit 341, if the color for the word is white, calculates the bright of the Target Photo
Degree is multiplied by the first predetermined threshold value n1 result as the tone in the text importing region, wherein, 0<n1<1.
In the specific implementation, tone includes form and aspect, Reinheitszahl and lightness, if the color of the word is white, the first tone
The lightness of the Target Photo only can be multiplied by the first predetermined threshold value n1 by computing unit 341, and form and aspect keep constant with Reinheitszahl,
Using calculate obtained lightness with reference to original form and aspect and original Reinheitszahl as the text importing region tone, it is assumed that n1 etc.
In 1/2, the tone HSB values for the Target Photo that tone determining unit 33 is determined are 162,100,100, then the first tone calculates single
Member 341 can determine that the tone in the text importing region is 162,100 with reference to the color of word and the tone of Target Photo,
50。
Second hue calculation unit 342, if the color for the word is black, calculates the bright of the Target Photo
Degree is multiplied by the second predetermined threshold value n2 result as the tone in the text importing region, wherein, n2>1.
Preset in the specific implementation, the lightness of the Target Photo only can be multiplied by second by the second hue calculation unit 342
Threshold value n2, form and aspect and Reinheitszahl keep constant, will calculate obtained lightness with reference to original form and aspect and original Reinheitszahl as described
The tone in text importing region, it is assumed that n2 is equal to 3/2, the tone HSB values for the Target Photo that tone determining unit 33 is made are
162,100,50, then the second hue calculation unit 342 is with reference to described in being determined the color of word and the tone of Target Photo
The tone in text importing region is 162,100,75.
If it is pointed out that the lightness of the Target Photo is multiplied by maximum of the value after n2 beyond lightness
100%, then the second hue calculation unit 342 can ignore the part exceeded, i.e., lightness is defined as 100%, for example, target figure
The HSB values of piece are equal to 1.5 for 162,100,90, n2, then the second hue calculation unit 342 calculates the color in the text importing region
It is adjusted to 162,100,100.
The adjustment unit 34 can also include connection unit 343, for connecting the first hue calculation unit 341 and second
Hue calculation unit 342, the adjustment unit 34 can with when common interface unit.
Further, the terminal 30 can also include tone control unit 36, for controlling the text importing region
Gradation of hue.
Specifically, tone control unit 36 can control the gradation of hue in the text importing region, that is, control the text
The tone of word viewing area gradually becomes shallower as or gradually deepened etc..
The embodiment of the present invention, colour sampling unit can obtain the colour of at least one sampled point, color in Target Photo
Determining unit is adjusted to determine the tone of the Target Photo according to the colour of the sampled point acquired, adjustment unit can be with
According to the tone of the Target Photo, the tone in the text importing region is adjusted, realizing should according to the hue adjustment of picture
The tone in the corresponding text importing region of picture, enhances display effect, so as to enhance Consumer's Experience.
Referring to Fig. 7, Fig. 7 is a kind of structural representation for terminal that another embodiment of the present invention is provided, as shown in fig. 7,
The terminal 70 can include:At least one processor 71, such as CPU, at least one communication bus 72, display 73 and storage
Device 74.Wherein, the display 73 is used for display target picture and the corresponding text importing region of the Target Photo;Communication
Bus 72 is used to realize the connection communication between these components.Memory 74 can be high-speed RAM memory or it is non-not
Stable memory (non-volatile memory), for example, at least one magnetic disk storage.One group of journey is stored in memory 74
Sequence code, and processor 71 is used to call the program code stored in memory 74, for performing following operation:
Obtain Target Photo and the corresponding text importing region of the Target Photo;
The colour of at least one sampled point is obtained in the Target Photo;
According to the colour of the sampled point acquired, the tone of the Target Photo is determined;
According to the tone of the Target Photo, the tone in the text importing region is adjusted.
As an alternative embodiment, processor 71 determines institute according to the colour of the sampled point acquired
Stating the tone of Target Photo can specifically include:
According to the colour of the sampled point acquired, reference sample point is determined in each described sampled point;
According to the colour of the reference sample point, the tone of the Target Photo is determined.
Wherein, processor 71 determines ginseng according to the colour of the sampled point acquired in each described sampled point
Examining sampled point can specifically include:
According to the colour of the sampled point acquired, the Reinheitszahl of each sampled point is calculated;
The sampled point of the Reinheitszahl maximum for calculating and obtaining is defined as the reference sample point.
As another optional embodiment, if obtaining the color of at least two sampled points in the Target Photo
Value, processor 71 is according to the colour of the sampled point acquired, and determining the tone of the Target Photo can specifically include:
According to the colour of at least two sampled points acquired, the Reinheitszahl of each sampled point is calculated;
The sampled point of the Reinheitszahl maximum for calculating and obtaining is defined as the first sampled point, and adopting Reinheitszahl minimum
Sampling point is defined as the second sampled point;
According to the interval of the colour between first sampled point and the second sampled point, the color of the Target Photo is determined
Adjust.
Optionally, processor 901 is according to the tone of the Target Photo, adjust the text importing region tone it
Before, also execute the following steps:
Obtain the color of the word in the text importing region;
The tone according to the Target Photo, adjusting the tone in the text importing region includes:
With reference to the tone and the color of the word of the Target Photo, the tone in the text importing region is adjusted.
Wherein, processor 901 adjusts the text importing with reference to the tone of the Target Photo and the color of the word
The tone in region can specifically include:
If the color of the word is white, the lightness for calculating the Target Photo is multiplied by the first predetermined threshold value n1 knot
Really as the tone in the text importing region, wherein, 0<n1<1.
Wherein, processor 901 adjusts the text importing with reference to the tone of the Target Photo and the color of the word
The tone in region can also specifically include:
If the color of the word is black, the lightness for calculating the Target Photo is multiplied by the second predetermined threshold value n2 knot
Really as the tone in the text importing region, wherein, n2>1.
Further, processor 901 is according to the tone of the Target Photo, adjust the text importing region tone it
Afterwards, also execute the following steps:
Control the gradation of hue in the text importing region.
The embodiment of the present invention, processor can obtain the colour of at least one sampled point in Target Photo, according to acquisition
The colour of obtained sampled point, determines the tone of the Target Photo, according to the tone of the Target Photo, adjusts the word
The tone of viewing area, realizes the tone according to the corresponding text importing region of the hue adjustment of the picture picture, enhances
Display effect, so as to enhance Consumer's Experience.
It should be noted that in the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, in some embodiment
The part being not described in, may refer to the associated description of other embodiment.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention
Necessary to embodiment.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Unit in device of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
Unit described in the embodiment of the present invention, can pass through universal integrated circuit, such as CPU (Central
Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated
Circuit, application specific integrated circuit) realize.
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, RAM) etc..
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly
Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.