Method and device for generating anti-counterfeiting mark
By obtaining the bounding rectangle of the graphic element and performing a rotation operation, the problems of slow graphic arrangement speed and limited methods in the existing technology are solved, and the diversified arrangement of graphics on the trajectory curve and the improvement of calculation speed are realized.
Patent Information
- Application Number
- CN202511480306.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing technologies for generating anti-counterfeiting marks by arranging graphics along curves are slow in computation and have limited arrangement options.
By acquiring the graphic to be arranged and the trajectory curve, the bounding rectangle of the graphic element is determined, and it is translated onto the trajectory curve. A rotation operation is performed according to the rotation angle to generate a graphic anti-counterfeiting mark.
It enables diverse arrangements of graphics on trajectory curves, improving computational speed and the diversity of graphic arrangements.
Smart Images

Figure CN120976371A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the security anti-counterfeiting technical field, in particular to a kind of generation method and device of anti-counterfeiting mark. BACKGROUND
[0002] With the rapid development of printing publishing industry and commodity economy, complex graphic design and anti-counterfeiting printing become increasingly important, and pattern anti-counterfeiting is one of the most important technologies in anti-counterfeiting printing. Pattern anti-counterfeiting, also known as bottom anti-counterfeiting, refers to a complex and fine line pattern set obtained by irregularly deforming and performing special effects on a plurality of vector lines appearing on a printed matter page. Microtext technology, as an efficient and difficult-to-copy anti-counterfeiting means, is widely used. This technology prints normal-size or reduced-size text in a very small area to achieve the purpose of anti-counterfeiting. These texts are usually difficult to see directly with the naked eye and need to be read clearly with the help of magnifying glass or microscope. This technology not only hides important information, but also quickly verifies its authenticity when needed through magnifying tools. The principle is to use high-precision printing equipment to reduce the size of the text or pattern to a very small size (usually within 0.2 mm). The generation process of microtext mainly converts the text (string) to be hidden into a contour curve object, and then arranges the contour curve object along the specified curve to generate a graphic arrangement effect with a specific trajectory. As can be seen, how to design the graphic arrangement along the curve is crucial in this process. Current technology can achieve a conventional curve arrangement method, but has the disadvantages of slow calculation speed and single arrangement method. SUMMARY
[0003] The present application provides a kind of generation method and device of anti-counterfeiting mark, solve the problem of slow calculation speed and single arrangement method when current graphic is arranged along curve to generate anti-counterfeiting mark.
[0004] To solve the above technical problems, the technical solutions of the present application are as follows: The present application provides a kind of generation method of anti-counterfeiting mark, comprising: obtaining a to-be-arranged graphic and a to-be-arranged trajectory curve; obtaining at least one graphic element and at least one circumscribed rectangular frame according to the to-be-arranged graphic; translating the at least one graphic element to the to-be-arranged trajectory curve according to the at least one circumscribed rectangular frame to obtain an intermediate graphic anti-counterfeiting mark; determining the rotation angle of the at least one graphic element when arranged on the intermediate graphic anti-counterfeiting mark; rotating the at least one graphic element on the intermediate graphic anti-counterfeiting mark according to the rotation angle to generate a graphic anti-counterfeiting mark.
[0005] Optionally, according to the to-be-arranged graph, at least one graph element and at least one circumscribed rectangular frame are obtained, comprising: element extraction is performed on the to-be-arranged graph to obtain at least one graph element; width and height of the at least one graph element are taken as width and height of a circumscribed rectangular frame of the at least one graph element respectively to form at least one circumscribed rectangular frame.
[0006] Optionally, according to the at least one circumscribed rectangular frame, the at least one graph element is translated to the to-be-arranged trajectory curve to obtain an intermediate graph anti-counterfeiting mark, comprising: starting point coordinates of the at least one circumscribed rectangular frame and at least one graph element are obtained to obtain terminal point coordinates; all graph elements are evenly arranged on the to-be-arranged trajectory curve according to the starting point coordinates and the terminal point coordinates, and all circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graph anti-counterfeiting mark.
[0007] Optionally, when the to-be-arranged trajectory curve is a straight line segment, the starting point coordinates of the at least one circumscribed rectangular frame and at least one graph element are obtained to obtain terminal point coordinates, comprising: end point coordinates of the straight line segment are obtained according to the to-be-arranged trajectory curve; a first vector is obtained according to the end point coordinates; terminal point coordinates are obtained according to the first vector, the starting point coordinates of the at least one circumscribed rectangular frame and the at least one graph element.
[0008] Optionally, when the to-be-arranged trajectory curve is a curve segment, the starting point coordinates of the at least one circumscribed rectangular frame and at least one graph element are obtained to obtain terminal point coordinates, comprising: a target matrix of the curve segment is obtained according to the to-be-arranged trajectory curve; a first distance is obtained according to the to-be-arranged trajectory curve, the at least one circumscribed rectangular frame, the target matrix and the starting point coordinates; the to-be-arranged trajectory curve is evenly divided to obtain at least two intermediate curve segments; a target point is selected on each of the at least two intermediate curve segments to form a point set with at least two target points; at least two second distances between the target points in the point set and the starting point are determined according to the at least two intermediate curve segments, the point set, the target matrix and the starting point coordinates; a judgment result is obtained according to the first distance, the at least two second distances and a preset condition, whether the terminal point exists in the point set or not; According to the judgment result, a terminal point coordinate is obtained by acquiring a target point meeting the preset condition or acquiring a midpoint of adjacent target points.
[0009] Optionally, in the case that the target trajectory curve to be arranged is one, all the graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinate and the terminal point coordinate, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: The first boundary midpoint of the circumscribed rectangular frame is placed on the starting point coordinate of the target trajectory curve to be arranged, and all the graphic elements are translated to the target trajectory curve to be arranged, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, wherein the terminal point coordinate of a previous graphic element in adjacent two graphic elements is the starting point coordinate of a subsequent graphic element.
[0010] Optionally, in the case that the target trajectory curve to be arranged is more than one, all the graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinate and the terminal point coordinate, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: A boundary line between every two target trajectory curves to be arranged is acquired. The first boundary midpoint of the circumscribed rectangular frame is aligned with the starting point coordinate of the boundary line, and all the graphic elements are translated to the boundary line, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, wherein the terminal point coordinate of a previous graphic element in adjacent two graphic elements is the starting point coordinate of a subsequent graphic element.
[0011] Optionally, a rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark is determined, comprising: A vertical condition of the at least one graphic element occupying a target trajectory curve to be arranged range on the intermediate graphic security mark is judged to obtain a vertical result. According to the vertical result, the rotation angle is determined.
[0012] The embodiment of the present application further provides a device for generating a security mark, comprising: An acquisition module is configured to acquire a graphic to be arranged and a trajectory curve to be arranged. A processing module is configured to obtain at least one graphic element and at least one circumscribed rectangular frame according to the graphic to be arranged, translate the at least one graphic element to the trajectory curve to be arranged according to the at least one circumscribed rectangular frame to obtain an intermediate graphic security mark, and determine a rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark. A generating module is configured to rotate at least one graphical element on the intermediate graphical anti-counterfeit mark according to the rotation angle to generate a graphical anti-counterfeit mark.
[0013] The embodiment of the present application also provides a computer readable storage medium, which stores instructions, and when the instructions are executed on a computer, the computer executes the above method.
[0014] The technical scheme of the present application at least has the following effects: The above scheme of the present application obtains a to-be-arranged graph and a to-be-arranged trajectory curve, obtains at least one graphical element and at least one circumscribed rectangular frame according to the to-be-arranged graph, translates the at least one graphical element to the to-be-arranged trajectory curve according to the at least one circumscribed rectangular frame to obtain an intermediate graphical anti-counterfeit mark, determines a rotation angle of the at least one graphical element when the at least one graphical element is arranged on the intermediate graphical anti-counterfeit mark, and rotates the at least one graphical element on the intermediate graphical anti-counterfeit mark according to the rotation angle to generate a graphical anti-counterfeit mark. The generation of the anti-counterfeit mark can provide graphical anti-counterfeiting on various trajectory curves, and the arrangement mode of the graph on the trajectory curve is diversified. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 is a flowchart of the generation method of the anti-counterfeit mark provided by the embodiment of the present application; Figure 2 is a schematic diagram of a straight line segment to-be-arranged trajectory curve provided by the embodiment of the present application; Figure 3 is a schematic diagram of a curve segment to-be-arranged trajectory curve provided by the embodiment of the present application; Figure 4 is a schematic diagram of a to-be-arranged graph provided by the embodiment of the present application; Figure 5 is a schematic diagram of a single target to-be-arranged trajectory curve provided by the embodiment of the present application; Figure 6 is an effect diagram of a graphical anti-counterfeit mark formed by a single target to-be-arranged trajectory curve provided by the embodiment of the present application; Figure 7 is a schematic diagram of two parallel target to-be-arranged trajectory curves and a boundary line provided by the embodiment of the present application; Figure 8 is an effect diagram of a graphical anti-counterfeit mark formed by two parallel target to-be-arranged trajectory curves provided by the embodiment of the present application; Figure 9 is a schematic diagram of multiple parallel target to-be-arranged trajectory curves provided by the embodiment of the present application; Figure 10 is an effect diagram of a graphical anti-counterfeit mark formed by multiple parallel target to-be-arranged trajectory curves provided by the embodiment of the present application; Figure 11 is a schematic diagram of a plurality of non-parallel target trajectory curves to be arranged provided by an embodiment of the present application; Figure 12 is an effect diagram of a graphical anti-counterfeiting mark formed by a plurality of non-parallel target trajectory curves provided by an embodiment of the present application; Figure 13 is a structural diagram of a generation device of an anti-counterfeiting mark provided by an embodiment of the present application. DETAILED DESCRIPTION
[0016] Exemplary embodiments of the present application will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present application can be more thoroughly understood and so that the scope of the present application can be completely conveyed to those skilled in the art.
[0017] As shown in Figure 1 , an embodiment of the present application proposes a generation method of an anti-counterfeiting mark, comprising: Step 11, obtaining a to-be-arranged graph and a to-be-arranged trajectory curve; Step 12, obtaining at least one graphical element and at least one circumscribed rectangular frame according to the to-be-arranged graph; Step 13, translating the at least one graphical element to the to-be-arranged trajectory curve according to the at least one circumscribed rectangular frame to obtain an intermediate graphical anti-counterfeiting mark; Step 14, determining a rotation angle of the at least one graphical element when arranged on the intermediate graphical anti-counterfeiting mark; Step 15, rotating the at least one graphical element on the intermediate graphical anti-counterfeiting mark according to the rotation angle to generate a graphical anti-counterfeiting mark.
[0018] In this embodiment, in step 11, the to-be-arranged graph is a vector graph arrangement object composed of a group of character rotation outline curves and / or graphical elements such as graphical elements, and the to-be-arranged graph has at least one graphical element; the to-be-arranged trajectory curve is a vector graph trajectory curve object composed of one target to-be-arranged trajectory curve or a plurality of target to-be-arranged trajectory curves, and each target to-be-arranged trajectory curve is composed of a series of straight line segments and / or a series of three cubic Bezier curve segments connected end to end.
[0019] In step 12, each element in the graphic to be arranged is extracted and separated as a single graphic element. Each graphic element has a minimum bounding rectangle whose width and height are the same as the width and height of the graphic element. The graphic to be arranged is then arranged on the trajectory curve to be arranged, which essentially means that each graphic element is arranged on the trajectory curve to be arranged.
[0020] In step 13, each graphic element is translated onto the trajectory curve to be arranged, resulting in a curve with graphic elements, which is the intermediate graphic anti-counterfeiting mark. During translation, the midpoint of the first boundary of the smallest bounding rectangle of each graphic element needs to coincide with the starting point on the target trajectory curve to be arranged. The first boundary is the left side of the smallest bounding rectangle. For a target trajectory curve to be arranged, the starting point of the first graphic element to be arranged onto the trajectory curve is the coordinate of the left endpoint of the entire target trajectory curve. The ending point calculated based on this starting point is the starting point of the second graphic element to be arranged onto the trajectory curve, and so on, to obtain the starting points of each graphic element to be arranged onto the trajectory curve.
[0021] In step 14, it is necessary to determine the vertical position of the current graphic element within the range of the target band's arrangement curve, thereby obtaining the angle by which the graphic element should rotate along the curve within this range. Since the target band's arrangement curve consists of straight line segments and curved segments, it is also necessary to classify and discuss the straight line segments and curved segments separately.
[0022] In step 15, the graphic element is rotated according to the rotation angle obtained in step 14 to generate a graphic anti-counterfeiting mark that rotates along the curve direction.
[0023] This technical solution arranges the graphics to be arranged along the trajectory curve according to specific rules, and then performs graphic modulation operations on this basis to achieve anti-counterfeiting of graphics on various trajectory curves. It can also provide more complex and diverse graphic arrangement pattern effects, and the computational complexity is reduced by optimizing the algorithm, thereby improving the calculation speed.
[0024] like Figure 4 As shown, in an optional embodiment of the present invention, step 12, obtaining at least one graphic element and at least one circumscribed rectangle based on the graphic to be arranged, may include: Step 121: Extract the graphic to be arranged to obtain at least one graphic element; Step 122: Use the width and height of the at least one graphic element as the width and height of its circumscribed rectangle, respectively, to form at least one circumscribed rectangle.
[0025] In this embodiment, the to-be-arranged pattern is a set of graphic elements, which can be a free design graphic or a contour curve graphic obtained by converting a text into a curve, and a graphic element currently needed to be arranged on a to-be-arranged trajectory curve is extracted from the to-be-arranged pattern. Figure 4 As shown in FIG. 8, the to-be-arranged pattern is a graphic composed of ABCD As shown in FIG. 8, the to-be-arranged pattern is a graphic composed of ABCD As shown in FIG. 8, the to-be-arranged pattern is a graphic composed of ABCD
[0026] In an optional embodiment of the present application, in step 13, the at least one graphic element is translated to the to-be-arranged trajectory curve according to the at least one circumscribed rectangle to obtain an intermediate graphic anti-counterfeiting mark, which can include the following steps. In step 131, the end point coordinates are obtained according to the at least one circumscribed rectangle and the start point coordinates of the at least one graphic element. In step 132, all the graphic elements are evenly arranged on the to-be-arranged trajectory curve according to the start point coordinates and the end point coordinates, and all the circumscribed rectangles are connected in a head-to-tail manner to obtain the intermediate graphic anti-counterfeiting mark. The to-be-arranged trajectory curve includes at least one target to-be-arranged trajectory curve.
[0027] In step 131, the start point coordinates are the start point coordinates of each graphic element, and the end point coordinates are the end point coordinates of each graphic element, which can be obtained according to the minimum circumscribed rectangle and the start point coordinates of the graphic element. The to-be-arranged trajectory curve includes at least one target to-be-arranged trajectory curve, when the target to-be-arranged trajectory curve is one, the left end point coordinates on the target to-be-arranged trajectory curve are the start point coordinates of the first graphic element to be placed on the to-be-arranged trajectory curve. When the target to-be-arranged trajectory curve is more than one, the left end point coordinates of the boundary between each two target to-be-arranged trajectory curves are the start point coordinates of the first graphic element to be placed on the to-be-arranged trajectory curve. Since each graphic element on the trajectory curve to be arranged is connected end to end, the coordinates of the end point of the first graphic element are the coordinates of the starting point of the second graphic element to be placed on the trajectory curve, and so on, so that the coordinates of the starting point and the ending point of all graphic elements can be obtained.
[0028] In step 132, during translation, it is only necessary to determine the position of the graphic element and a point on the trajectory curve to be arranged to obtain the translated intermediate graphic anti-counterfeiting mark. Therefore, when the midpoint of the first boundary of the smallest bounding rectangle of the graphic element coincides with the starting point, the position of the entire graphic element on the trajectory curve to be arranged can be determined. Each graphic element is translated onto the trajectory curve to be arranged so that the bounding rectangles of all graphic elements are connected end to end, thus obtaining the intermediate graphic anti-counterfeiting mark. At this time, the center positions of the bounding rectangles of all graphic elements are evenly arranged on the trajectory curve to be arranged.
[0029] In an optional embodiment of the present invention, step 131, obtaining the end point coordinates based on the at least one circumscribed rectangle and the starting point coordinates, includes: Step 1311: When the trajectory curve to be arranged is a straight line segment, the coordinates of the end point are obtained based on the at least one circumscribed rectangle and the coordinates of the starting point. Step 1312: When the trajectory curve to be arranged is a curve segment, the coordinates of the termination point are obtained based on the at least one circumscribed rectangle and the coordinates of the starting point.
[0030] In this embodiment, the process of obtaining the coordinates of the termination point is classified and discussed according to the straightness or curvature of the line segment currently being processed by the trajectory curve to be arranged. In step 1311, the case where the currently processed line segment is a straight line segment is discussed; in step 1312, the case where the currently processed line segment is a cubic Bézier curve segment is discussed.
[0031] like Figure 2 As shown, in an optional embodiment of the present invention, in step 1311, when the trajectory curve to be arranged is a straight line segment, the straight line segment here is as follows: Figure 2 The line segment p1p2 shown is used to obtain the coordinates of the ending point based on the at least one circumscribed rectangle and the coordinates of the starting point, including: Step 13111: Obtain the endpoint coordinates based on the trajectory curve to be arranged; Step 13112: Obtain the first vector based on the endpoint coordinates; Step 13113: Obtain the coordinates of the termination point based on the first vector, the at least one circumscribed rectangle, and the coordinates of the starting point.
[0032] In this embodiment, in step 13111, the current processed line segment is a straight line segment, and the end point coordinates of the two ends of the straight line segment can be obtained according to the straight line segment, that is, a first end point coordinate and a second end point coordinate .
[0033] In step 13112, according to the first end point coordinate and the second end point coordinate , a first vector from the first end point to the second end point can be obtained by ; wherein, and are the horizontal and vertical coordinates of the first end point and the second end point, respectively; and represent the horizontal and vertical components of the first vector, respectively, represents the distance between the first end point and the second end point; In step 13113, according to , the termination point coordinate of the current graphic element is obtained; wherein, denotes the starting point, and the starting point coordinate is ; L is the width of the current graphic element, which is also the width of the minimum circumscribed rectangle frame; denotes the obtained termination point, and the termination point coordinate is .
[0034] As shown in Figure 3 , in an optional embodiment of the present application, in step 1312, when the trajectory curve to be arranged is a curve segment, such as the curve segment p3p6 as shown in Figure 3 , the termination point coordinate is obtained according to the at least one circumscribed rectangle frame and the starting point coordinate, including: Step 13121, obtaining a target matrix of the curve segment according to the trajectory curve to be arranged; Step 13122, obtaining a first distance according to the trajectory curve to be arranged, the at least one circumscribed rectangle frame, the target matrix, and the starting point coordinate; Step 13123, uniformly dividing the trajectory curve to be arranged to obtain at least two intermediate curve segments; Step 13124, selecting a target point on each of the at least two intermediate curve segments to form a point set with at least two target points; Step 13125, determining at least two second distances between the target points in the point set and the starting point according to the at least two intermediate curve segments, the point set, the target matrix, and the starting point coordinate; Step 13126, judging the existence result of the termination point in the point set according to the first distance, the at least two second distances, and the preset condition. Step 13127, according to the existence result, the target point meeting the preset condition is obtained or the midpoint of the adjacent target point is obtained, and the terminal point coordinates are obtained.
[0035] In this embodiment, in step 13121, the current processed line segment can be a cubic Bezier curve segment, and according to the curve segment, two end points and two control points on the curve segment can be obtained, that is, the third end point coordinates and the sixth end point coordinates , the fourth control point coordinates and the fifth control point coordinates ; according to the end points and control points, the target matrix, that is, the Bezier matrix , can be obtained by ; wherein, respectively, are the horizontal and vertical coordinates of the third end point, the fourth control point, the fifth control point and the sixth end point. respectively, are an element in the Bezier matrix.
[0036] In step 13122, according to the current curve segment, a first proportional relationship can be obtained; according to the first proportional relationship and the Bezier matrix, a first proportional function and a second proportional function are obtained by , the curvature is obtained by substituting the first proportional function and the second proportional function into ; according to the curvature and the width of the minimum circumscribed rectangle, a first distance is obtained by , the first distance being the straight line distance between the starting point and the terminal point of the graphic element on the curve segment; wherein, is the first proportional relationship, which can be obtained by dividing the length from the third end point to a point on the curve segment by the length from the third end point to the sixth end point, when the point on the curve segment is the third end point, that is, t=0. is the first proportional function, which can also be expressed as ; is the second proportional function, which can also be expressed as ; C is the curvature; L is the width of the minimum circumscribed rectangle. is the first distance, that is, the straight line distance between the starting point and the terminal point of the graphic element.
[0037] In steps 13123 and 13124, the to-be-arranged trajectory curve is uniformly divided into segments, and middle curve segments are obtained; a target point is selected on each middle curve segment (the left end point of the middle curve segment is selected), and a point set with n target points is constructed.
[0038] In step 13125, based on the t value of each target point in the point set, by... This yields the coordinates of the target point on each intermediate curve segment. ( ), sequentially obtain the coordinates of all target points in the point set; based on the target point coordinates and the starting point coordinates, through The second distance is determined; wherein, t is the first proportional relationship; It is the x-coordinate of the target point. It is the ordinate of the target point; It is the target point; ( ) indicates finding the straight-line distance between two points; It is the starting point; It is the distance between the target point and the starting point, i.e., the second distance.
[0039] In steps 13126 and 13127, the second distance and the first distance are determined based on whether they satisfy the following conditions: The existence of a termination point in the point set is determined. If there exists a target point in the point set whose second distance satisfies the first distance, then a termination point exists in the point set, and the target point satisfying the condition is the desired termination point. The termination point is thus obtained. Coordinates; otherwise, there is no endpoint in the point set, that is, there is no target point in the point set that satisfies this judgment condition. In this case, it is necessary to find two adjacent points in the point set that satisfy the condition. At this point, there is a first point between two adjacent points. Based on the second and third proportional relationships corresponding to the two points, through... The fourth proportional relationship of the first point is obtained, and the fourth proportional relationship is substituted into... Obtain the coordinates of the first point. ( If the first point is satisfied If the first point's coordinates are true, then the coordinates of the first point are the coordinates of the desired termination point; otherwise... We continue searching for the termination point in two cases: when the condition is met... < This indicates that the second point that satisfies the condition is located at... and In between, at this time through Take the median value of the coefficients to obtain the coordinates of the second point; when the condition is satisfied... > This indicates that the second point that satisfies the condition is located at... and In between, at this time through Taking the coefficient median value, the second point coordinate is obtained; the obtained second point is used to continue the same distance judgment until a point meeting the condition is found, and the found point meeting the condition is the terminal point. is the starting point; is the terminal point; is the first distance; is the second distance; is a very small positive real number, for example, is taken as ; () represents the straight-line distance between two points; is the fourth proportional relationship; and are two adjacent target points; is the first point coordinate; is the fifth proportional relationship.
[0040] In an optional embodiment of the present application, in step 132, all graphic elements are uniformly arranged on the to-be-arranged trajectory curve according to the starting point coordinate and the terminal point coordinate, and all circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic anti-counterfeiting mark, comprising: In step 1321, in the case where the target to-be-arranged trajectory curve is one, all graphic elements are uniformly arranged on the to-be-arranged trajectory curve according to the starting point coordinate and the terminal point coordinate, and all circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic anti-counterfeiting mark.
[0041] In step 1322, in the case where the target to-be-arranged trajectory curve is more than two, all graphic elements are uniformly arranged on the to-be-arranged trajectory curve according to the starting point coordinate and the terminal point coordinate, and all circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic anti-counterfeiting mark.
[0042] In this embodiment, the case where the target to-be-arranged trajectory curve is one and the case where the target to-be-arranged trajectory curve is more than two are classified and described respectively, and the graphic elements are translated and arranged on the to-be-arranged trajectory curve according to the starting point coordinate and the terminal point coordinate to obtain an intermediate graphic anti-counterfeiting mark. For a graphic element, the left midpoint of the minimum circumscribed rectangular frame of the graphic element is placed at the starting point coordinate to complete the translation process.
[0043] As shown in Figure 5 In an optional embodiment of the present application, in step 1321, in the case where the target to-be-arranged trajectory curve is one, all graphic elements are uniformly arranged on the to-be-arranged trajectory curve according to the starting point coordinate and the terminal point coordinate, and all circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic anti-counterfeiting mark, comprising: Step 13211, the whole graphic element is translated to the target trajectory curve to be arranged by placing the first boundary midpoint of the circumscribed rectangle on the starting point coordinate of the target trajectory curve to be arranged, and all the circumscribed rectangles are connected in a loop to obtain an intermediate graphic anti-counterfeit mark; the terminal point coordinate of the previous graphic element is the starting point coordinate of the next graphic element.
[0044] In this embodiment, the target trajectory curve to be arranged in the trajectory curve to be arranged is one, and the graphic element is translated to the target trajectory curve to be arranged according to the starting point position on the target trajectory curve to be arranged to obtain an intermediate graphic anti-counterfeit mark.
[0045] As shown in Figure 9 and Figure 11 In an optional embodiment of the present application, in step 1322, when the target trajectory curve to be arranged is more than two, all the graphic elements are arranged on the trajectory curve to be arranged according to the starting point coordinate and the terminal point coordinate, and all the circumscribed rectangles are connected in a loop to obtain an intermediate graphic anti-counterfeit mark, which includes: Step 13221, the boundary line between every two target trajectory curves to be arranged is obtained; Step 13222, the whole graphic element is translated to the boundary line by placing the first boundary midpoint of the circumscribed rectangle on the starting point coordinate of the boundary line, and all the circumscribed rectangles are connected in a loop to obtain an intermediate graphic anti-counterfeit mark; the terminal point coordinate of the previous graphic element is the starting point coordinate of the next graphic element.
[0046] In this embodiment, since there are more than two target trajectory curves to be arranged in the trajectory curve to be arranged, the adjacent two target trajectory curves to be arranged are needed, there is a boundary line between every two target trajectory curves to be arranged, the boundary line can be a middle line obtained by an interpolation algorithm of the two target trajectory curves to be arranged, or can be a specified line. At this time, the graphic element is translated to the target trajectory curve to be arranged according to the starting point position on the boundary line to obtain an intermediate graphic anti-counterfeit mark.
[0047] In an optional embodiment of the present application, in step 14, the rotation angle of the at least one graphic element arranged on the intermediate graphic anti-counterfeit mark can include: Step 141, the vertical condition of the at least one graphic element occupying the target trajectory curve to be arranged on the intermediate graphic anti-counterfeit mark is judged to obtain a vertical result; Step 142, the rotation angle is determined according to the vertical result.
[0048] In the embodiment, when the target trajectory curve to be arranged in the current processing is a straight line segment, two cases are processed: if the horizontal coordinates of the two end points of the straight line segment are equal at this time, it represents that the straight line segment is perpendicular to the x-axis at this time, and the rotation angle of the graphic element is ; if the horizontal coordinates of the two end points of the straight line segment are not equal at this time, the rotation angle of the graphic element is obtained according to the two end points of the straight line segment, that is, When the target trajectory curve to be arranged in the current processing is a curve segment, the second vector is obtained through At this time, two cases are processed: when =0, it represents that the curve segment is perpendicular to the x-axis at this time, and the rotation angle of the graphic element is ; when , the rotation angle of the graphic element is . Wherein, the is the rotation angle; and are the two end points of the straight line segment; , , , are the horizontal coordinates and the vertical coordinates of the two end points; is the second vector; and are the components of the second vector on the x-axis and the y-axis.
[0049] In an optional embodiment of the present application, in step 15, the rotation operation is performed on the at least one graphic element on the intermediate graphic security mark according to the rotation angle, and the graphic security mark is generated, which can include: In step 151, the graphic element is rotated according to the rotation angle to generate the graphic security mark.
[0050] In the embodiment, if the graphic elements are arranged along the curve, the graphic security mark is obtained by directly rotating the graphic elements after obtaining the rotation angle; if the graphic elements are arranged along the curve interval, the first scaling coefficient and the second scaling coefficient are calculated through the rotation angle after obtaining the rotation angle, and then the graphic elements are scaled and rotated according to the rotation angle.
[0051] As shown in Figure 7 and Figure 8 , in an optional embodiment of the present application, the generation method of the security mark further includes: In step 16, when the target trajectory curve to be arranged is more than two, the graphic elements between every two target trajectory curves to be arranged need to fill the upper and lower curves (excluding the line width area), and at this time, the center point of the graphic element falls on the boundary line between the two curves Above; at this point, the graphic element needs to be scaled according to the scaling ratio before rotation. The specific process for obtaining the scaling ratio of the graphic element is as follows: Based on the central axis of the smallest bounding rectangle of the rotated graphic element and the two target trajectory curves to be arranged, the first intersection point and the second intersection point are obtained: if the currently processed first target trajectory curve If it is a straight line segment, then the equation of the straight line is rearranged as follows: ; Compare the equation of the straight line with the equation of the central axis Solve the system of equations simultaneously; if the system of equations has a root and that root lies between the two endpoints of the straight line, then that root is the first intersection point; otherwise, the central axis does not intersect the straight line segment. If the first target trajectory curve to be arranged is a cubic Bézier curve segment, then construct the coefficients using the Bézier matrix and the central axis equation. When the central axis intersects the curve segment, the proportional relationship at the intersection point is: The root of the equation is found when the equation has a solution and the solution is a positive real number less than 1, indicating that the central axis intersects the curve segment; by substituting all the real solutions that satisfy the condition into... This yields a set of all intersection points between the central axis and the curve segment. The point in this set closest to the center of the smallest rectangle is taken as the first intersection point. Similarly, the intersection points between the central axis and the second target trajectory curve are obtained. The second point of intersection. According to This yields the first scaling factor and the second scaling factor. It is the equation of the central axis; It is the equation of a straight line; These are the construction coefficients; Each of these is an element in the Bessel matrix; Here is the x-coordinate of the point we are looking for; Let be the ordinate of the point to be found; t is the solution to the equation. This is the first scaling factor; This is the second scaling factor; It is the first intersection point; It is the second intersection point; It is the center point of the smallest bounding rectangle of the graphic element; It is the height of the smallest bounding rectangle.
[0052] The specific process of scaling is as follows: For each point on the arranged graphic object, first translate it to... point; Then the x-axis remains unchanged, and the y-axis is multiplied by the corresponding scaling factor; Finally, the scaled point is translated to the original center point, that is, for any point on the arranged graphic object. The transformed point coordinates It is possible get.
[0053] Finally, the scaled object is rotated, and each graphic element is processed in the same way to fill the area between the first and second target trajectory curves to be arranged. The coordinates of the point before scaling; These are the scaled point coordinates; It is the ordinate of the center point; It is either the first scaling factor or the second scaling factor.
[0054] like Figure 6 As shown, a specific embodiment of the method provided by this invention is as follows: the process of translating a graphic element onto a trajectory curve to generate a graphic anti-counterfeiting mark includes: Obtain the left and right boundary points of all elements to be arranged on a complete trajectory curve object, translate the curve object to be arranged to the corresponding position on the trajectory curve object, and perform modulation operations through geometric transformation to obtain the final graphic arrangement effect.
[0055] Specifically, given a set of graphic elements to be arranged ,…, And a trajectory curve object P, and take one graphic object to be arranged from the set S. The detailed element arrangement process is as follows: Step 1: The left boundary of the previous element The right boundary of the path coincides with the left boundary of the path P, and the intersection of the left boundary and the path P is set as... Step 131 can be used to obtain The intersection of the right boundary and path P , will object The midpoint of the left boundary is translated to the same point as... coincide; Step 2: After translation by Rotation transformation is performed with point as the center, and the rotation angle is... The size is equal to the curve located at The arctangent of the slope of the tangent line is calculated as follows: 1) When When it is a straight line segment located in path P, such as Figure 2 As shown, if at this time , The rotation angle is ; if the rotation angle of .
[0056] 2) When is a segment of a Bezier curve segment in path P, as shown in Figure 3 , let the ratio of the curve length from to to the curve length from to , at this time the tangent vector of the curve at is obtained by .
[0057] When is equal to 0, the rotation angle of ; otherwise, the rotation angle of .
[0058] Step3: Take all permutation curve objects from set S in turn Arrange on the trajectory curve object until the entire trajectory curve is arranged, achieving the effect as shown in Figure 6 , Figure 4 is the curve object element to be arranged, that is, the graph to be arranged, which includes four English letters and two Chinese character outline curve objects after conversion, as well as a five-pointed star graphic object drawn; Figure 5 is a trajectory curve object composed of a sine curve, and the final curve arrangement result is shown in Figure 6 .
[0059] Example 2, by further expanding the trajectory curve object, a more complex graphic object arrangement effect can be achieved.
[0060] For example, given two or more trajectory curve objects arranged in parallel, the distance between each adjacent two curves is the same. Each curve has a certain line width, and in this example, the arrangement graphic object is filled and arranged in the blank area between each adjacent two parallel curves (excluding the line width area), which is called curve distance arrangement of arrangement graphic object.
[0061] As shown in Figure 7 , Figure 7 are two trajectory curve objects arranged in parallel, the black area is the line width area of each curve, is the lower boundary curve of the line width of the upper trajectory curve object, is the boundary between the upper and lower two curves, is the upper boundary curve of the line width of the lower trajectory curve object. Figure 8To arrange graphic object "a" along the trajectory curve object The uniform arrangement effect. The above extension can be simply understood as: given three parallel trajectory curves arranged vertically. , and Let each arranged curve object follow the trajectory curve While arranging the elements, perform geometric transformations (scaling and rotation) sequentially until the surface is completely covered. and The blank area between.
[0062] For ease of description, let's assume there are only two parallel trajectory curve objects. and For the current object Let the height of the minimum bounding rectangle be... The rotation angle is The central axis after rotation (i.e., the axis of symmetry of the circumscribed rectangle) is The center point after rotation is Calculate separately and and The intersection point, based on the intersection point and Determining the straight-line distance from the midpoint The scaling factor should be specified, and finally, the scaled curve object is rotated. The specific implementation method is as follows: Step 1: Arrange the graphics according to the method described in Example 1 The left boundary point is translated to On Point.
[0063] Step 2: Calculate the central axis after rotation and... and The intersection of the two curves. Let... The angle to be rotated is The rotated shaft It can be written as an equation in the following form: Calculate the straight line and the curve respectively. and The intersection point. It is necessary to calculate whether each line segment intersects with the first line segment. There are intersections, until a match is found. The line segments that intersect at a point are considered complete. Here, we will introduce them separately according to the different types of line segments: (1) The line segment being processed is as follows: Figure 2 When dealing with a straight line segment as shown, rearrange the equation of the line into the following form: The linear method, combined If the system of two equations relating a line segment has a root, then... , and point is between point , then it is determined that intersects with the straight line segment at point , otherwise does not exist intersection point with the straight line segment .
[0064] (2) When the current processing line segment is a cubic Bezier curve segment as shown in Figure 3 , the coefficients are constructed by the equation of the Bezier matrix and the symmetry axis : , When exists intersection point with the curve segment, the proportional coefficient t at the intersection point is the root of .
[0065] Therefore, when the equation has a solution and the obtained solution is a positive real number less than 1, it is determined that the symmetry axis exists intersection point with the curve segment. All real number solutions that meet the conditions are substituted into , to obtain the set of all intersection points of and the curve segment, and the point in the point set closest to the center point is taken as the intersection point of the symmetry axis and the curve.
[0066] Step 3: According to the proportional relationship of the distance between the intersection point and the center point of the arranged graphic object, the arranged graphic object is scaled and rotated.
[0067] For the current object , let the intersection point of its symmetry axis and the upper end curve be , and the intersection point of its lower end curve be , and respectively obtain the scaling proportional coefficients of the upper half and the lower half of : The object is scaled before being rotated, and the processing manner is that, for each point on the arranged graphic object, it is first translated to the (0, 0) point; then the horizontal coordinate is kept unchanged, and the vertical coordinate is multiplied by the corresponding proportional coefficient; finally, the scaled point is translated to the original center point. That is, for any point on the arranged graphic object, the coordinates of the transformed point can be obtained by ; wherein, for the point on the upper half of the arranged graphic object, the value of the upper half is and the value of the lower half is Finally, the scaled object is rotated, and the same processing is performed on each arrangement pattern object to make the arranged pattern object fill the area between the two curves. and .
[0068] Based on the above method, more complex pattern objects along the curve arrangement effect can be achieved. For example, Figure 9 is a parallel arrangement of trajectory curve groups, and Figure 10 is the arrangement of pattern objects along the curve spacing arrangement effect.
[0069] For example, given two or more trajectory curve objects arranged in the upper and lower directions, the distance between each adjacent two curves can be different. The specific processing method is as follows: first, the middle line (a kind of boundary line) obtained by the interpolation algorithm of the corresponding points between the two curves is taken as the trajectory pattern object; then, the intersection points of the left boundary and the right boundary with the upper trajectory curve object are calculated; then, a curved quadrilateral is constructed by the two middle axes and the upper and lower boundary curve segments; finally, the pattern object is subjected to a bilinear transformation to realize pattern distortion, that is, the curve arrangement with unequal spacing is realized. For example, Figure 11 is a trajectory curve group arranged in the upper direction with unequal spacing, Figure 12 is the pattern object arranged along the curve obtained by the method described in Embodiment 2.
[0070] The pattern anti-counterfeiting marker generation method provided by the present application is given a vector pattern arrangement object and a trajectory curve object, and the minimum circumscribed rectangular frame of each to-be-arranged object is calculated; the starting point and the ending point coordinates of the trajectory curve object are determined to obtain all specific arrangement point positions of the arrangement object on the trajectory curve object; the arrangement object is translated to the corresponding arrangement point position on the trajectory curve, and the arrangement object is subjected to a modulation operation to generate a pattern arrangement effect. The vector pattern arrangement object is arranged along the vector pattern trajectory curve according to a specific rule, and a pattern modulation operation is performed on the basis thereof, so that a more complex and diverse pattern arrangement pattern effect can be realized, and the calculation speed is fast. By giving a to-be-arranged pattern and a to-be-arranged trajectory curve, a pattern anti-counterfeiting marker is obtained, the algorithm of the pattern anti-counterfeiting marker is optimized, the operation complexity is reduced, the calculation speed is improved, and more diverse pattern arrangement modes than traditional anti-counterfeiting markers are provided.
[0071] As shown in Figure 13 , the present application also provides a generation device 130 of an anti-counterfeiting marker, comprising: an acquisition module 1301 configured to acquire a to-be-arranged pattern and a to-be-arranged trajectory curve; The processing module 1302 is configured to obtain at least one graphic element and at least one circumscribed rectangular frame according to the graphic to be arranged; and perform translation on the at least one graphic element according to the at least one circumscribed rectangular frame, to obtain an intermediate graphic security mark on the trajectory curve to be arranged. The generating module 1303 is configured to perform rotation on the at least one graphic element on the intermediate graphic security mark according to the rotation angle, to generate a graphic security mark.
[0072] Optionally, the processing module 1302 is specifically configured to: perform element extraction on the graphic to be arranged, to obtain at least one graphic element; take the width and the height of the at least one graphic element as the width and the height of the circumscribed rectangular frame respectively, to form at least one circumscribed rectangular frame.
[0073] Optionally, the translation of the at least one graphic element according to the at least one circumscribed rectangular frame, to obtain an intermediate graphic security mark on the trajectory curve to be arranged, comprises: obtaining terminal point coordinates according to the at least one circumscribed rectangular frame and starting point coordinates of the at least one graphic element; performing uniform arrangement of all the graphic elements on the trajectory curve to be arranged according to the starting point coordinates and the terminal point coordinates, and connecting all the circumscribed rectangular frames end to end, to obtain the intermediate graphic security mark.
[0074] Optionally, when the trajectory curve to be arranged is a straight line segment, the obtaining of the terminal point coordinates according to the at least one circumscribed rectangular frame and the starting point coordinates comprises: obtaining endpoint coordinates of the straight line segment according to the trajectory curve to be arranged; obtaining a first vector according to the endpoint coordinates; obtaining the terminal point coordinates according to the first vector, the at least one circumscribed rectangular frame and the starting point coordinates of the at least one graphic element.
[0075] Optionally, when the trajectory curve to be arranged is a curve segment, the obtaining of the terminal point coordinates according to the at least one circumscribed rectangular frame and the starting point coordinates comprises: obtaining a target matrix of the curve segment according to the trajectory curve to be arranged; obtaining a first distance according to the trajectory curve to be arranged, the at least one circumscribed rectangular frame, the target matrix and the starting point coordinates; performing uniform segmentation on the trajectory curve to be arranged, to obtain at least two intermediate curve segments; selecting one target point on each of the at least two intermediate curve segments to form a point set with at least two target points; determining at least two second distances between the target points in the point set and the starting point according to the at least two intermediate curve segments, the point set, the target matrix and the starting point coordinates; judging a judgment result of whether the ending point exists in the point set according to the first distance, the at least two second distances and a preset condition; obtaining the ending point coordinates by acquiring the target point satisfying the preset condition or acquiring a midpoint of adjacent target points according to the judgment result.
[0076] Optionally, in the case that the target trajectory curve to be arranged is one, all the graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinates and the ending point coordinates, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: the first boundary midpoint of the circumscribed rectangular frame is placed on the starting point coordinates of the target trajectory curve to be arranged, all the graphic elements are translated to the target trajectory curve to be arranged, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain the intermediate graphic security mark; wherein the ending point coordinates of a previous graphic element in adjacent two graphic elements are the starting point coordinates of a subsequent graphic element.
[0077] Optionally, in the case that the target trajectory curve to be arranged is more than two, all the graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinates and the ending point coordinates, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: obtaining a boundary line between every two target trajectory curves to be arranged; the first boundary midpoint of the circumscribed rectangular frame is aligned with the starting point coordinates of the boundary line, all the graphic elements are translated to the boundary line, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain the intermediate graphic security mark; wherein the ending point coordinates of a previous graphic element in adjacent two graphic elements are the starting point coordinates of a subsequent graphic element.
[0078] Optionally, a rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark is determined, comprising: judging a vertical condition of the at least one graphic element occupying a target trajectory curve range on the intermediate graphic security mark to obtain a vertical result; determining the rotation angle according to the vertical result.
[0079] It should be noted that the apparatus corresponds to the method described above, and all implementation manners in the method embodiments are applicable to this embodiment, and the same technical effects can be achieved.
[0080] Those skilled in the art can understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, apparatus and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0082] In the embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, apparatus or unit, which can be electrical, mechanical or other forms.
[0083] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0084] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.
[0085] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various program code storage media.
[0086] In addition, it should be noted that in the device and method of the present application, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. Moreover, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not necessarily have to be executed in time sequence. Some steps can be executed in parallel or independently of each other. It can be understood by those skilled in the art that all or any steps or components of the method and device of the present application can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or network of computing devices, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present application.
[0087] Therefore, the object of the present application can also be achieved by running a program or a set of programs on any computing device. The computing device can be a commonly known general-purpose device. Therefore, the object of the present application can also be achieved by providing a program product containing program code for implementing the method or device. That is, such a program product also constitutes the present application, and a storage medium storing such a program product also constitutes the present application. Obviously, the storage medium can be any commonly known storage medium or any storage medium developed in the future. It should be noted that in the device and method of the present application, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. Moreover, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not necessarily have to be executed in time sequence. Some steps can be executed in parallel or independently of each other.
[0088] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered within the scope of protection of the present application.
Claims
1. A method for generating a security mark, characterized by, The method comprises the following steps: obtaining a to-be-arranged pattern and a to-be-arranged trajectory curve; obtaining at least one graphic element and at least one circumscribed rectangular frame according to the to-be-arranged pattern; translating the at least one graphic element to the to-be-arranged trajectory curve according to the at least one circumscribed rectangular frame to obtain an intermediate graphic security mark; determining a rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark; rotating the at least one graphic element on the intermediate graphic security mark according to the rotation angle to generate a graphic security mark.
2. The method for generating an anti-counterfeit mark according to claim 1, characterized in that, The method comprises the following steps: obtaining at least one graphic element and at least one circumscribed rectangular frame according to the to-be-arranged pattern, which comprises the following steps: extracting elements from the to-be-arranged pattern to obtain at least one graphic element; 3. The method for generating an anti-counterfeit mark according to claim 1, characterized by, taking the width and height of the at least one graphic element as the width and height of the circumscribed rectangular frame of the at least one graphic element to form at least one circumscribed rectangular frame. translating the at least one graphic element to the to-be-arranged trajectory curve according to the at least one circumscribed rectangular frame to obtain an intermediate graphic security mark, which comprises the following steps: obtaining a termination point coordinate according to a starting point coordinate of the at least one circumscribed rectangular frame and the at least one graphic element; 4. The method for generating an anti-counterfeit mark according to claim 3, characterized in that, arranging all the graphic elements on the to-be-arranged trajectory curve according to the starting point coordinate and the termination point coordinate, and connecting all the circumscribed rectangular frames end to end to obtain an intermediate graphic security mark. When the to-be-arranged trajectory curve is a straight line segment, the method for obtaining a termination point coordinate according to a starting point coordinate of the at least one circumscribed rectangular frame and the at least one graphic element comprises the following steps: obtaining an end point coordinate of the straight line segment according to the to-be-arranged trajectory curve; obtaining a first vector according to the end point coordinate; 5. The method for generating an anti-counterfeit mark according to claim 3, characterized in that, obtaining a termination point coordinate according to the first vector, the starting point coordinate of the at least one circumscribed rectangular frame and the at least one graphic element. When the to-be-arranged trajectory curve is a curve segment, the method for obtaining a termination point coordinate according to a starting point coordinate of the at least one circumscribed rectangular frame and the at least one graphic element comprises the following steps: obtaining a target matrix of the curve segment according to the to-be-arranged trajectory curve; obtaining a first distance according to the to-be-arranged trajectory curve, the at least one circumscribed rectangular frame, the target matrix and the starting point coordinate; uniformly dividing the to-be-arranged trajectory curve to obtain at least two intermediate curve segments; selecting a target point on each of the at least two intermediate curve segments to form a point set with at least two target points; determining at least two second distances between the target points in the point set and the starting point according to the at least two intermediate curve segments, the point set, the target matrix and the starting point coordinate; obtaining a judgment result of whether a termination point exists in the point set according to the first distance, the at least two second distances and a preset condition; obtaining a termination point coordinate by obtaining a target point satisfying the preset condition or obtaining a midpoint of adjacent target points according to the judgment result.
6. The method for generating an anti-counterfeit mark according to claim 3, characterized in that, In the case of one target trajectory curve to be arranged, all graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinates and the ending point coordinates, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: By placing the first boundary midpoint of the circumscribed rectangular frame on the starting point coordinates of the target trajectory curve to be arranged, the total graphic elements are translated on the target trajectory curve to be arranged, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark; wherein the ending point coordinates of the former graphic element in the adjacent two graphic elements are the starting point coordinates of the latter graphic element.
7. The method for generating an anti-counterfeit mark according to claim 3, characterized by, In the case of more than two target trajectory curves to be arranged, all graphic elements are arranged on the target trajectory curve to be arranged according to the starting point coordinates and the ending point coordinates, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark, comprising: Obtaining the boundary line between every two target trajectory curves to be arranged; By aligning the first boundary midpoint of the circumscribed rectangular frame with the starting point coordinates of the boundary line, the total graphic elements are translated on the boundary line, and all the circumscribed rectangular frames are connected in a head-to-tail manner to obtain an intermediate graphic security mark; wherein the ending point coordinates of the former graphic element in the adjacent two graphic elements are the starting point coordinates of the latter graphic element.
8. The method for generating an anti-counterfeit mark according to claim 1, characterized by, Determining the rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark, comprising: Judging the vertical condition of the at least one graphic element occupying the target trajectory curve range on the intermediate graphic security mark to obtain a vertical result; According to the vertical result, the rotation angle is determined.
9. An apparatus for generating an anti-counterfeit mark, characterized by comprising: The generation device of the security mark comprises: An acquisition module for acquiring a graphic to be arranged and a trajectory curve to be arranged; A processing module for obtaining at least one graphic element and at least one circumscribed rectangular frame according to the graphic to be arranged; translating the at least one graphic element on the trajectory curve to be arranged according to the at least one circumscribed rectangular frame to obtain an intermediate graphic security mark; and determining the rotation angle of the at least one graphic element when arranged on the intermediate graphic security mark; A generation module for rotating the at least one graphic element on the intermediate graphic security mark according to the rotation angle to generate a graphic security mark.
10. A computer-readable storage medium, characterized in that, The instructions are stored in a computer, and when the instructions are run on the computer, the computer executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and apparatus for generating safety shading in plate making false prevetion
CN101231758A
Image anti-counterfeiting recognition method applied to bills
CN103729672A
Method and device for generating anti-counterfeiting pattern
CN114529627A
Anti-counterfeiting code, generation method and identification method
CN120579568A
Anti-counterfeit label and Anti-counterfeit label verification method
WO2019170090A1