A kind of method of image trapping
Technical field
The invention belongs to technical field of packaging and printing, particularly a kind of image trapping method.
Background technology
In printing process, chromatography is meant the printing of under the situation of the respective regions hollow out (Knockout) of preceding version of the same colour, carrying out, and the situation of register trouble appears in multicolor overprint regular meeting often.Because register trouble, it is white, very not attractive in appearance some tiny leakages to occur at two adjacent graphic limit places.Leak white generation for fear of these, need between different target edges, generate some tiny double exposure zones, be also referred to as area of trap, it is white that human eye is leaked less than these.
When continuous-tone image and figure are adjacent in the prior art; Fall into and be printed on two kinds: the one, the expansion figure is in image; The 2nd, the expanded images edge can amplify a dot image according to reality during the expanded images edge slightly in figure, or utilizes image editing software that the image masking-out is strengthened.Research about color gradient; Some relevant patents are also arranged both at home and abroad; Like U.S. Patent Publication US7123381; Name is called the trapping method and the system of overprint error " revise colored printing ", discloses a kind ofly to judge whether to do and fall into seal through creating the visual module of an overprint error, and the method for definite trapping color and trap placement.Above-mentioned trapping method, when the area of trap between image and the figure with when being got into the zone and containing certain identical printing ink, can't be to the printing ink that area of trap the is filled processing of losing lustre, thus reduced the image trapping effect.
Summary of the invention
To the defective that exists in the prior art, the purpose of this invention is to provide between a kind of image and the figure based on the trapping method of Region Segmentation, solve and occur leaking white problem in the printing.This method realizes the extraction of area of trap image pixel coordinate and printing ink based on Region Segmentation, thereby judges the printing ink that this pixel of pixel printing ink concentration difference decision need be filled between image and the figure.
For realizing above-mentioned purpose, the technical scheme that the present invention adopts is: a kind of method of image trapping may further comprise the steps:
(1) confirms entering side and quilt entering side and area of trap;
(2), extract the coordinate and the printing ink of each image slices vegetarian refreshments of area of trap based on region segmentation method;
(3) fill area of trap printing ink and losing lustre: the printing ink of filling each pixel of area of trap; Wherein if image is entering side; Then fill the printing ink that printing ink is this pixel in the image, if figure is entering side, filling printing ink is the printing ink of this pixel in the figure; If area of trap and got into the zone and contain printing ink of the same race, and area of trap printing ink site percentage then loses lustre less than the printing ink site percentage that is got into the zone, removes this kind printing ink of this pixel in the area of trap.
Further, in step (1), through extracting the brightness that falls into seal boundary image and figure, confirm that the high side of brightness is entering side, the low side of brightness is by entering side.
Further, in step (2), described region segmentation method comprises the steps:
A. calculate area of trap boundary rectangle and outwards adjustment, it is alignd with pixel boundary, utilize the horizontal pixel boundary line in the circumscribed rectangular region to cut apart area of trap;
B. obtain the area of trap block, and calculate each area of trap block boundary rectangle, and outwards adjustment makes it align with pixel boundary;
C. each boundary rectangle among the width perpendicular cuts step b according to pixels finally obtains the coordinate and the printing ink of each pixel of area of trap.
Further, in step (2), described region segmentation method comprises the steps:
A. calculate area of trap boundary rectangle and outwards adjustment, it is alignd with pixel boundary, utilize the vertical pixel boundary line in the circumscribed rectangular region to cut apart area of trap;
B. obtain the area of trap block, and calculate each area of trap block boundary rectangle, and outwards adjustment makes it align with pixel boundary;
C. each boundary rectangle among the width levels cutting step b according to pixels finally obtains the coordinate and the printing ink of each pixel of area of trap;
Further again, in step (2), the printing ink of each image slices vegetarian refreshments of described area of trap is the printing ink of pixel of the area of trap respective coordinates of original image; Surpassed the original image border area of trap the image slices vegetarian refreshments printing ink for the printing ink of the nearest pixel of image distance.
Beneficial effect of the present invention is following: it is white to solve the leakage that multicolor overprint forbidden to cause through method of the present invention.Based on region segmentation method area of trap is differentiated more easily, and then judged the printing ink that to fill of the concentration difference decision filler pixels point of pixel printing ink between image and figure
Description of drawings
Fig. 1 is the method flow diagram of image trapping of the present invention;
Fig. 2 is original image and a clipping region sketch map in the present embodiment;
Fig. 3 is the adjacent sketch map with figure of image in the present embodiment;
Fig. 4 is an area of trap sketch map in the present embodiment;
Fig. 5 be in the present embodiment area of trap at the opposed area sketch map of original image;
Fig. 6 is an area of trap boundary rectangle sketch map in the present embodiment;
Fig. 7 is cut apart the area of trap sketch map for utilizing the interior horizontal pixel boundary line of circumscribed rectangular region in the present embodiment;
Fig. 8 is an area of trap block boundary rectangle sketch map in the present embodiment;
Fig. 9 outwards adjusts for area of trap block boundary rectangle in the present embodiment and makes its sketch map that aligns with pixel boundary;
Figure 10 is each pixel sketch map of area of trap in the present embodiment.
Embodiment
Below in conjunction with Figure of description and specific embodiment the present invention is described in further detail.
A kind of method of image trapping, flow process is as shown in Figure 1, comprises the steps:
(1) confirms entering side and quilt entering side and area of trap S11;
As shown in Figures 2 and 3, on original image 21, confirm clip path, the image 31 that obtains, it is adjacent with figure 32 in the layout, need fall into seal.In the step (1), through extracting the brightness that falls into seal boundary image and figure, confirm that the high side of brightness is entering side, the low side of brightness is by entering side.The brightness that falls into seal boundary image 31 in the present embodiment is higher than the brightness of figure 32, so image 31 is the side of enteringing, and figure 32 is quilt entering side, and area of trap is among Fig. 4 42.
(2), extract the coordinate and the printing ink S12 of each image slices vegetarian refreshments of area of trap based on region segmentation method;
As shown in Figure 5, area of trap is 51 in the opposed area of original image.In step (2), described region segmentation method, the coordinate and the printing ink of each pixel comprise the steps: in the image 51 of extraction area of trap
A. as shown in Figure 6, calculate the area of trap boundary rectangle, as shown in Figure 7 then, outwards adjust the area of trap boundary rectangle, it is alignd with pixel boundary, utilize the horizontal pixel boundary line in the circumscribed rectangular region to cut apart area of trap;
B. like Fig. 8 and shown in Figure 9, obtain the area of trap block, and calculate each area of trap block boundary rectangle, and outwards adjustment makes it align with pixel boundary;
C. shown in figure 10, each boundary rectangle among the width perpendicular cuts step b according to pixels finally obtains the coordinate and the printing ink of each pixel of area of trap;
In step (2), described region segmentation method can also realize through following steps:
A. calculate area of trap boundary rectangle and outwards adjustment, it is alignd with pixel boundary, utilize the vertical pixel boundary line in the circumscribed rectangular region to cut apart area of trap;
B. obtain the area of trap block, and calculate each area of trap block boundary rectangle, and outwards adjustment makes it align with pixel boundary;
C. each boundary rectangle among the width levels cutting step b according to pixels finally obtains each pixel coordinate of area of trap and the printing ink of each pixel coordinate;
In step (2); The printing ink of each pixel of image of described area of trap is the printing ink of pixel of the area of trap respective coordinates of original image; If area of trap surpassed the original image border, the printing ink that then surpasses the image slices vegetarian refreshments of area of trap is the printing ink with the nearest pixel of image distance.
(3) fill the area of trap printing ink and the S13 of losing lustre: the printing ink of filling each pixel of area of trap; Wherein if image is entering side; Then fill the printing ink that printing ink is this pixel in the image,, then fill the printing ink that printing ink is this pixel in the figure if figure is entering side; If area of trap and got into the zone and contain printing ink of the same race, and area of trap printing ink site percentage then loses lustre less than the printing ink site percentage that is got into the zone, removes this kind printing ink of this pixel in the area of trap.
The invention belongs to technical field of packaging and printing, particularly a kind of method of image trapping.This method at first according to falling into seal condition and trap width, is confirmed entering side and quilt entering side and area of trap; Secondly based on region segmentation method, extract the image pixel coordinate of area of trap and the printing ink of each pixel coordinate; Fill area of trap printing ink at last and lose lustre.It is white to solve the leakage that multicolor overprint forbidden to cause through method of the present invention.
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 accompanying claims.