Abstract:
An automatic trapping method and system is used for packaging printing. The method includes translating trapping objects into simple color blocks, scanning all of the blocks and attaining trapping boundaries, determining whether the color blocks on both sides of the trapping boundaries meet the trapping rule depending on the ink dots percentage and luminance, connecting trapping boundaries by analyzing regions, creating trapping zone and filling ink into the zone and reducing color.

Description:
FIELD OF INVENTION 
       [0001]    The invention relates to the technology field of publishing and printing, particularly, concerns a method and a system for automatic trapping. 
       BACKGROUND OF THE INVENTION 
       [0002]    Chromatography is the printing in the case that the corresponding region of the previous color plate is knocked out during the printing process. Misregistration often occurs in multicolor chromatography, especially in flexography. Misregistration causes gaps to appear in the edge of two adjacent color blocks. In order to avoid those gaps, it is necessary to generate some small overlaps, also known as trapping regions, between the edges of different objects so that they are unnoticeable to human eyes. 
         [0003]    Trapping is customarily called amending color trapping in the printing industry. It is mainly to amend the boundaries between two adjacent different colors caused by misregistration. People always feel that dark color is closer to eyes than light color when looking at a printing. Therefore, when trapping is made to original printings, people always try to make the light color to be covered by the dark color, and keep the dark color the same. Thus, even if a small offset appears due to misregistration, the overlapped printing would prevent the shape of the objects from being distorted. 
         [0004]    There are two major trapping methods. One is manual trapping. Manual trapping is neither efficient nor effective. Another method is automatic trapping based on adjacent colors only. That trapping method takes account of adjacent color block pairs only. Although it can make one-to-many trapping regions connections when trapping borders are adjacent, and trapping direction are the same, it can not make many-to-one or many-to-many trapping regions connections. U.S. Pat. No. 7,123,381B2 discloses a trapping method based on a single trapping border, but it fails to make a connection of all trapping borders. Thus, the automatic trapping method based on adjacent color block pairs needs to be improved. 
       BRIEF SUMMARY OF THE INVENTION 
       [0005]    This invention advances the art and overcomes the problems outlined above by providing a method and a system for automatic trapping based on region analysis. 
         [0006]    This invention provides a method for automatic trapping, comprising: (1) translating trapping objects into simple color blocks; (2) obtaining the pubic boundaries of adjacent color blocks, namely the trapping boundaries, by scanning all the color blocks; (3) determining whether the color blocks around the trapping boundaries satisfy the condition for trapping or not, and if not, dropping these color blocks; (4) performing region analysis by setting a central color block and analyzing its relations with all other surrounding color blocks to make trapping edge connections; (5) generating trapping region shape, filling ink and subtracting ink for trapping region. 
         [0007]    In another embodiment, step (1) of the method mentioned above comprises first processing the trapping objects to obtain simple objects consisting of flat screen, gradients, mixed objects and images; then translating the mixed color mode and transparency information of the simple objects into overprint effect; and lastly combining and segmenting the results to obtain simple color blocks. 
         [0008]    In another embodiment, step (3) of the method mentioned above comprises determining whether the color blocks around the trapping edge satisfy the conditions for trapping or not based on ink dots percentage and luminance, wherein said conditions consist of color trapping condition and pullback trapping condition. 
         [0009]    In another embodiment, when making trapping condition determinations in step (3), if the region near the trapping edge of a color block in color pairs has no ink, then pullback trapping condition should be applied. Otherwise, color trapping condition should be applied. 
         [0010]    In another embodiment, the region analysis in step (4) of the method mentioned above comprises carrying out firstly one-to-many trapping edge connections, then many-to-one trapping edge connections, and lastly, many-to-many trapping edge connections. 
         [0011]    In another embodiment, the trapping region shape generating step of step (5) of the method mentioned above comprises a step to determine whether the conditions for generating a smooth transition trapping region are satisfied or not. The determination step comprises combining multiple entering color blocks as the new entering color blocks, and multiple entered color blocks as the new entered color blocks for the trapping boundaries which are undergoing trapping edge connections, and then determining if the conditions for generating a smooth transition trapping region are satisfied or not. 
         [0012]    In another embodiment, if the conditions for generating a smooth transition trapping region are satisfied, then the trapping region generating step in step (5) further comprises firstly dissecting trapping edge to generate satellite lines on both sides of the trapping edge; then determining the shape of two-sides satellite lines along dissection points on the trapping boundaries by adjusting the location of the corresponding points on two-sides satellite lines according to two-sides luminance, and finally generating trapping region shape according to the endpoint type and cutting mode. 
         [0013]    In another embodiment, if the conditions for generating a smooth transition trapping region are not satisfied, then the method in step (5) comprises generating satellite lines along the parallel line segments at the side of the entered color block according to the trapping edge obtained by trapping parameters, and then generating trapping region shape according to the endpoint type and cutting mode. 
         [0014]    In another embodiment, the filling and subtracting trapping ink step in step (5) comprises first determining whether or not trapping connections need to be made, and if yes, dividing the trapping boundaries generated from trapping region connections, and then filling and subtracting ink according to different trapping types. 
         [0015]    A system for automatic trapping is also provided, comprising: (1) a trapping objects color blocking module which is configured to translate trapping objects into color blocks; (2) a trapping edge positioning module which is configured to obtain the pubic boundaries of adjacent color blocks (also called the trapping boundaries) by scanning all the color blocks; (3) a trapping determining module which is configured to determine whether the color blocks around the trapping edge satisfy the trapping conditions or not; (4) a region analyzing module which is configured to execute region analysis by setting a central color block and combining the relations with all the surrounding color blocks to conduct trapping edge connections; (5) a trapping conducting module which is configured to generate trapping region shape, fill ink and subtract ink for trapping regions. 
         [0016]    In one embodiment, the trapping determining module determines whether the color blocks around the trapping edge satisfy the conditions for trapping or not based on ink dots percentage and luminance, wherein said determination conditions include color trapping condition and pullback trapping condition. 
         [0017]    In another embodiment, the region analyzing module carries out firstly one-to-many trapping edge connections then many-to-one trapping edge connections, and lastly many-to-many trapping edge connections. 
         [0018]    This invention has the following advantages: The method and system disclosed in this invention solves the problem of isolation and poor connections between trapping areas in existing technologies and improves the overall printing visual appearance by determining whether the color blocks around the trapping edge satisfy the conditions for trapping or not on the basis of ink dots percentage and luminance, and connecting the trapping region boundaries by trapping edge connection analysis. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0019]      FIG. 1  is a flow chart illustrating the method for automatic trapping according to this invention. 
           [0020]      FIG. 2  is a flow chart for generating trapping region shape according to an embodiment of this invention. 
           [0021]      FIG. 3  is a flow chart of filling and subtracting ink according to an embodiment of this invention. 
           [0022]      FIG. 4  illustrates how to generate trapping region shapes based on the shape and cutting method of all endpoints types according to an embodiment of this invention. 
           [0023]      FIG. 5  illustrates how to do color blockings according to this invention 
           [0024]      FIG. 6  illustrates how to do smooth translating trapping according to this invention. 
           [0025]      FIG. 7  illustrates the effect of obtaining two-sides satellite lines of smooth translation trapping boundaries after making adjustment according to an embodiment of this invention. 
           [0026]      FIG. 8  illustrates the basic framework for an automatic trapping system according to this invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0027]    The following detailed description to the drawings and examples provides a more detailed disclosure of the present invention. 
         [0028]    A method for automatic trapping, as shown in the flowchart of  FIG. 1 , including the following steps: 
         [0029]    (1) Processing trapping objects into color blocks. 
         [0030]    a. According to the trapping parameters set by user, processing flat screen, gradients, images, designs, grids, characters, symbols, transparency, clipping masking, opacity masking, multideck objects, monolayer-objects, mixed objects special effect and so on to obtain simple objects, namely simple objects consisting of flat screen, gradients, mixed objects and images. All those processes, as well as processes such as stroking and filling in separation, separating designs into simple objects, inserting external objects, scattering characters into simple path and so on, are all well-known knowledge in the field. 
         [0031]    b. Translating the mixed color mode and transparency information of simple objects into overprint effect. 
         [0032]    c. Combining and segmenting the result of step (b) to obtain simple color blocks. 
         [0033]    After the processing, the obtained simple color blocks appear in either adjacent or nonadjacent positions. As shown in  FIG. 5 , figure a) is a graphic example before color-blocking, wherein a variety of colors appears mixed. After color-blocking, it has been transformed into simple adjacent color blocks as shown in figure b). Color block  1  is yellow, while color block  2  is red and color block  3  is magenta. 
         [0034]    (2) Obtaining the trapping edge. Obtain the trapping edge by scanning all the color blocks and obtaining the pubic boundaries of adjacent color blocks, also called the trapping edge. 
         [0035]    (3) Determining whether to conduct trapping or not based on ink dots percentage and luminance. 
         [0036]    Determine whether the color blocks around the trapping edge satisfy the trapping conditions or not based on ink dots percentage and luminance. If the trapping conditions are not satisfied, drop those color blocks. There are two types of trapping conditions, namely color trapping condition and pullback trapping condition. Pullback trapping condition is applied if the regions near the trapping edge of a color block in color pairs have no ink. Otherwise, color trapping condition is applied. 
         [0037]    For the purpose of determining trapping condition, color block ink refers to the ink within the region where the distance from the trapping edge is no more than the setting value D. The ink dots percentage is the average ink dots percentage within the region where the distance from the trapping edge is no more than the setting value D. The value of D is less than or equals to the trapping width. In one embodiment, D is set to be the trapping width. 
         [0038]    a. Color trapping condition is determined by ink dots percentage. 
         [0039]    If color block A does not have the same printing ink as color block B, then trapping should be performed between the two color blocks. If color block A and color block B has the same printing ink, then trapping should be performed if the following two conditions are met: 
         [0040]    I) Color block A and color block B have at least two kinds of the same printing ink which meet the qualification |InkS(A)−InkS(B)|&gt;Minimum Ink Difference, wherein the Minimum Ink Difference (which is the difference of minimum printing ink set by user) could be any value ranging from 0% to 100%. 
         [0041]    II) Calculate the difference of percentage InkS(A)−InkS(B) for each of the two kinds of the same printing ink dots that satisfies condition I. The two values obtained from the calculation must be a positive number and a negative number, respectively. 
         [0042]    In the above calculation, (InkS(A)−InkS(B)) is the dot percentage difference of same ink S. As for ink S, the dot percentage difference is the result of the dot percentage of ink S in color block A minus the dot percentage of ink S in color block B. 
         [0043]    For example: the ink dot percentage of color block A is C 20%, M 50%. The ink dot percentage of color block B is C 30%, M 20%. C represents cyan while M represents magenta. 
         [0044]    Color block A and color block B has the same ink. For cyan ink C: InkC(A)−InkC(B)=20%−30%=−10%, the value is negative. For magenta ink M: InkM(A)−InkM(B)=50%−20%=30%, the value is positive. If the Minimum Ink Difference is 5%, then color block A and color block B satisfy the condition for color trapping. 
         [0045]    In the same example, if color block A and color block B has one kind of same ink, then perform the determination according to condition I and II. For any ink that is not in a color block, treat the ink dot percentage as 0% and continue the determination. 
         [0046]    Trapping direction is determined by luminance. Specifically, first convert the ink components of two color blocks into LAB color space to obtain the luminance, then perform trapping from the color block with higher luminance value towards the color block with lower luminance value. Light colors have higher luminance values and heavy (dark) colors have lower luminance values. 
         [0047]    b. Pullback trapping condition is satisfied if the followings are met: 
         [0048]    I) Take out the inked color block from the color blocks around the trapping edge. Convert the ink components of said color block into LAB color space and calculate the total luminance L, the heaviest ink luminance L 1  and the lightest ink luminance L 2 . The ink with the lowest luminance is called the Heaviest Ink while the rest of the inks are called Light Inks. 
         [0049]    II) The ink dot percentage of the Heaviest Ink must be greater than 45% and the luminance of the Heaviest Ink must be less than 65. 
         [0050]    III) If the difference value, ΔL, between L 2  and L, is within the range of a set value, then the pullback trapping condition is satisfied. The range of the set value usually is 15&lt;ΔL&lt;90. 
         [0051]    Trapping direction is from the block that has no ink towards the color block that has ink around the trapping edge. 
         [0052]    (4) Region Analysis 
         [0053]    Region analysis is to set a central color block and then combine the relations with all the surrounding color blocks to conduct trapping edge connections. 
         [0054]    Firstly, perform one-to-many trapping edge connections. For each color block, obtain all the outward trapping boundaries from said color block. If two outward trapping boundaries are adjacent, then connect the two trapping boundaries as a new trapping edge. 
         [0055]    Secondly, perform many-to-one trapping edge connections. As for each color block that did not receive trapping edge from the one-to-many trapping edge connection step, take out all the inward trapping boundaries from said color block. If two inward trapping boundaries are adjacent, then connect the two trapping boundaries as a new trapping edge. 
         [0056]    Lastly, perform many-to-many trapping edge connections. For a certain trapping edge which did not perform said one-to-many or many-to-one trapping edge connections, obtain a trapping edge with common points with said trapping edge. If two trapping boundaries have the same trapping direction, then connect the two trapping boundaries as a new trapping edge. Repeat above steps until it can no longer connect. 
         [0057]    (5) Perform trapping 
         [0058]    Firstly, generate trapping region shape, as shown in the flowchart in  FIG. 2 . 
         [0059]    S 21 : Determine whether to perform trapping connections or not. If yes, turn to S 22 , otherwise turn to S 23 ; 
         [0060]    S 22 : Combine multiple entering color blocks as the new entering color blocks, and combine the entered color blocks as the new entered color block; 
         [0061]    S 23 : Determine the entering color block and the entered color block; 
         [0062]    S 24 : Determine whether it is needed to generate smooth transition trapping region or not. If yes, turn to S 25 , otherwise turn to S 28 ; 
         [0063]    S 25 : Define a number of N dissection points on the trapping edge and dissect the trapping edge, wherein the dissection points dissect the trapping edge equally. 
         [0064]    S 26 : According to the trapping parameters, generate two parallel line segments which are located on both sides of the trapping edge and which are parallel with the trapping edge. Those two parallel line segments make two original satellite lines, and each dissection point on the trapping edge matches with the corresponding point on the satellite lines. In addition, the dissection point and the two corresponding points locate on the same line. Said parallel line segments and trapping edge are of the same shape and the distance between them is the trapping width. 
         [0065]    S 27 : Finally determine the shape of two-sides satellite lines along the dissection points on the trapping boundaries by adjusting the location of the corresponding points on the two-sides satellite lines according to the two-sides luminance. Turn to S 29 . 
         [0066]    As for smooth transition trapping, the user decides whether it is needed to conduct smooth transition trapping for the gradients or not. The specific method for generating region shape for gradient trapping is shown in  FIG. 6 . The two-sides satellite lines are 62 and 63 respectively. Specific trapping steps are as below: 
         [0067]    Calculate the color block luminance L of a certain dissection point Q 64  on both sides of the trapping edge  61 . Set the lower luminance value as L 1 , and the corresponding dissection point on the other side of the satellite line as Q 1 . Set the higher luminance value as L 2 , and the corresponding dissection point on the said side of satellite line as Q 2 ; 
         [0068]    Calculate Z=L 1 /L 2 . If Z&lt;=Sliding Limit, then Q 165  remains the same and adjust Q 266  to coincide with dissection point Q along line  67 . Said line passes dissection point Q and the corresponding points Q 1  and Q 2  on the satellite line. 
         [0069]    If Z&gt;Sliding Limit, adjust the corresponding points Q 1  and Q 2  of dissection points on the two-sides of satellite line. Make sure that Q 1  and Q 2  satisfies the following conditions simultaneously: 
         [0000]        Q 2 Q|L 2 =|QQ 1 |L 1 ,|Q 1 Q|+|QQ 2|=trapping width 
         [0070]    Sliding Limit is called the smooth transition parameter that is set by the user, it can be a random value ranging from 0% to 100%. 
         [0071]    Finally determine the shape of the two-sides satellite lines after making adjustment.  FIG. 7  illustrates the effect of the satellite lines shapes on both sides of trapping edge after making adjustment according to the present embodiment of this invention. 
         [0072]    S 28 : Generate satellite lines along the parallel line segments at the side of entered color block according to the trapping edge obtained by trapping parameters. Said parallel line segments and the trapping edge are of the same shape and parallel. The distance between them is the trapping width. 
         [0073]    S 29 : Generate trapping region shape accordance to the endpoint type and cutting mode. The program ends. 
         [0074]    Endpoint types include square shape and natural extension. Said square shape is the shape which connects the trapping edge and the corresponding endpoints on the satellite lines. Said natural extension is the shape which connects the trapping edge and the corresponding endpoints on the satellite lines, after making sure that the two ends of the trapping edge enter the two tangents of the color block, and adjusting the endpoints of the satellite lines to make the endpoints fall over the tangent. 
         [0075]    Cutting modes include edge cutting and axial cutting. When the entered color block is being trapped by another color block, edge cutting refers to cutting along the edge of the entered color block, if the new color block exceeds the edge of the entered color block, so that the trapping region is within the entered color block, .Axial cutting refers to cutting along the central axis of the entered color block to make sure the trapping region does not exceed the center of the entered color block. 
         [0076]    Take a yellow block and a cyan block for example, the yellow color block is the entering color block and the cyan color block is the entered color block. As shown in  FIG. 4 , a) illustrates the trapping contours obtained after natural extension and edge cutting; b) illustrates the trapping contours obtained after natural extension and axial cutting; c) illustrates the trapping contours obtained after square shape and edge cutting; and d) illustrates the trapping contours obtained after square shape and the axial cutting. 
         [0077]    Flow chart for filling and subtracting ink of the trapping region is shown in  FIG. 3 : 
         [0078]    S 31 : Determine whether to make connections between the trapping boundaries, if yes, then execute S 32 , otherwise execute S 33 ; 
         [0079]    S 32 : Dissect the formed trapping edge according to different connection types of the trapping edge. 
         [0080]    For one-to-many trapping boundaries generated after trapping region connection, dissect along the edge of the entered color block. Use one color block to dissect the whole trapping region to generate dissected trapping regions. Then generate dissected trapping regions of another color block using the same method. 
         [0081]    For many-to-one trapping boundaries generated after trapping region connection, there are two ways to dissect the trapping regions. One is to use the angle bisect line, i.e., dissect the .trapping region along the bisect line of the angle between the trapping edge connection points of the entered color block. The other way is the Area Ratio method: Draw a small circle around the connection point of the trapping edge. This small circle and two entering color blocks form two small regions with areas, S 1  and S 2 , respectively. Locate a dividing line so that the angle between the trapping edge connection points of the entered color block is divided into two angles, a and b, according to the equation S 1 /S 2 =a/b. Use this dividing line to dissect the trapping region to obtain disserted trapping region. 
         [0082]    As for many-to-many trapping boundaries generated after trapping region connection, either dissect the trapping regions based on the entered color block or by using the Area Ration method. 
         [0083]    In one embodiment, the entering color block and entered color block in the steps for dividing trapping edge generated after trapping region connections are the entering color blocks and entered color blocks determined by step (3). 
         [0084]    S 33 : Determine whether pullback trapping should be performed or not. If yes, turn to S 34 , otherwise turn to S 35 . 
         [0085]    S 34 : Fill ink for pullback trapping: The ink filled for trapping is the darkest ink components of the entered color block, while the ink dot percentage of the other ink components is set to 0.2%. The program ends. 
         [0086]    S 35 : Fill ink for color trapping, the filled ink for trapping are the ink components of the entering color block, and the percentage of its ink dot is adjusted according to trapping parameters. 
         [0087]    The method for filling color is: if the color block is flat screen, then use the flat screen printing ink directly to fill the trapping region. If the color block is gradual, then use the gradient color to fill the trapping region. If the color block is image, then use the image pixel components to fill as flat screen. A number of small flat screens form the trapping region. 
         [0088]    S 36 : The ink subtracting process: If the trapping region and entered region contain a same ink component, and the percentage of the ink dots in the trapping region is less than the ink dot percentage in the entered region, then perform the subtracting process, i.e., remove the same ink in the trapping region and end the program. In one embodiment, it is necessary to generate trapping region shape for each trapping edge, fill trapping ink, and/or subtract ink. 
         [0089]    As shown in  FIG. 8 , the system for implementing this invention comprises the following software modules. 
         [0090]    (1) a trapping objects color blocking module 
         [0091]    Translate the trapping objects into color blocks to obtain simple color blocks which are in either adjacent or nonadjacent positions. 
         [0092]    (2) a trapping edge positioning module 
         [0093]    Obtain the pubic boundaries of adjacent color blocks, namely the trapping edge, by scanning all the color blocks. 
         [0094]    (3) a trapping determination module 
         [0095]    Determine whether the color blocks around the trapping edge satisfy the conditions for trapping or not based on ink dots percentage and luminance, said conditions include color trapping condition and pullback trapping condition. 
         [0096]    (4) a region analysis module 
         [0097]    Execute region analysis by setting a central color block and combining the relations with all the surrounding color blocks to conduct trapping edge connections. Perform one-to-many trapping edge connections first, then many-to-one trapping edge connections, and lastly, many-to-many trapping edge connections. 
         [0098]    (5) a trapping conducting module 
         [0099]    Generate trapping region shape, fill ink and subtract ink for trapping region. 
         [0100]    The method and system adopted by this invention solves the problem of isolation and lack of coordination between trapping areas in existing technologies by determining whether the color blocks around the trapping edge satisfy the trapping conditions or not based on ink dots percentage and luminance, and connecting trapping region boundaries by performing trapping edge connection analysis. 
         [0101]    Additional embodiments and features are set forth in the description that follows. Other embodiments may become obvious to those skilled in the art upon examination of the specification or from practice of the invention. It should thus be noted that the matter contained in the above description or shown in the accompanying drawings should be interpreted as illustrative and not in a limiting sense.