CN104076928B - A kind of method for adjusting text importing image - Google Patents

A kind of method for adjusting text importing image Download PDF

Info

Publication number
CN104076928B
CN104076928B CN201410337406.9A CN201410337406A CN104076928B CN 104076928 B CN104076928 B CN 104076928B CN 201410337406 A CN201410337406 A CN 201410337406A CN 104076928 B CN104076928 B CN 104076928B
Authority
CN
China
Prior art keywords
tone
target photo
sampled point
colour
text importing
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
CN201410337406.9A
Other languages
Chinese (zh)
Other versions
CN104076928A (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 CN201410337406.9A priority Critical patent/CN104076928B/en
Publication of CN104076928A publication Critical patent/CN104076928A/en
Application granted granted Critical
Publication of CN104076928B publication Critical patent/CN104076928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of method for adjusting text importing image, including: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.Using the embodiment of the present invention, it is possible to achieve according to the tone in the corresponding text importing region of the hue adjustment of the picture picture, display effect is enhanced, so as to enhance Consumer's Experience.

Description

A kind of method for adjusting text importing image
Technical field
The present invention relates to electronic technology field, more particularly to a kind of method for adjusting text importing image.
Background technology
Nowadays, news read have become in people's daily life communication terminal (such as mobile phone, PAD, PC or Notebook computer) on dismiss the conventional operation of scattered time.In numerous news items, how reader, which is clicked on, is read, APP ends designers design focal point being placed on picture and caption text simultaneously, by both combinations from regarding The eyeball of reader in feel.
At present, in order that caption text can be shown on various pictures, and user is not influenceed to read, typically in figure The centre of piece and caption text, plus last layer black transparent background color, the knot of picture and caption text is realized by methods described The problem of conjunction, is:The black transparent background color added under caption text can not arrange in pairs or groups with all pictures, for example, picture Color is very bright-coloured, if covering black transparent background color still on the picture, color can form strong contrast, and reduction is aobvious Show effect.
The content of the invention
The embodiment of the present invention provides a kind of method for adjusting text importing image, can strengthen display effect, so that Strengthen Consumer's Experience.
The embodiments of the invention provide a kind of method for adjusting text importing image, including:
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.
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.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below by using required in embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram for adjusting text importing image provided in an embodiment of the present invention;
Fig. 2 is a kind of method flow diagram for adjustment text importing image that another embodiment of the present invention is provided.
Fig. 3 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 4 is the structural representation of tone determining unit provided in an embodiment of the present invention;
Fig. 5 is the structural representation of reference sample point determining unit provided in an embodiment of the present invention;
Fig. 6 is the structural representation of adjustment unit provided in an embodiment of the present invention;
Fig. 7 is the structural representation of another 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 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.

Claims (8)

1. a kind of method for adjusting text importing image, it is characterised in that including:
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;The tone of the Target Photo Determined by the colour of reference sample point, the Reinheitszahl of reference sample point each sampled point at least one described sampled point It is determined that, the colour of the reference sample point includes the colour of a reference sample point, or the colour between two reference sample points Interval;
According to the tone of the Target Photo, the tone in the text importing region is adjusted.
2. the method as described in claim 1, it is characterised in that the colour of the sampled point acquired described in the basis, really The tone of the fixed Target Photo includes:
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.
3. method as claimed in claim 2, it is characterised in that the colour of the sampled point acquired described in the basis, Determine that reference sample point includes in each described sampled point:
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.
4. the method as described in claim 1, it is characterised in that if obtaining at least two sampled points in the Target Photo Colour, the colour of the sampled point acquired described in the basis, determining the tone of the Target Photo includes:
According to the colour of at least two sampled points acquired, the Reinheitszahl of each sampled point is calculated;
The maximum sampled point of obtained Reinheitszahl that calculates is defined as the first sampled point, and by the minimum sampled point of Reinheitszahl It is defined as the second sampled point;
According to the interval of the colour between first sampled point and the second sampled point, the tone of the Target Photo is determined.
5. the method as described in claim 1, it is characterised in that the tone according to the Target Photo, adjusts the text Before the tone of word viewing area, in addition to:
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.
6. method as claimed in claim 5, it is characterised in that the tone of the Target Photo with reference to described in and the word Color, adjusting the tone in the text importing region includes:
If the color of the word is white, the lightness for calculating the Target Photo is multiplied by the first predetermined threshold value n1 result work For the tone in the text importing region, wherein, 0<n1<1.
7. method as claimed in claim 6, it is characterised in that the tone of the Target Photo with reference to described in and the word Color, adjusting the tone in the text importing region includes:
If the color of the word is black, the lightness for calculating the Target Photo is multiplied by the second predetermined threshold value n2 result work For the tone in the text importing region, wherein, n2>1.
8. the method as described in claim any one of 1-7, it is characterised in that the tone according to the Target Photo, is adjusted After the tone in the whole text importing region, in addition to:
Control the gradation of hue in the text importing region.
CN201410337406.9A 2014-07-15 2014-07-15 A kind of method for adjusting text importing image Active CN104076928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410337406.9A CN104076928B (en) 2014-07-15 2014-07-15 A kind of method for adjusting text importing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410337406.9A CN104076928B (en) 2014-07-15 2014-07-15 A kind of method for adjusting text importing image

Publications (2)

Publication Number Publication Date
CN104076928A CN104076928A (en) 2014-10-01
CN104076928B true CN104076928B (en) 2017-11-07

Family

ID=51598238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410337406.9A Active CN104076928B (en) 2014-07-15 2014-07-15 A kind of method for adjusting text importing image

Country Status (1)

Country Link
CN (1) CN104076928B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320583B (en) * 2014-11-03 2018-12-14 联想(北京)有限公司 Image processing method, image processing apparatus and electronic equipment
CN105718229B (en) * 2014-12-05 2019-05-31 珠海金山办公软件有限公司 A kind of character display effect switching method and device
CN104915971A (en) * 2015-05-29 2015-09-16 深圳市金立通信设备有限公司 Method and terminal for obtaining color values
CN104967923B (en) * 2015-06-30 2019-02-01 北京奇艺世纪科技有限公司 A kind of method and device that subtitle color is set
CN105812888B (en) * 2016-03-31 2019-02-22 北京奇艺世纪科技有限公司 A kind of character displaying method and device
CN105912321A (en) * 2016-04-01 2016-08-31 乐视控股(北京)有限公司 Word color setting method and device
CN106502614B (en) * 2016-10-26 2020-01-10 维沃移动通信有限公司 Font adjusting method and mobile terminal
US11615513B2 (en) 2018-03-28 2023-03-28 Huawei Technologies Co., Ltd. Control display method and electronic device
CN109408177B (en) * 2018-09-29 2022-08-12 北京乐蜜科技有限责任公司 Method and device for configuring color of characters in picture and electronic equipment
CN109859283B (en) * 2018-12-22 2024-01-09 Oppo广东移动通信有限公司 Color taking method, color taking device, electronic equipment and storable medium
CN111932640B (en) * 2020-09-25 2021-02-09 北京尽微至广信息技术有限公司 Method and device for adjusting color gradient effect and storage medium
CN113989396A (en) * 2021-11-05 2022-01-28 北京字节跳动网络技术有限公司 Picture rendering method, device, equipment, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706718A (en) * 2009-11-05 2010-05-12 中兴通讯股份有限公司 Method and device for automatically changing desktop text color
CN102768763A (en) * 2011-05-05 2012-11-07 方正国际软件(北京)有限公司 Method and device for outlining characters
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049471A (en) * 2012-09-15 2013-04-17 珠海金山办公软件有限公司 Method and system for adjusting colors of characters or backgrounds in presentation documents automatically

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706718A (en) * 2009-11-05 2010-05-12 中兴通讯股份有限公司 Method and device for automatically changing desktop text color
CN102768763A (en) * 2011-05-05 2012-11-07 方正国际软件(北京)有限公司 Method and device for outlining characters
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device

Also Published As

Publication number Publication date
CN104076928A (en) 2014-10-01

Similar Documents

Publication Publication Date Title
CN104076928B (en) A kind of method for adjusting text importing image
CN109639982B (en) Image noise reduction method and device, storage medium and terminal
CN111191424B (en) Page color matching method and device, storage medium and chip
CN105957125B (en) A kind of processing method and mobile terminal of icon text
WO2021035505A1 (en) Image processing method and device
CN104967784B (en) Mobile terminal calls the method and mobile terminal of the substrate features pattern of camera function
CN107799093A (en) Adjust method, terminal and the computer-readable recording medium of screen luminance of terminal
JP2000134486A (en) Image processing unit, image processing method and storage medium
CN109859283B (en) Color taking method, color taking device, electronic equipment and storable medium
CN109729281A (en) Image processing method, device, storage medium and terminal
CN107274351A (en) Image processing equipment, image processing system and image processing method
CN103065338A (en) Method and device providing shadow for foreground image in background image
CN111784568A (en) Face image processing method and device, electronic equipment and computer readable medium
CN104978186A (en) Interface skin rendering method and apparatus
CN110675839A (en) Screen adjusting method, electronic equipment and related device
CN113132696A (en) Image tone mapping method, device, electronic equipment and storage medium
WO2023093291A1 (en) Image processing method and apparatus, computer device, and computer program product
CN113920912B (en) Display attribute adjusting method and related equipment
WO2017143812A1 (en) Method and device for differentiating objects
CN106600524A (en) Image processing method and terminal
CN110444181A (en) Display methods, device, terminal and computer readable storage medium
CN110335279A (en) Real-time green curtain is scratched as method, apparatus, equipment and storage medium
CN111901519B (en) Screen light supplement method and device and electronic equipment
CN109064431A (en) A kind of picture luminance adjusting method, equipment and its storage medium
CN112541955A (en) Image processing method, device and equipment

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
PP01 Preservation of patent right

Effective date of registration: 20180428

Granted publication date: 20171107

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20210428

Granted publication date: 20171107

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210608

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.