Digital watermark processing method and device for vector data and electronic equipment
By constructing the outermost convex hull and relative Cartesian coordinate systems in vector data, digital watermark information is embedded in relative coordinates, which solves the problem of insufficient robustness of digital watermarks in the prior art, and effectively resists geometric attacks, vertex attacks and object attacks.
Patent Information
- Application Number
- CN202411612634.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to effectively improve the robustness of digital watermarks when embedding digital watermarks into vector data, especially when facing geometric attacks, vertex attacks and object attacks.
By extracting the vertices of vector elements in vector data, the outermost convex hull of the feature point set is constructed, and a relative Cartesian coordinate system is established based on this, the vertex coordinates are converted into relative coordinates, and finally digital watermark information is embedded in the converted coordinate set.
This method effectively resists the translation and rotation operations of vector elements in geometric attacks, improves the robustness of digital watermarks, and is suitable for application needs of large data volumes.
Smart Images

Figure CN119599855A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital watermark technology, and in particular to a digital watermark processing method, device and electronic equipment for vector data. Background Art
[0002] Vector data is an important data type in the computer field and is widely used in geographic information, engineering construction, graphic design, etc. Among them, vector data contains rich geometric information and attribute information of related entities, which provides sufficient redundant space for constructing robust digital watermarks. In practical applications, copyright information is embedded into vector data as a digital watermark through a specific method, which can be used to declare copyright and trace the source of infringement when vector data infringes.
[0003] For vector data, how to improve the robustness of digital watermarks has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a method, device and electronic device for digital watermark processing of vector data. The relevant technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present application provides a digital watermark processing method for vector data, comprising:
[0006] Extracting vertices of each vector element in the vector data to obtain a vertex set for any vector element;
[0007] Based on the shape features of any one of the vector elements, extracting a feature point set from the vertex set;
[0008] Mapping all feature points in the feature point set to an original coordinate system, and constructing an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points;
[0009] Based on the centroid position of the outermost convex hull, a relative Cartesian coordinate system is established;
[0010] Convert the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system to obtain a converted coordinate set;
[0011] The digital watermark information is embedded into the transformed coordinate set to obtain a target vector element containing the digital watermark information.
[0012] In one possible implementation manner, establishing a relative Cartesian coordinate system based on the centroid position of the outermost convex hull includes:
[0013] Calculating the distance between the center of gravity position and each feature point in the feature point set, and determining the target feature point corresponding to the maximum distance;
[0014] Point the center of gravity position to the direction of the target feature point as the positive direction of the X-axis;
[0015] The perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y axis;
[0016] Taking the center of gravity as the origin, a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis is established.
[0017] In one possible implementation manner, embedding the digital watermark information into the transformed coordinate set to obtain a target vector element containing the digital watermark information includes:
[0018] Performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates;
[0019] Establishing a watermark bit index according to the normalized coordinates, and embedding the digital watermark information into the normalized coordinates to obtain embedded data;
[0020] Performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding;
[0021] The embedded relative coordinates are converted into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
[0022] In one possible implementation manner, after embedding the digital watermark information into the transformed coordinate set to obtain the target vector element containing the digital watermark information, the method further includes:
[0023] Extracting a target vertex set from the target vector element;
[0024] Extracting a target feature point set from the target vertex set based on the shape features of the target vector element;
[0025] Mapping all feature points in the target feature point set to the original coordinate system, and constructing the target outermost convex hull of the target feature point set based on the positional relationship of all feature points in the original coordinate system;
[0026] Establishing a relative Cartesian coordinate system of the target according to the centroid position of the outermost convex hull of the target;
[0027] Convert the coordinates of all vertices in the target vertex set in the original coordinate system into relative coordinates in the target relative Cartesian coordinate system to obtain a converted coordinate set;
[0028] The digital watermark information is extracted from the transformed coordinate set.
[0029] In a second aspect, an embodiment of the present application provides a digital watermark processing device for vector data, comprising:
[0030] A first extraction unit, used to extract vertices of each vector element in the vector data to obtain a vertex set for any vector element;
[0031] A second extraction unit, configured to extract a feature point set from the vertex set based on the shape feature of any one of the vector elements;
[0032] A construction unit, used to map all feature points in the feature point set to an original coordinate system, and construct an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points;
[0033] An establishing unit is used to establish a relative Cartesian coordinate system based on the centroid position of the outermost convex hull;
[0034] A conversion unit, used for converting the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system to obtain a converted coordinate set;
[0035] The embedding unit is used to embed the digital watermark information into the converted coordinate set to obtain a target vector element containing the digital watermark information.
[0036] In one possible implementation manner, the establishing unit is specifically configured to:
[0037] Calculating the distance between the center of gravity position and each feature point in the feature point set, and determining the target feature point corresponding to the maximum distance;
[0038] Point the center of gravity position to the direction of the target feature point as the positive direction of the X-axis;
[0039] The perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y axis;
[0040] Taking the center of gravity as the origin, a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis is established.
[0041] In one possible implementation, the conversion unit is specifically used for:
[0042] Performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates;
[0043] Establishing a watermark bit index according to the normalized coordinates, and embedding the digital watermark information into the normalized coordinates to obtain embedded data;
[0044] Performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding;
[0045] The embedded relative coordinates are converted into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
[0046] In one possible implementation manner, after the embedding unit embeds the digital watermark information into the transformed coordinate set to obtain the target vector element containing the digital watermark information, the device further includes an extraction unit, the extraction unit being configured to:
[0047] Extracting a target vertex set from the target vector element;
[0048] Extracting a target feature point set from the target vertex set based on the shape features of the target vector element;
[0049] Mapping all feature points in the target feature point set to the original coordinate system, and constructing the target outermost convex hull of the target feature point set based on the positional relationship of all feature points in the original coordinate system;
[0050] Establishing a relative Cartesian coordinate system of the target according to the centroid position of the outermost convex hull of the target;
[0051] Convert the coordinates of all vertices in the target vertex set in the original coordinate system into relative coordinates in the target relative Cartesian coordinate system to obtain a converted coordinate set;
[0052] The digital watermark information is extracted from the transformed coordinate set.
[0053] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0054] Memory, used to store computer programs;
[0055] The processor is used to implement the method steps described in any one of the above items when executing the computer program stored in the memory.
[0056] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the method steps described in any one of the above items.
[0057] In a fifth aspect, an embodiment of the present application further provides a computer program product, which includes: a computer program code, and when the computer program code is run on a computer, the computer executes any of the methods described above.
[0058] The beneficial effects of the embodiments of the present application are as follows:
[0059] The embodiment of the present application provides a digital watermark processing method, device and electronic device for vector data. First, extract the vertices of each vector element in the vector data to obtain a vertex set for any vector element; that is, extract the vertices of the vector elements in the vector data element by element, so as to obtain a vertex set of any vector element. Then, based on the shape characteristics of any vector element, a feature point set can be extracted from the vertex set; then, all feature points in the feature point set are mapped to the original coordinate system, and the outermost convex hull of the feature point set is constructed based on the positional relationship of all feature points in the original coordinate system. The outermost convex hull is the smallest convex polygon surrounding all feature points; that is, the outermost convex hull of the feature point set is constructed in the original coordinate system. Then, based on the centroid position of the outermost convex hull, a relative Cartesian coordinate system is established; then, the coordinates of all vertices in the vertex set in the original coordinate system are converted into relative coordinates in the relative Cartesian coordinate system, so as to obtain a converted coordinate set; in this way, when the digital watermark information is embedded in the converted coordinate set, the target vector element containing the digital watermark information is obtained.
[0060] In practical applications, the outermost convex hull will change with the translation and rotation of the vector elements, while the relative positions between the vertices remain stable; in this way, the positions between the transformed relative coordinates will also remain stable during the translation and rotation of the vector elements. In this way, when the digital watermark information is embedded in the transformed coordinate set, the translation and rotation operations of the vector elements in geometric attacks can be effectively resisted, thereby improving the robustness of the digital watermark. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A flow chart of one of the methods for digital watermark processing of vector data provided in an embodiment of the present application;
[0062] Figure 2 for Figure 1 A method flow chart of step S104;
[0063] Figure 3a to Figure 3d A flow chart of one of the methods for constructing a relative Cartesian coordinate system;
[0064] Figure 4 for Figure 1 A method flow chart of step S106;
[0065] Figure 5 A flow chart of one of the methods for embedding watermarks in the digital watermark processing method for vector data provided in an embodiment of the present application;
[0066] Figure 6a to Figure 6d It is a schematic diagram of the process of simplifying vertices 1 to 8 of the vector element using the DP algorithm;
[0067] Figure 7 A schematic diagram of one of the coordinate value conversions in the digital watermark processing method for vector data provided in an embodiment of the present application;
[0068] Figure 8 For Figure 1 A flow chart of one of the methods after step S106;
[0069] Fig. 9 A flow chart of one of the methods for watermark extraction in the digital watermark processing method for vector data provided in an embodiment of the present application;
[0070] Fig.10 A schematic diagram of a structure of a digital watermark processing device for vector data provided in an embodiment of the present application;
[0071] Fig.11 A schematic diagram of a structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0073] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0074] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0075] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0076] Before introducing the digital watermark processing method for vector data provided by the embodiment of the present application, in order to facilitate understanding, the relevant terms involved in the embodiment of the present application are first introduced in detail.
[0077] Vector Data: Internal data stored in a computer in a vector structure. In a vector data structure, points, lines, and surfaces are used to describe the stored entities and their relationships. In a computer, using vector data has the advantages of small storage space and the topological relationship between data items can extract certain features from the point coordinate chain.
[0078] Digital Watermarking Technology: Digital watermarking technology is a branch of information hiding theory, which refers to embedding hidden information in digitized multimedia data, making it an integral part of the carrier without affecting the protected digital object. This information is usually invisible and can only be extracted through a dedicated detector or reader.
[0079] Robustness: Robustness refers to the ability to extract and detect watermark information after intentional (such as malicious attacks) or unintentional (such as compression, cropping, etc.) operations on watermarked data. It can also be understood as the ability of the watermark algorithm to resist watermark attacks. Digital watermarks used for copyright protection and usage tracking have high requirements for robustness.
[0080] Geometrical Attack: Geometric attacks on vector data include transformations such as rotation, scaling, and translation. Among them, the three types of attacks, rotation, scaling, and translation, are referred to as RST attacks.
[0081] Vertex Attack: Vertex attacks on vector data mainly refer to interpolation attacks, simplification attacks, and noise attacks on vector elements, which means increasing or changing the number of vertices in a vector element through various means.
[0082] Object Attack: Object attacks on vector data include object addition attacks and object deletion attacks. It refers to adding or deleting elements from vector data in units of elements. Since vector elements are the carriers of watermark information, the addition and reduction of elements will affect the watermark information.
[0083] In related technologies, for vector data, digital watermarking algorithms based on spatial domain construct watermark embedding domains in the spatial domain of vector data, and embed watermark information by modifying vertex coordinate values within a limited error. The most typical algorithm is the least significant bit (LSB) algorithm, which embeds watermark information by directly modifying the least significant bit of the coordinate value.
[0084] In particular, the digital watermarking algorithm for vector data space domain based on the Cartesian coordinate system usually chooses to directly embed the watermark information into the vertex coordinate values of the vector data. Although its implementation method is simple and intuitive and the watermark capacity is large, it is not robust against geometric attacks; moreover, it is difficult to meet the requirements of set attacks, vertex attacks and object attacks at the same time; in addition, the computational overhead is high and the computational efficiency is low, making it difficult to meet the requirements of using large amounts of data.
[0085] In view of this, the embodiments of the present application provide a digital watermark processing method, device and electronic device for vector data, which are used to improve the robustness of the digital watermark for vector data.
[0086] Please refer to Figure 1 , the embodiment of the present application provides a digital watermark processing method for vector data, comprising:
[0087] S101: extracting vertices of each vector element in the vector data to obtain a vertex set for any vector element;
[0088] In the specific implementation process, vector data usually includes multiple vector elements, and each vector element usually consists of multiple vertices. In practical applications, the vertices of the vector elements in the vector data can be extracted element by element, that is, the vertices of each vector element in the vector data can be extracted. In this way, a vertex set for any vector element can be obtained; the subsequent digital watermark embedding can use a single vector element as the minimum operation unit. Among them, the vertex set includes at least one vertex, and the specific number of vertices in the vertex set can be set according to the actual application, and is not limited here.
[0089] S102: extracting a feature point set from the vertex set based on the shape feature of any one of the vector elements;
[0090] In the specific implementation process, a feature set can be extracted from the vertex set based on the shape features of any vector element. The feature set includes at least one feature. In this way, the feature set and the non-feature set other than the feature set can be screened out from the vertex set. Subsequently, only the relative Cartesian coordinate system needs to be constructed through the feature set. In this way, the vertex set corresponding to any vector element is reasonably simplified, redundant data is streamlined, and the subsequent calculation complexity is reduced. In addition, vertex attacks are also resisted to a certain extent, and the robustness of the digital watermark is improved.
[0091] S103: Mapping all feature points in the feature point set to an original coordinate system, and constructing an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points;
[0092] After extracting the feature point set of any vector element, all feature points in the feature point set can be mapped to the original coordinate system. It should be noted that in the embodiment of the present application, unless otherwise specified, the original coordinate system is the original Cartesian coordinate system. The outermost convex hull of the feature point set is constructed based on the positional relationship of all feature points in the feature point set in the original coordinate system. The outermost convex hull is the minimum convex polygon surrounding all feature points. Exemplarily, the outermost convex hull is a minimum convex quadrilateral. Of course, the shape of the minimum convex polygon depends on the actual application.
[0093] S104: establishing a relative Cartesian coordinate system based on the centroid position of the outermost convex hull;
[0094] After constructing the outermost convex hull of the feature point set based on the positional relationship of all feature points in the feature point set in the original coordinate system, a relative Cartesian coordinate system can be established based on the centroid position of the outermost convex hull, thereby providing a guarantee for subsequent coordinate transformation. The specific process of establishing the relative Cartesian coordinate system can refer to the description of the relevant parts below, which will not be described in detail here.
[0095] S105: converting the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system to obtain a converted coordinate set;
[0096] After establishing the relative Cartesian coordinate system, the coordinates of all vertices in the vertex set in the original coordinate system can be converted into relative coordinates in the relative Cartesian coordinate system, thereby obtaining the converted coordinate set. During the entire coordinate conversion process, the relative position relationship between the vertices remains unchanged, even during translation, scaling, and rotation operations, the relative position relationship between the vertices can still be kept unchanged, which provides a guarantee for improving the robustness of the digital watermark.
[0097] S106: Embed the digital watermark information into the converted coordinate set to obtain a target vector element containing the digital watermark information.
[0098] After obtaining the transformed coordinate set, the digital watermark information can be embedded into the transformed coordinate set, thereby obtaining the target vector element containing the digital watermark information. The specific embedding process can be referred to the description of the following relevant parts, which will not be described in detail here.
[0099] In the embodiments of the present application, various implementation methods may be used to establish a relative Cartesian coordinate system based on the center of gravity position of the outermost convex hull, but the present invention is not limited thereto.
[0100] In one exemplary embodiment, Figure 2 As shown, step S104: establishing a relative Cartesian coordinate system based on the centroid position of the outermost convex hull, including:
[0101] S201: Calculate the distance between the center of gravity position and each feature point in the feature point set, and determine the target feature point corresponding to the maximum distance;
[0102] S202: Pointing the center of gravity position to the direction of the target feature point as the positive direction of the X-axis;
[0103] S203: taking a perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction as the positive direction of the Y axis;
[0104] S204: Taking the center of gravity as the origin, establishing a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis.
[0105] In the specific implementation process, the specific implementation process of step S201 to step S204 is as follows:
[0106] First, the distance between the centroid position and each feature point in the feature point set is calculated, and the target feature point corresponding to the maximum distance is determined. For example, the feature point set is P, P = {p1, p2, ..., p n}; where the coordinates of element p1 in the feature point set P are (x1, y1), the coordinates of element p2 are (x2, y2), ..., the coordinates of element p n The coordinates of (x n ,y n ); accordingly, the centroid position of the outermost convex hull is (x c ,y c ), x c and c Satisfy the following formulas respectively:
[0107]
[0108] Then, calculate the distance between the center of gravity position and each feature point in the feature point set, and determine the target feature point corresponding to the largest distance. In one exemplary embodiment, the distance between the center of gravity position and each vertex that makes up the outermost convex hull can be calculated, and the vertex with the longest distance is taken as the target feature point; then, the direction in which the center of gravity position points to the target feature point is taken as the positive direction of the X-axis. The perpendicular line from the center of gravity position to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y-axis. Then, with the center of gravity position as the origin, establish a relative Cartesian coordinate system consisting of the origin, the X-axis, and the Y-axis. As Figure 3a to Figure 3d The figure shows a flow chart of one method of constructing a relative Cartesian coordinate system, wherein: Figure 3a represents any set of feature points of a vector element, Figure 3b The dotted box T in the figure represents the outermost convex hull constructed. Figure 3c p c represents the centroid position of the outermost convex hull, Figure 3d XP in c y represents the relative Cartesian coordinate system established.
[0109] In the embodiments of the present application, Figure 4 As shown, step S106: embedding the digital watermark information into the converted coordinate set to obtain a target vector element containing the digital watermark information, including:
[0110] S401: performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates;
[0111] S402: establishing a watermark bit index according to the normalized coordinates, and embedding digital watermark information into the normalized coordinates to obtain embedded data;
[0112] S403: performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding;
[0113] S404: Convert the embedded relative coordinates into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
[0114] In the specific implementation process, the specific implementation process of step S401 to step S404 is as follows:
[0115] After obtaining the transformed coordinate set, the coordinates in the transformed coordinate set can be normalized to obtain the normalized coordinates. Taking the feature point set P mentioned above as an example, the transformed coordinate set is recorded as A′, A′={p′1,p′2,…,p′ m}, its X-axis coordinate set in the relative Cartesian coordinate system is denoted as X′, X′={x′1,x′2,…,x′ m}, its Y-axis coordinate set in the relative Cartesian coordinate system is denoted as Y′, Y′={y′1,y′2,…,y′ m After normalizing the coordinate values in the X-axis coordinate set X′ and the Y-axis coordinate set Y′ respectively, the normalized X-axis coordinate sets are recorded as X″, X″={x″1,x″2,…,x″ m}, the Y-axis coordinate set after normalization is recorded as Y″, Y″={y″1,y″2,…,y″ m}, satisfying the following formula:
[0116]
[0117] Where j∈[1,m],x′ min , x′ max Respectively represent the minimum and maximum values in the coordinate set X′, y′ min , y′ max Respectively represent the minimum and maximum values in the coordinate set Y′.
[0118] Then, according to the normalized coordinates, a watermark bit index is established, and the digital watermark information is embedded into the normalized coordinates to obtain the embedded data. Still taking the above-mentioned feature point set P as an example, a watermark bit index S is established, that is, a mapping relationship between the normalized coordinates and the watermark information bits is established; illustratively, the binary watermark information W to be embedded in the vector data is W={w1,w2,…,w v} is embedded in the kth significant bit of the coordinate set X″ and the coordinate set Y″, where v<n, k is a positive integer, and the relevant calculation formula is as follows:
[0119] index = int(x″) j *10 k-1 )mod v
[0120]
[0121] index = int(y" j *10 k-1 )mod v
[0122]
[0123] It should be noted that in the embodiment of the present application, the embedding operation of the vertex coordinate values of the outermost convex hull and the maximum and minimum coordinate values after normalization can be skipped, thereby providing a guarantee for the subsequent correct extraction of watermark information. Among them, after the coordinate values of the relative coordinates are normalized, the digital watermark information is embedded in the valid bits of the processed values, so that the processed values can remain stable during the scaling process. In this way, the embedded watermark information can resist the scaling operation in the vector element geometry attack.
[0124] After the digital watermark information is embedded into the normalized coordinates to obtain the embedded data, the embedded data can be denormalized to obtain the embedded relative coordinates. Still in combination with the aforementioned exemplary embodiments, the embedded data can be denormalized according to the following formula to obtain the embedded relative coordinates:
[0125]
[0126] Then, the embedded relative coordinates are converted into coordinates in the original coordinate system and recombined into a coordinate set, thereby obtaining the target vector element containing the digital watermark information. Specifically, the relevant processing can be performed according to the following formula:
[0127]
[0128] It should be noted that in the embodiment of the present application, a single vector element is used as the minimum operation unit for watermark embedding. In this way, the digital watermark processing method provided in the embodiment of the present application can effectively adapt to parallel and concurrent methods to improve computing efficiency, so as to be suitable for application requirements of large amounts of data. Among them, the above-mentioned relative coordinate value conversion, coordinate value normalization processing and other processes are all reversible operations. After embedding the digital watermark information, the inverse operation can be performed to obtain vector data containing watermark information. In addition, since the minimum operation unit of the digital watermark processing method provided in the embodiment of the present application is a single vector element, it can effectively resist object attacks for vector data containing multiple vector elements. It can be seen that the digital watermark processing method for vector data provided in the embodiment of the present application improves the robustness of the spatial domain digital watermark algorithm based on the Cartesian coordinate system against geometric attacks, vertex attacks and object attacks.
[0129] Combine the following Figure 5 The watermark embedding method flow chart shown in the figure provides a detailed explanation of the digital watermarking method provided in the embodiment of the present application:
[0130] S1: Get vector data;
[0131] S2: extract vertices of each vector element one by one to obtain a vertex set for any vector element;
[0132] S3: Extract a set of feature points from a set of vertices; specifically, simplify the set of vertices of any vector element and reduce redundant data; on the one hand, reduce the complexity of subsequent calculations; on the other hand, improve the ability to resist vertex attacks. Exemplarily, the Douglas-Peucker (DP) algorithm can be used to extract feature points of vector elements, thereby improving the stability of subsequent watermark embedding operations. The basic idea of the DP algorithm is to approximate a complex curve as a simplified broken line. Accordingly, the DP algorithm can be used to extract a set of feature points corresponding to the shape features from a set of vertices based on the shape features of any vector element. The relevant operation steps of the DP algorithm are:
[0133] Step 1: Select the starting point and end point on the curve, and connect the starting point and the end point to form a straight line;
[0134] Step 2: Calculate the distance from each point on the curve to the line segment, find the point with the largest distance, and record its corresponding distance as d max ;
[0135] Step 3: If the distance d of the point max If the distance d of the point is less than the set threshold D, all points between the starting point and the end point are discarded. maxIf the value is greater than the set threshold D, the curve is divided into two segments at this point, and the above steps are recursively performed in sequence until there are no points on the curve that can be discarded, and the remaining points are connected in sequence to form a simplified polyline.
[0136] When the DP algorithm is used to process any vector element, the vector element can be used as a curve to be processed, and each vertex in the vertex set of the vector element can be used as a related point. Figure 6a to Figure 6d The illustrated embodiment explains the process of simplifying vertices 1 to 8 of vector elements using the DP algorithm:
[0137] First, select the starting point (i.e., vertex 1) and the end point (i.e., vertex 8) on the curve formed by vertices 1 to 8 (recorded as the original broken line C), and connect vertex 1 and vertex 8 to form a straight line (recorded as L);
[0138] Then, the distance from each point in vertex 2 to vertex 7 to straight line L is calculated, and the point with the largest distance is found, which is vertex 5 in this exemplary embodiment;
[0139] In this exemplary embodiment, the distance from vertex 5 to straight line L is greater than the set threshold value D. Subsequently, through the first iteration, the original polyline can be divided into two segments at vertex 5, one segment (denoted as C1) is formed by connecting vertices 1 to vertices 5, and the other segment (denoted as C2) is formed by connecting vertices 5 to vertices 8;
[0140] Then, for C1, connect vertex 1 and vertex 5 to form a straight line (denoted as L1), calculate the distance between vertex 2 to vertex 4 and straight line L1, and find the point with the largest distance (vertex 2); the distance from vertex 2 to straight line L1 is greater than the set threshold D. Through the second iteration, C1 can be divided into two segments at vertex 2, one of which is denoted as L3, which is connected by vertex 1 to vertex 2; the other segment is denoted as L4, which is composed of vertex 2 to vertex 5 (denoted as C3).
[0141] Similarly, for C2, connect vertex 5 and vertex 8 to form a straight line (denoted as L5), calculate the distance from vertex 5 to vertex 8 to straight line L5, and find the point with the largest distance (vertex 7); the distance from vertex 7 to straight line L5 is greater than the set threshold D. Through the second iteration, C2 can be divided into two segments at vertex 7, one of which is denoted as L6, which is connected by vertex 7 to vertex 8; the other segment is denoted as L7, which is connected by vertex 5 to vertex 7 (denoted as C4).
[0142] Then, for C3, connect vertex 2 and vertex 5 to form a straight line (denoted as L6), and calculate the distances from vertex 3 and vertex 4 to straight line L6, where the point with the largest distance is vertex 3; if the distance from vertex 3 to straight line L6 is less than the set threshold D, then discard vertices 3 and vertex 4 in straight line L6.
[0143] Similarly, for C4, connect vertex 5 and vertex 7 to form a straight line (denoted as L7), calculate the distance from vertex 6 to straight line L7, and if the distance from vertex 6 to straight line L7 is less than the set threshold, then discard vertex 6 in L7. In this way, the original polyline is simplified to obtain a polyline composed of vertex 1, vertex 2, vertex 5, vertex 7 and vertex 8; among which, vertex 1, vertex 2, vertex 5, vertex 7 and vertex 8 are the feature points extracted from vertices 1 to 8.
[0144] S4: extract the remaining vertices; after extracting the feature point set from the vertex set, the remaining vertices other than the feature point set can also be extracted from the vertex set. The remaining vertices are actually non-feature points. Figure 6a to Figure 6d For example, vertex 3, vertex 4 and vertex 6 are non-feature points extracted from vertex 1 to vertex 8.
[0145] In the specific implementation process, combined with Figure 6a to Figure 6d In the illustrated embodiment, the same processing procedure can be used to simplify the vertex set of any vector element in the vector data, thereby extracting a feature point set.
[0146] S5: construct the outermost convex hull; specifically, all feature points in the feature point set can be mapped to the original coordinate system, and the outermost convex hull of the feature point set can be constructed based on the positional relationship of all feature points in the original coordinate system; illustratively, the outermost convex hull can be constructed using the Graham-Scan algorithm; the relevant calculation process is as follows:
[0147] Step 1: In the feature point set P = {p1, p2, ..., p n}Select the minimum extreme point p min =(x min ,y min ) as the initial point; then, according to the remaining points p i and rotate counterclockwise to p min The angles of are sorted from small to large to obtain a sorted point set;
[0148] Step 2: Determine the remaining points p one by one i Is it on the convex hull? Starting from the initial point, ensure that the rotation direction of the adjacent line segments on the outermost convex hull remains known. Specifically, maintain a stack to store the points on the convex hull. If there is a newly added point p i+2 , which is the same as the previous point p i+1 Composition vector <p i+1 ,p i+2 >, calculate the vector and the previous vector <p i ,p i+1> cross product; if the cross product is positive, it means that the two line segments rotate in different directions, then p i+1 It must not be on the convex hull, so remove the point; then, continue backtracking and check the relationship between all the points in the stack and p in turn. i+2 Whether the formed line segment is consistent with the rotation direction of the previous line segment, if not, continue to remove the point; after the backtracking is completed, point p i+2 Push to stack.
[0149] Step 3: Repeat the above steps until all points in the feature point set P are traversed to obtain the outermost convex hull.
[0150] S6: Establish a relative Cartesian coordinate system; specifically, calculate the centroid position of the outermost convex hull according to the following formula:
[0151]
[0152] Then, calculate the distance from the center of gravity to each vertex of the outermost convex hull, take the convex hull vertex with the longest distance, take the center of gravity as the origin, connect the center of gravity to the convex hull vertex, and use it as the positive direction of the X-axis; at the same time, the perpendicular line from the center of gravity to the convex hull vertex in the right-hand spiral direction is the positive direction of the Y-axis, so as to establish a relative Cartesian coordinate system consisting of the origin, X-axis and Y-axis with the center of gravity as the origin. The process of establishing the relative Cartesian coordinate system can refer to the above Figure 3a to Figure 3d The description of the corresponding parts will not be repeated here.
[0153] S7: Vertex coordinate transformation; Specifically, after the relative Cartesian coordinate system is established, the vertex set A = {a1, a2, ..., a m All vertices in} are converted into coordinate values in the relative Cartesian coordinate system, where m>n; combined with Figure 7 The coordinate value transformation diagram shown is relative to the Cartesian coordinate system The origin of the vertex set, θ is the minimum angle required to rotate from the X-axis of the Cartesian coordinate system to the X-axis of the original coordinate system (XOY); if the counterclockwise rotation direction is negative and the clockwise rotation direction is positive, then θ∈[-90°, 90°]; each vertex a in the vertex set j =(x j ,y j ), is converted into relative coordinates a j ′=(x j ′,y j The formula for ′ is:
[0154] x′ j =(x j -x0)*cosθ+(y j -y0)*sinθ
[0155] y′j =-(x j -x0)*sinθ+(y j -y0)*cosθ
[0156] Where j∈[1,m]. In this way, the transformed coordinate set is obtained, where the X-axis coordinate set is X′={x′1,x′2,…,x′ m , where the Y-axis coordinate set is Y′={y′1,y′2,…,y′ m}.
[0157] S8: Normalization processing; specifically, normalize the coordinate values in the X-axis coordinate set X′ and the Y-axis coordinate set Y′ in the transformed coordinate set to the maximum and minimum values, and obtain X″={x″1,x″2,…,x″ m} and Y″={y″1,y″2,…,y″ m}, the relevant calculation formula is as follows:
[0158]
[0159] Among them, x′ min , x′ max Respectively represent the minimum and maximum values in the coordinate set X', y' min , y′ max Respectively represent the minimum and maximum values in the coordinate set Y′.
[0160] S9: Establish a watermark bit index; specifically, establish a mapping relationship between the normalized coordinates and the watermark information bits, thereby establishing a watermark bit index. The relevant calculation formula is as follows:
[0161] index = int(x″) j *10 k-1 )mod v
[0162] index = int(y" j *10 k-1 )mod v
[0163] Wherein, v<n, k is a positive integer.
[0164] S10: embedding watermark information; specifically, embed the binary watermark information W = {w1, w2, ..., w v} is embedded into the kth significant bit of the coordinate set X″ and the coordinate set Y″, thereby obtaining the embedded data. The relevant calculation formula is as follows:
[0165]
[0166] S11: Inverse normalization processing; specifically, the embedded data is inversely normalized to obtain the relative coordinates after embedding:
[0167]
[0168] S12: The relative coordinates after embedding are converted into original coordinates; specifically, the relative coordinates after embedding the watermark are converted into original coordinates and reassembled into a coordinate set. Specifically, the relevant processing can be performed according to the following formula:
[0169]
[0170] S13: Obtain target vector elements containing digital watermark information.
[0171] based on Figure 5 The same processing flow can be used to perform the same processing operations on each vector element in the vector data, and the relevant implementation process will not be repeated here.
[0172] In the embodiments of the present application, Figure 8 As shown, in step S106: embedding the digital watermark information into the converted coordinate set to obtain the target vector element containing the digital watermark information, the method further includes:
[0173] S501: extracting a target vertex set in the target vector element;
[0174] S502: extracting a target feature point set from the target vertex set based on the shape feature of the target vector element;
[0175] S503: Mapping all feature points in the target feature point set to the original coordinate system, and constructing a target outermost convex hull of the target feature point set based on the positional relationship of all feature points in the original coordinate system;
[0176] S504: establishing a relative Cartesian coordinate system of the target according to the centroid position of the outermost convex hull of the target;
[0177] S505: Convert the coordinates of all vertices in the target vertex set in the original coordinate system into relative coordinates in the target relative Cartesian coordinate system to obtain a converted coordinate set;
[0178] S506: Extracting the digital watermark information from the transformed coordinate set.
[0179] In the specific implementation process, a single vector element is used as the minimum operation unit for watermark extraction. Fig. 9 The specific implementation process of step S501 to step S506 is as follows:
[0180] S20: Obtaining vector data containing watermark;
[0181] S21: extracting vertices of each vector element in the vector data element by element; accordingly, a target vertex set corresponding to the target vector element in the vector data can be extracted;
[0182] S22: extracting a target feature point set; specifically, based on the shape features of the target vector elements, the DP algorithm can be used to extract a target feature point set from the target vertex set. The relevant technical implementation can refer to the description of the watermark embedding related part above, which will not be repeated here;
[0183] S23: extracting remaining vertices; specifically, extracting remaining vertices in the target vertex set except the target feature point set;
[0184] S24: constructing the outermost convex hull of the target; specifically, all feature points in the target feature point set can be mapped to the original coordinate system, and based on the positional relationship of all feature points in the original coordinate system, the target outermost convex hull of the target feature point set is constructed; wherein, the construction process of the target outermost convex hull can refer to the description of the watermark embedding related part above, which will not be repeated here;
[0185] S25: Establishing a target relative Cartesian coordinate system; specifically, the target relative Cartesian coordinate system may be established according to the centroid position of the outermost convex hull of the target; wherein, the process of establishing the target relative Cartesian coordinate system may refer to the description of the watermark embedding related part, which will not be repeated here;
[0186] S26: target vertex set coordinate transformation; specifically, the coordinates of all vertices in the target vertex set in the original coordinate system are transformed into relative coordinates in the target relative Cartesian coordinate system, thereby obtaining a transformed coordinate set; wherein, the specific implementation process of the coordinate transformation can refer to the description of the watermark embedding related part above, which will not be repeated here;
[0187] S27: Normalization processing; specifically, normalization processing is performed on the transformed coordinate set; the specific processing process can refer to the description of the watermark embedding related part above, which will not be repeated here;
[0188] S28: Establishing a watermark bit index; specifically, establishing a mapping relationship between the normalized coordinates and the watermark information bits, thereby establishing a watermark bit index; wherein, the specific process of establishing the watermark bit index may refer to the description of the watermark embedding related part above, and will not be repeated here;
[0189] S29: extracting digital watermark information; specifically, the digital watermark information of the target vector element can be restored from the normalized coordinates according to the effective bit value and the watermark bit index.
[0190] Based on the same inventive concept, Fig.10 As shown, the embodiment of the present application also provides a digital watermark processing device for vector data, including:
[0191] A first extraction unit 10 is used to extract vertices of each vector element in the vector data to obtain a vertex set for any vector element;
[0192] A second extraction unit 20, configured to extract a feature point set from the vertex set based on the shape feature of any one of the vector elements;
[0193] A construction unit 30, configured to map all feature points in the feature point set to an original coordinate system, and construct an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points;
[0194] An establishing unit 40, configured to establish a relative Cartesian coordinate system based on the centroid position of the outermost convex hull;
[0195] A conversion unit 50, configured to convert the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system, to obtain a converted coordinate set;
[0196] The embedding unit 60 is used to embed the digital watermark information into the converted coordinate set to obtain a target vector element containing the digital watermark information.
[0197] In the embodiment of the present application, the establishing unit 40 is specifically used for:
[0198] Calculating the distance between the center of gravity position and each feature point in the feature point set, and determining the target feature point corresponding to the maximum distance;
[0199] Point the center of gravity position to the direction of the target feature point as the positive direction of the X-axis;
[0200] The perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y axis;
[0201] Taking the center of gravity as the origin, a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis is established.
[0202] In the embodiment of the present application, the conversion unit 50 is specifically used for:
[0203] Performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates;
[0204] Establishing a watermark bit index according to the normalized coordinates, and embedding the digital watermark information into the normalized coordinates to obtain embedded data;
[0205] Performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding;
[0206] The embedded relative coordinates are converted into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
[0207] In the embodiment of the present application, after the embedding unit 60 embeds the digital watermark information into the converted coordinate set to obtain the target vector element containing the digital watermark information, the device further includes an extraction unit, which is used to:
[0208] Extracting a target vertex set from the target vector element;
[0209] Extracting a target feature point set from the target vertex set based on the shape features of the target vector element;
[0210] Mapping all feature points in the target feature point set to the original coordinate system, and constructing the target outermost convex hull of the target feature point set based on the positional relationship of all feature points in the original coordinate system;
[0211] Establishing a relative Cartesian coordinate system of the target according to the centroid position of the outermost convex hull of the target;
[0212] Convert the coordinates of all vertices in the target vertex set in the original coordinate system into relative coordinates in the target relative Cartesian coordinate system to obtain a converted coordinate set;
[0213] The digital watermark information is extracted from the transformed coordinate set.
[0214] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can implement the functions of the digital watermark processing method for vector data, referring to Fig.11 , the electronic device comprises:
[0215] Memory 100, used for storing computer programs;
[0216] The processor 200 is used to implement the steps of the digital watermark processing method for vector data as described in any of the above items when executing the computer program stored in the memory.
[0217] The specific connection medium between the processor 200 and the memory 100 is not limited in the embodiment of the present application. Fig.11 In the example, the processor 200 and the memory 100 are connected via the bus 300. The bus 300 is connected to the memory 100 via the bus 300. Fig.11 The bus 300 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the figure, but it does not mean that there is only one bus 300 or one type of bus 300. Alternatively, the processor 200 may also be called a controller, and there is no limitation on the name.
[0218] In the embodiment of the present application, the memory 100 stores instructions that can be executed by the processor 200. When the processor 200 executes the computer program stored in the memory 100, the digital watermark processing method for vector data discussed above can be executed. The processor 200 can implement Fig.10 The functions of each module are shown in the figure.
[0219] Among them, the processor 200 is the control center of the device, and can use various interfaces and lines to connect various parts of the entire control device, and through running or executing computer programs stored in the memory 100 and calling data stored in the memory 100, the various functions of the device and process data, thereby monitoring the device as a whole.
[0220] In one possible design, the processor 200 may include one or more processing units, and the processor 200 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. In some embodiments, the processor 200 and the memory 100 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0221] The memory 100, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 100 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. Alternatively, the memory 100 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 100 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0222] By designing and programming the processor 200, the code corresponding to the digital watermark processing method for vector data introduced in the above embodiment can be fixed into the chip, so that the chip can execute the steps of digital watermark processing for vector data discussed above when running. How to design and program the processor 200 is a technology well known to those skilled in the art and will not be described in detail here.
[0223] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to enable a computer to execute the steps of the digital watermark processing method for vector data discussed above.
[0224] In some possible implementations, various aspects of the digital watermark processing method for vector data provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of the digital watermark processing method for vector data according to various exemplary implementations of the present application described above in this specification.
[0225] The embodiment of the present application provides a digital watermark processing method, device and electronic device for vector data. First, extract the vertices of each vector element in the vector data to obtain a vertex set for any vector element; that is, extract the vertices of the vector elements in the vector data element by element, so as to obtain a vertex set of any vector element. Then, based on the shape characteristics of any vector element, a feature point set can be extracted from the vertex set; then, all feature points in the feature point set are mapped to the original coordinate system, and the outermost convex hull of the feature point set is constructed based on the positional relationship of all feature points in the original coordinate system. The outermost convex hull is the smallest convex polygon surrounding all feature points; that is, the outermost convex hull of the feature point set is constructed in the original coordinate system. Then, based on the centroid position of the outermost convex hull, a relative Cartesian coordinate system is established; then, the coordinates of all vertices in the vertex set in the original coordinate system are converted into relative coordinates in the relative Cartesian coordinate system, so as to obtain a converted coordinate set; in this way, when the digital watermark information is embedded in the converted coordinate set, the target vector element containing the digital watermark information is obtained.
[0226] In practical applications, the outermost convex hull will change with the translation and rotation of the vector elements, while the relative positions between the vertices remain stable; in this way, the positions between the transformed relative coordinates will also remain stable during the translation and rotation of the vector elements. In this way, when the digital watermark information is embedded in the transformed coordinate set, the translation and rotation operations of the vector elements in geometric attacks can be effectively resisted, thereby improving the robustness of the digital watermark.
[0227] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0228] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0229] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0230] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0231] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A digital watermark processing method for vector data, characterized in that: include: Extracting vertices of each vector element in the vector data to obtain a vertex set for any vector element; Extracting a feature point set from the vertex set based on the shape feature of any one of the vector elements; Mapping all feature points in the feature point set to an original coordinate system, and constructing an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points; Based on the centroid position of the outermost convex hull, a relative Cartesian coordinate system is established; Convert the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system to obtain a converted coordinate set; The digital watermark information is embedded into the transformed coordinate set to obtain a target vector element containing the digital watermark information.
2. The method according to claim 1, characterized in that The establishing of a relative Cartesian coordinate system based on the centroid position of the outermost convex hull comprises: Calculating the distance between the center of gravity position and each feature point in the feature point set, and determining the target feature point corresponding to the maximum distance; Point the center of gravity position to the direction of the target feature point as the positive direction of the X-axis; The perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y axis; Taking the center of gravity as the origin, a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis is established.
3. The method according to claim 1 or 2, characterized in that The step of embedding the digital watermark information into the transformed coordinate set to obtain a target vector element containing the digital watermark information includes: Performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates; Establishing a watermark bit index according to the normalized coordinates, and embedding the digital watermark information into the normalized coordinates to obtain embedded data; Performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding; The embedded relative coordinates are converted into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
4. The method according to claim 1 or 2, characterized in that: After embedding the digital watermark information into the transformed coordinate set to obtain the target vector element containing the digital watermark information, the method further includes: Extracting a target vertex set from the target vector element; Extracting a target feature point set from the target vertex set based on the shape features of the target vector element; Mapping all feature points in the target feature point set to the original coordinate system, and constructing the target outermost convex hull of the target feature point set based on the positional relationship of all feature points in the original coordinate system; Establishing a relative Cartesian coordinate system of the target according to the centroid position of the outermost convex hull of the target; Convert the coordinates of all vertices in the target vertex set in the original coordinate system into relative coordinates in the target relative Cartesian coordinate system to obtain a converted coordinate set; The digital watermark information is extracted from the transformed coordinate set.
5. A digital watermark processing device for vector data, characterized in that: include: A first extraction unit, used to extract vertices of each vector element in the vector data to obtain a vertex set for any vector element; A second extraction unit, configured to extract a feature point set from the vertex set based on the shape feature of any one of the vector elements; A construction unit, used to map all feature points in the feature point set to an original coordinate system, and construct an outermost convex hull of the feature point set based on the positional relationship of all feature points in the original coordinate system, wherein the outermost convex hull is a minimum convex polygon surrounding all feature points; An establishing unit is used to establish a relative Cartesian coordinate system based on the centroid position of the outermost convex hull; A conversion unit, used for converting the coordinates of all vertices in the vertex set in the original coordinate system into relative coordinates in the relative Cartesian coordinate system to obtain a converted coordinate set; The embedding unit is used to embed the digital watermark information into the converted coordinate set to obtain a target vector element containing the digital watermark information.
6. The device according to claim 5, characterized in that The establishing unit is specifically used for: Calculating the distance between the center of gravity position and each feature point in the feature point set, and determining the target feature point corresponding to the maximum distance; Point the center of gravity position to the direction of the target feature point as the positive direction of the X-axis; The perpendicular line from the center of gravity to the target feature point in the right-hand spiral direction is taken as the positive direction of the Y axis; Taking the center of gravity as the origin, a relative Cartesian coordinate system consisting of the origin, the X-axis and the Y-axis is established.
7. The device according to claim 5 or 6, characterized in that The conversion unit is specifically used for: Performing maximum and minimum value normalization processing on the coordinates in the transformed coordinate set to obtain normalized coordinates; Establishing a watermark bit index according to the normalized coordinates, and embedding the digital watermark information into the normalized coordinates to obtain embedded data; Performing inverse normalization processing on the embedded data to obtain relative coordinates after embedding; The embedded relative coordinates are converted into coordinates in the original coordinate system to obtain target vector elements containing the digital watermark information.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps as described in any one of claims 1 to 4 when executing the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the method steps according to any one of claims 1 to 4.
10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 4.
Citation Information
Cited By
Cellular code reading method and device, equipment and storage medium
CN121615669A