Summary of the invention
For the defective that exists in the prior art, the object of the present invention is to provide a kind of method and system of Modify rapidly trapping direction, improve the efficient that the trapping direction is revised.
For achieving the above object, the technical solution used in the present invention is as follows:
A kind of method of Modify rapidly trapping direction may further comprise the steps:
(1) determines to need in the image to revise initial trapping border and the terminal point trapping border of trapping direction, obtain path, trapping border according to initial trapping border and terminal point trapping border; Path, described trapping border refers to the shortest path that is comprised of the trapping border between initial trapping border and the terminal point trapping border;
(2) set with reference to the trapping border, determine with reference to trapping look pair; The described trapping border comprising in the path, trapping border by user's appointment of referring to reference to the trapping border; Described with reference to the trapping look to referring to the color lump with reference to the trapping boundaries on either side;
(3) definite trapping direction with reference to the trapping border is carried out the modification of trapping direction according to the trapping direction on reference trapping border to other trapping border in the path, trapping border.
Further, the method for aforesaid a kind of Modify rapidly trapping direction in the step (1), obtains path, trapping border by shortest-path method, and concrete mode is:
Search all paths between initial trapping border and the terminal point trapping border, and the length on all trapping borders of record path process, obtain the length in path, the shortest path of length is path, trapping border.
Further, the method for aforesaid a kind of Modify rapidly trapping direction, in the step (3), described trapping direction with reference to the trapping border is the reverse of former trapping direction or former trapping direction.
Further, the method for aforesaid a kind of Modify rapidly trapping direction, in the step (3), the concrete mode of the modification of trapping direction is carried out on other trapping border in the path, trapping border according to the trapping direction on reference trapping border is:
A. search the trapping border that links with reference trapping border in other trapping border, trapping is carried out according to the trapping direction on reference trapping border in this trapping border;
B. the printing ink of searching trapping boundaries on either side color lump in other trapping border all with reference to the identical border of trapping look right printing ink, trapping is carried out according to the trapping direction on reference trapping border in this trapping border;
C. search the printing ink of trapping boundaries on either side color lump in other trapping border with reference to the identical border of color lump printing ink of trapping look centering, during trapping the color lump of this identical printing ink enter or by the relation of entering with reference to the same oil mass colour piece of trapping look centering enter or entered concern identical;
D. revise the residue border in other trapping border; Processing mode is: check whether the trapping direction with reference to the trapping border is former trapping direction, if then remain not revising of border; The trapping direction that then remains if not the border is the reverse of its former trapping direction.
Further again, the method of aforesaid a kind of Modify rapidly trapping direction, if a certain trapping border in the path, trapping border does not need the modification of trapping direction, in step (3), to other trapping border outside this trapping border in the path, trapping border, make amendment according to the trapping direction on reference trapping border.
Further, the method for aforesaid a kind of Modify rapidly trapping direction, among the step a, the trapping border with reference to the trapping border link refer to this trapping border be positioned on the same curve with reference to the trapping border.
A kind of system of Modify rapidly trapping direction comprises:
Trapping path chosen module: be used for initial trapping border and terminal point trapping border that definite image needs to revise the trapping direction, obtain path, trapping border according to initial trapping border and terminal point trapping border; Path, described trapping border refers to the shortest path that is comprised of the trapping border between initial trapping border and the terminal point trapping border;
With reference to the border setting module: be used for setting with reference to the trapping border, determine with reference to trapping look pair; The described trapping border comprising in the path, trapping border by user's appointment of referring to reference to the trapping border; Described with reference to the trapping look to referring to the color lump with reference to the trapping boundaries on either side;
Trapping module: be used for definite trapping direction with reference to the trapping border, and according to the trapping direction on reference trapping border the modification of trapping direction carried out on other trapping border in the path, trapping border.
Further, the system of aforesaid a kind of Modify rapidly trapping direction, described trapping module comprises:
Trapping unit, border links: be used for searching path, trapping border and the trapping border that reference trapping border links, trapping is carried out according to the trapping direction on reference trapping border in the trapping border that links;
Color lump is to trapping unit, the identical border of printing ink: the printing ink that is used for searching other trapping border trapping boundaries on either side color lump all with reference to the identical border of trapping look right printing ink, trapping is carried out according to the trapping direction on reference trapping border in this trapping border;
Trapping unit, the identical border of single printing ink: be used for searching the printing ink of other trapping border trapping boundaries on either side color lump with reference to the identical border of color lump printing ink of trapping look centering, during trapping the color lump of this identical printing ink enter or by the relation of entering with reference to this same oil mass colour piece of trapping look centering enter or quilt entered concern identical;
Residue trapping unit, border: the trapping direction that is used for revising other residue border, trapping border; Alter mode is: check whether the trapping direction with reference to the trapping border is former trapping direction, if then remain not revising of border; The trapping direction that then remains if not the border is the reverse of its former trapping direction.
Beneficial effect of the present invention is: method and system of the present invention can realize the repeatedly automatic trapping direction on trapping border fast, by selecting from beginning to end the method on trapping border, have greatly improved the trapping direction and have revised efficient.
Embodiment
The present invention is described in further detail below in conjunction with Figure of description and embodiment.
Fig. 1 shows the structured flowchart of the system of a kind of Modify rapidly trapping of the present invention direction, and this system comprises trapping path chosen module 11, with reference to border setting module 12 and trapping module 13, wherein:
The selected mould 11 in trapping path is used for initial trapping border and the terminal point trapping border that definite image needs to revise the trapping direction, obtains path, trapping border according to initial trapping border and terminal point trapping border; Path, described trapping border refers to the shortest path that is comprised of the trapping border between initial trapping border and the terminal point trapping border;
Be used for setting with reference to the trapping border with reference to border setting module 12, determine with reference to trapping look pair; The described trapping border comprising in the path, trapping border by user's appointment of referring to reference to the trapping border; Described with reference to the trapping look to referring to the color lump with reference to the trapping boundaries on either side;
Trapping module 13 is used for definite trapping direction with reference to the trapping border, and according to the trapping direction on reference trapping border the modification of trapping direction is carried out on other trapping border in the path, trapping border; This trapping module comprises:
Trapping unit, border links: be used for searching path, trapping border and the trapping border that reference trapping border links, trapping is carried out according to the trapping direction on reference trapping border in the trapping border that links;
Color lump is to trapping unit, the identical border of printing ink: the printing ink that is used for searching other trapping border trapping boundaries on either side color lump all with reference to the identical border of trapping look right printing ink, trapping is carried out according to the trapping direction on reference trapping border in this trapping border;
Trapping unit, the identical border of single printing ink: be used for searching the printing ink of other trapping border trapping boundaries on either side color lump with reference to the identical border of color lump printing ink of trapping look centering, during trapping the color lump of this identical printing ink enter or by the relation of entering with reference to this same oil mass colour piece of trapping look centering enter or quilt entered concern identical;
Residue trapping unit, border: the trapping direction that is used for revising other residue border, trapping border; Alter mode is: check whether the trapping direction with reference to the trapping border is former trapping direction, if then remain not revising of border; The trapping direction that then remains if not the border is the reverse of its former trapping direction.
Fig. 2 shows the flow chart of the method for a kind of Modify rapidly trapping of the present invention direction, and as can be seen from Figure, the method mainly may further comprise the steps:
Step S21: obtain path, trapping border according to initial trapping border and terminal point trapping border;
Determine to need in the image to revise initial trapping border and the terminal point trapping border of trapping direction, obtain path, trapping border according to initial trapping border and terminal point trapping border; Path, described trapping border refers to the shortest path that is comprised of the trapping border between initial trapping border and the terminal point trapping border.Obtain path, trapping border by shortest-path method, concrete mode is:
Search all paths between initial trapping border and the terminal point trapping border, and the length on all trapping borders of record path process, obtain the length in path, the shortest path of length is path, trapping border.
As shown in Figure 3, the user chooses trapping border 1 among the figure as initial trapping border, trapping border 2 is as terminal point trapping border, the path that trapping border between initial trapping border 1 and the terminal point trapping border 2 forms is by two, be path 1-3-4-5-2 and path 1-6-2, although path 1-6-2 the number on border of process less, but trapping border 3,4,5 three paths that form be less than the length on trapping border 6, is trapping path, border so the path that trapping border 1,3,4,5,2 is formed is chosen.
Step S22: set with reference to the trapping border, determine with reference to trapping look pair;
Setting is with reference to the trapping border, determines with reference to trapping look pair, the described trapping border comprising in the path, trapping border by user's appointment of referring to reference to the trapping border; Described with reference to the trapping look to referring to the color lump with reference to the trapping boundaries on either side.
After in step S21, finishing path, trapping border selected, in path, trapping border selected one wherein a trapping border be with reference to trapping look pair as reference trapping border with reference to the color lump of trapping boundaries on either side.As shown in Figure 4, trapping occured between color lump C and the color lump M, color lump M is for entering color lump, color lump C is for being entered color lump, be that former trapping direction color lump M enters color lump C, if choose trapping border between C color lump and the M piece be L as reference trapping border, then color lump C and color lump M are with reference to trapping look pair.
Step S23: the trapping direction according to reference trapping border is carried out the modification of trapping direction to other trapping border in the path, trapping border.
Determine the trapping direction with reference to the trapping border, according to the trapping direction on reference trapping border the modification of trapping direction is carried out on other trapping border in the path, trapping border.Trapping direction with reference to the trapping border is the reverse of former trapping direction or former trapping direction.When carrying out the modification of other trapping border trapping direction according to the trapping direction on reference trapping border, if a certain trapping border in the path, trapping border does not need the modification of trapping direction, the user can only make amendment to other trapping border outside this trapping border in the path, trapping border as required in this step.
In Fig. 5, with color lump C1 and color lump M as reference trapping border, determine its trapping direction for to enter C1 by M, the former trapping direction between color lump C1 and the color lump M is that color lump C1 enters color lump, so the trapping direction on the reference trapping border of this step is the reverse of former trapping direction.The concrete mode of the modification of trapping direction is carried out on other trapping border in the path, trapping border according to the trapping direction on reference trapping border is:
A. search the trapping border that links with reference trapping border in other trapping border, trapping is carried out according to the trapping direction on reference trapping border in this trapping border; Wherein, the trapping border with reference to the trapping border link refer to this trapping border be positioned on the same curve with reference to the trapping border.
Such as the color lump C2 among Fig. 5 and the border between the color lump Y1, and the border between color lump Y2 and the color lump C3 be located on the same line with reference to the trapping border, the border between color lump C2 and the color lump Y1 then, and the border between color lump Y2 and the color lump C3 is the trapping border that links with reference trapping border, its trapping direction is with consistent with reference to the direction on trapping border, be that color lump Y1 advances color lump C2, color lump C3 advances color lump Y2.
B. the printing ink of searching trapping boundaries on either side color lump in other trapping border all with reference to the identical border of trapping look right printing ink, trapping is carried out according to the trapping direction on reference trapping border in this trapping border;
If trapping look corresponding to trapping border pair with identical with reference to trapping look right printing ink, then will keep the right trapping of its trapping direction and the trapping look of user selection identical.As shown in Figure 6, with reference to the trapping look to being look to M1 and look to C1, the trapping direction is the reverse of former trapping direction, be that color lump M1 enters color lump C1, the right printing ink of trapping look corresponding to two trapping borders selecting is identical, M1 advances color lump C1 with reference to trapping look centering color lump, and the trapping direction of color lump C2 and color lump M2 needs and the trapping direction of color lump C1 and color lump M1 is consistent, and namely color lump M2 advances color lump C1.
C. search the printing ink of trapping boundaries on either side color lump in other trapping border with reference to the identical border of color lump printing ink of trapping look centering, during trapping the color lump of this identical printing ink enter or by the relation of entering with reference to the same oil mass colour piece of trapping look centering enter or entered concern identical.
If trapping look corresponding to trapping border is to having a color lump with identical with reference to trapping look right printing ink, then to keep entering of same oil mass colour piece identical with the relation of being entered, as shown in Figure 7, there is the printing ink of a color lump identical with the trapping look to (color lump M and color lump Y) to (color lump C and color lump M) with reference to the trapping look, be that color lump M advances color lump C with reference to trapping look right trapping direction, then color lump M also should advance color lump Y, and namely the color lump M of identical printing ink is and enters color lump.
D. revise the residue border in other trapping border; Processing mode is: check whether the trapping direction with reference to the trapping border is former trapping direction, if then remain not revising of border; The trapping direction that then remains if not the border is the reverse of its former trapping direction;
If trapping look corresponding to trapping border pair with reference to the trapping look to there not being above-mentioned three kinds when concerning of a, b, c, if with reference to the trapping look to being reversed, then other these type of trapping looks are to also oppositely necessary, if namely the trapping direction with reference to the trapping border is the reverse of former trapping direction, other trapping border also should be the reverse of its former trapping direction.By this kind trapping direction amending method, making needs the trapping border of modification trapping direction consistent with the trapping direction on the reference trapping border of selecting, so that area of trap is more coherent level and smooth, trapping effect is better.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technology thereof, then the present invention also is intended to comprise these changes and modification interior.