A kind of method and system of gradual changing color fading and trapping
Technical field
The invention belongs to technical field of packaging and printing, particularly a kind of method and system of gradual changing color fading and trapping.
Background technology
Color fading and trapping (pullback) is a trapping technology before a kind of packing seal, promptly working as object is made of a dark ink and a plurality of light color inks, dark ink and light color inks difference in brightness are very big, and when object bounds one side is blank or white, cause significantly " color limit " for fear of cause light color inks to expose owing to register trouble, light color inks inwardly need be shunk certain width in color edges.After printing, because the dark ink of constriction all is dark with former object printing ink, so human eye is difficult for realizing, and the shallow printing ink of brightness can not surpass object bounds after the chromatography skew, thereby solved the problem that look arrives blank of leaking.
When gradient object satisfies the color fading and trapping occurrence condition, also need to carry out color fading and trapping and handle.In gradual change, the multirow hollow character is arranged in the prior art, and when the line direction of hollow character is vertical with the gradual change direction, then according to each hollow character border average brightness value, judge whether this hollow character color fading and trapping takes place, because hollow character is on gradual change, hollow character boundary position difference, therefore the brightness value on each hollow character border is generally all different, the color fading and trapping condition is satisfied on presumable hollow character border in delegation's hollow character like this, what have does not satisfy the color fading and trapping condition, thereby causes the inconsistent adverse consequences of color fading and trapping behavior with hollow character in the delegation.If inconsistent, human eye be very easy to find carrying out that in the printed matter in the same delegation in the gradual change there be hollow character color fading and trapping handle not carrying out of having, thereby influence visual effect.
About the trapping technical research, external patents that also have some to be correlated with, as patent publication No. is US6781720 " based on the gradual change trapping system of area of trap masterplate ", and this trapping system handles by the trapping of selecting predefined trapping masterplate to carry out the gradual change form on border.But this method can't realize handling for the border color fading and trapping in the gradual change.
Summary of the invention
At the defective that exists in the prior art, the method and system that the purpose of this invention is to provide a kind of gradual changing color fading and trapping, these method and system are handled according to boundary luminances difference class and are carried out color fading and trapping, make multirow hollow character or figure are arranged in the gradual change, and when the line direction of hollow character or figure is vertical with the gradual change direction, the behavior unanimity of every line space heart character or figure generation color fading and trapping improves print quality.
For achieving the above object, the technical solution used in the present invention is a kind of method of gradual changing color fading and trapping, may further comprise the steps:
(1) searches the border of gradual change hollow core character or figure, calculate all boundary luminances, and it is formed boundary luminances set L
1~L
n
(2) according to the boundary luminances difference classified in all borders in the step (1);
(3) judge successively whether every class border is carried out color fading and trapping and handled, and carry out the color fading and trapping processing satisfying such border of carrying out the color fading and trapping condition.
Further, in step (1), described boundary luminances refers to be not more than average brightness in the zone of set point D with this frontier distance in that gradual change is inner, and described set point D is less than or equal to the color fading and trapping width.
Further, comprise the steps: in the border sorting technique described in the step (2)
A. with boundary luminances L
1~L
nSort from low to high by brightness, and the border that brightness is the darkest puts into current the 1st category set, set the darkest border of brightness for this reason, current border;
B. judge whether to exist brightness time dark border, if there is brightness time dark border in current border, then calculate the difference of two brightness by ordering, otherwise finish;
Whether the difference of c. judging two brightness is greater than setting threshold values, if this difference is then created new category set greater than setting threshold values, setting current category set is this new category set, new category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border, return step b; Otherwise, current category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border, return step b.
Further, the scope of the setting threshold values described in the step c is [30,60].
Further, in the step (3), judge whether every class border is carried out the method for color fading and trapping processing and be: judge successively in same classification whether each border satisfies the condition of carrying out color fading and trapping, if the ratio that satisfies the border number carry out the color fading and trapping condition and such border number is greater than a, then the color fading and trapping processing is all carried out on all borders in such; When the border number that color fading and trapping takes place and whole ratio of borders number are less than or equal to a, then the color fading and trapping processing is not all carried out on all borders in this classification, and the span of described a is: 0.6 〉=a 〉=0.4.
Further, in step (3), the value of a is 0.5.
Further, the condition of generation color fading and trapping comprises in step (3):
I) extract the border ink composition of gradual change hollow core character or figure, and it is transformed into the LAB space, calculate total brightness L, the darkest printing ink brightness value L
1With the light color inks brightness value L
2, and L
1<L
2, wherein the printing ink of brightness value minimum is the darkest printing ink, residual ink claims light color inks beyond the darkest printing ink;
II) the darkest printing ink site percentage must be greater than 45%, and the brightness value of dark printing ink must be less than 65;
Wherein, printing ink site percentage is meant in that gradual change is inner and is not more than the mean value of the site percentage of printing ink in the zone of set point D with frontier distance that the span of D is for being less than or equal to the color fading and trapping width;
III) light color inks brightness value L
2With the difference DELTA L of total brightness L within prescribed limit, then need to carry out color fading and trapping, wherein the prescribed limit of difference DELTA L is generally 15<Δ L<90.
A kind of system of gradual changing color fading and trapping comprises with lower module:
(1) boundary luminances computing module: be used to search the border of gradual change hollow core character or figure, calculate all boundary luminances, and it is formed boundary luminances set L
1~L
n
(2) border sort module: be used for being classified in all borders according to the boundary luminances difference;
(3) color fading and trapping processing module: be used to judge whether every class border is carried out color fading and trapping and handled, and carry out the color fading and trapping processing to satisfying the border of carrying out the color fading and trapping condition.
Further, described border sort module also is provided with lower module:
Classification initialization module: be used for boundary luminances L
1~L
nSort from low to high by brightness, and the border that brightness is the darkest puts into current the 1st category set, set the darkest border of brightness for this reason, current border;
Difference calculating module: be used to judge whether to exist brightness time dark border, if there is brightness time dark border in current border, then calculate the difference of two brightness by ordering, otherwise finish;
New category set creation module: be used to judge that whether the difference of two brightness is greater than setting threshold values, if the difference calculated of difference calculating module is created new category set when setting threshold values, setting current category set is this new category set, new category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border; Otherwise, current category set is put on this brightness time dark border, and is set brightness time dark border for this reason, current border.
Further, described color fading and trapping processing module judges whether every class border is carried out the concrete handling process of color fading and trapping processing and be: judge successively in same classification whether each border satisfies the condition of carrying out color fading and trapping, if the ratio that satisfies the border number carry out the color fading and trapping condition and such border number then all carries out the color fading and trapping processing to all borders in such greater than a; When the border number that color fading and trapping takes place and the ratio of such border number are less than or equal to a, then the color fading and trapping processing is not all carried out on all borders in this classification, and the span of described a is 0.6 〉=a 〉=0.4.
Effect of the present invention is: adopt method and system of the present invention, can be according to the boundary luminances difference with gradual change border classification carrying out color fading and trapping, make when having in the gradual change line direction of multirow outline letters or figure and outline letters or figure vertical with the gradual change direction, the behavior unanimity of every capable outline letters or figure generation color fading and trapping, thus the quality of printed matter improved.
Description of drawings
Fig. 1 is the method flow diagram of a kind of gradual changing color fading and trapping of the present invention;
Fig. 2 is for carrying out the gradient object that color fading and trapping is handled in the embodiment of the invention;
Fig. 3 is the method flow diagram of border classification in the embodiment of the invention.
Embodiment
The present invention is described in further detail below in conjunction with Figure of description and specific embodiment.
A kind of system of gradual changing color fading and trapping comprises with lower module:
(1) boundary luminances computing module: be used to search the border of gradual change hollow core character or figure, calculate all boundary luminances, and it is formed boundary luminances set L
1~L
n
(2) border sort module: be used for being classified in all borders according to the boundary luminances difference;
(3) color fading and trapping processing module: be used to judge whether every class border is carried out color fading and trapping and handled, and carry out the color fading and trapping processing to satisfying the border of carrying out the color fading and trapping condition.
In the present embodiment, described border sort module also is provided with lower module:
Classification initialization module: be used for boundary luminances L
1~L
nSort from low to high by brightness, and the border that brightness is the darkest puts into current the 1st category set, set the darkest border of brightness for this reason, current border;
Difference calculating module: be used to judge whether to exist brightness time dark border, if there is brightness time dark border in current border, then calculate the difference of two brightness by ordering, otherwise finish;
New category set creation module: be used to judge that whether the difference of two brightness is greater than setting threshold values, if the difference calculated of difference calculating module is created new category set when setting threshold values, setting current category set is this new category set, new category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border; Otherwise, current category set is put on this brightness time dark border, and is set brightness time dark border for this reason, current border.
In the present embodiment, as shown in Figure 2, the multirow outline letters is arranged in the gradual change, and the line direction of outline letters is vertical with the gradual change direction, the method for then carrying out gradual changing color fading and trapping comprises following steps as shown in Figure 1:
(1) searches the border of gradual change hollow core character or figure, calculate all boundary luminances, and it is formed boundary luminances set L
1~L
n, S11;
In the present embodiment, search the border of gradual change hollow core character A, B, C, D, E, F, comprise an inner boundary and an external boundary as hollow character A, hollow character B comprises two inner boundaries and an external boundary, in like manner, other character is determined its border according to the hollow character shape.Then, calculate all boundary luminances, and it is formed boundary luminances set L
1~L
nWherein, boundary luminances refers to be not more than average brightness in the zone of set point D with frontier distance in that gradual change is inner.Wherein, the span of D is for being less than or equal to the color fading and trapping width, and the value of D is the color fading and trapping width in the present embodiment.
Above-mentioned to search the border of gradual change hollow core character or figure and calculate all boundary luminances be the present patent application prior art a few days ago, just is not described in detail at this.
(2) according to the boundary luminances difference with the classification of all borders in the step (1) S12;
As shown in Figure 3, the method for concrete classification comprises following steps:
A. with boundary luminances L
1~L
nSort from low to high by brightness, and the border that brightness is the darkest puts into current the 1st category set, set the darkest border of brightness for this reason, current border;
B. judge whether to exist brightness time dark border, if there is brightness time dark border in current border, then calculate the difference of two brightness by ordering, otherwise finish;
Whether the difference of c. judging two brightness is greater than setting threshold values, if this difference is then created new category set greater than setting threshold values, setting current category set is this new category set, new category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border, return step b; Otherwise, current category set is put on this brightness time dark border, and set brightness time dark border for this reason, current border, return step b.Wherein, the scope of described setting threshold values is [30,60], and setting threshold values in the present embodiment is 50.
(3) judge successively whether every class border is carried out color fading and trapping and handled: judge successively in same classification whether each border satisfies the condition of carrying out color fading and trapping, if the ratio that satisfies the border number carry out the color fading and trapping condition and such border number is greater than 0.5, then the color fading and trapping processing is all carried out on all borders in such; When the border number that color fading and trapping takes place and the ratio of such border number are less than or equal to 0.5, then color fading and trapping treatment S 13 is not all carried out on all borders in this classification;
Wherein, it is as follows to judge whether the border condition of color fading and trapping takes place:
I) extract the border ink composition of gradual change hollow core character or figure, and it is transformed into the LAB space, calculate total brightness L, the darkest printing ink brightness value L
1With the light color inks brightness value L
2, and L
1<L
2, wherein the printing ink of brightness value minimum is the darkest printing ink, residual ink claims light color inks beyond the darkest printing ink;
II) the darkest printing ink site percentage must be greater than 45%, and the brightness value of dark printing ink must be less than 65;
Wherein, printing ink site percentage is meant in that gradual change is inner and is not more than the mean value of the site percentage of printing ink in the zone of set point D with frontier distance, and the span of D is for being less than or equal to the color fading and trapping width, and the value of D is the color fading and trapping width in the present embodiment.
III) light color inks brightness value L
2With the difference DELTA L of total brightness L within prescribed limit, then need to carry out color fading and trapping, wherein the prescribed limit of difference DELTA L is generally 15<Δ L<90.
Method of the present invention is classified the gradual change border according to the boundary luminances difference and is carried out color fading and trapping, making has multirow outline letters or figure in the gradual change, and when the line direction of outline letters or figure is vertical with the gradual change direction, the behavior unanimity of every capable outline letters or figure generation color fading and trapping improves print quality.
Consider the description of this invention disclosed herein and special embodiment, other embodiment of the present invention are conspicuous for a person skilled in the art.These explanations and embodiment only consider as an example that they all belong to by within the indicated protection scope of the present invention and spirit of claims.