CN111563835A - Method and device for embedding watermark into vector map - Google Patents
Method and device for embedding watermark into vector map Download PDFInfo
- Publication number
- CN111563835A CN111563835A CN202010252198.8A CN202010252198A CN111563835A CN 111563835 A CN111563835 A CN 111563835A CN 202010252198 A CN202010252198 A CN 202010252198A CN 111563835 A CN111563835 A CN 111563835A
- Authority
- CN
- China
- Prior art keywords
- watermark
- point
- working set
- embedding
- vector map
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000001914 filtration Methods 0.000 claims abstract description 44
- 238000004590 computer program Methods 0.000 claims abstract description 20
- 230000015654 memory Effects 0.000 claims description 20
- 238000005457 optimization Methods 0.000 abstract description 4
- 238000001514 detection method Methods 0.000 description 40
- 238000010586 diagram Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 7
- 229930186657 Lat Natural products 0.000 description 5
- 210000004907 gland Anatomy 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000000265 homogenisation Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000010845 search algorithm Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The invention aims to provide a method, a device, a computer readable storage medium and a computer program product. The method comprises the steps that computer equipment obtains a first working set and an avoidance set in vector map data; filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded; embedding a watermark sequence into the second working set. Compared with the prior art, the invention aims to provide an optimization scheme aiming at the invisibility of the DFT digital watermark based on the vector map. Under the condition of not influencing the advantages of the prior art, the method can ensure that the vector map added with the watermark still has better invisibility when other elements are superposed, especially under the map use scene supporting zooming.
Description
The present application claims priority from a prior chinese patent application having application number 202010183762.5 entitled "method and apparatus for embedding watermarks in vector maps", filed on year 2020, month 03, and day 16, filed on Tianjin perfect gravitation technology, Inc., the contents of which are incorporated herein by reference in their entirety.
Technical Field
The invention relates to the technical field of vector maps, in particular to a technology for embedding watermarks into a vector map.
Background
In the existing watermark embedding scheme, a group of binary sequences are usually hidden in the phase of frequency domain data and then restored to time domain data through IDFT.
However, the modification of data in the frequency domain, resulting in changes in the time domain, is difficult to predict intuitively, so the vector map may cause the following problems after embedding the watermark:
1) an adjacent face gland;
2) topological errors, such as face data self-intersections;
3) situations arise where the user is particularly attentive, such as a large swing of dot data in a segment of a line, forming a jagged border.
The above problems both affect the invisibility of the digital watermark and the correctness of the vector map, and the above defects are further amplified in the map usage scenario supporting zooming.
Disclosure of Invention
The invention aims to provide a method, a device, a computer readable storage medium and a computer program product.
According to an aspect of the present invention, there is provided a method of embedding a watermark into a vector map, wherein the method comprises the steps of:
acquiring a first working set and an avoidance set in vector map data;
filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding a watermark sequence into the second working set.
According to an aspect of the present invention, there is also provided an apparatus for embedding a watermark into a vector map, wherein the apparatus includes:
the acquiring device is used for acquiring a first working set and an avoidance set in the vector map data;
filtering means for filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding means for embedding the watermark sequence in said second working set.
According to an aspect of the present invention, there is also provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements a method of embedding watermarks for a vector map according to an aspect of the present invention.
According to an aspect of the present invention, there is also provided a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method of embedding a watermark for a vector map according to an aspect of the present invention.
According to an aspect of the present invention, there is also provided a computer program product which, when executed by a computing device, implements a method of embedding watermarks for a vector map according to an aspect of the present invention.
Compared with the prior art, the invention aims to provide an optimization scheme aiming at the invisibility of the DFT digital watermark based on the vector map. Under the condition of not influencing the advantages of the prior art, the method can ensure that the vector map added with the watermark still has better invisibility when other elements are superposed, especially under the map use scene supporting zooming.
In addition, the invention can enhance the invisibility of the vector map digital watermark, so that a user can not easily find the watermark added to the map and the actual expression of the map is not influenced.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 illustrates a flow diagram of a method of embedding watermarks for a vector map in accordance with an embodiment of the invention;
FIGS. 2(a) and (b) respectively show a schematic diagram of the effect of embedding a watermark for a vector map according to an example;
FIG. 3 illustrates a flow diagram of a method of watermarking a vector map according to another embodiment of the present invention;
FIG. 4 shows a schematic diagram of an apparatus for embedding watermarks for a vector map according to an embodiment of the invention;
fig. 5 shows a schematic diagram of an apparatus for embedding watermarks in a vector map according to another embodiment of the invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments of the present invention are described as an apparatus represented by a block diagram and a process or method represented by a flow diagram. Although a flowchart depicts a sequence of process steps in the present invention, many of the operations can be performed in parallel, concurrently, or simultaneously. In addition, the order of the operations may be re-arranged. The process of the present invention may be terminated when its operations are performed, but may include additional steps not shown in the flowchart. The processes of the present invention may correspond to methods, functions, procedures, subroutines, and the like.
The methods illustrated by the flow diagrams and apparatus illustrated by the block diagrams discussed below may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware or microcode, the program code or code segments to perform the necessary tasks may be stored in a machine or computer readable medium such as storage medium. The processor(s) may perform the necessary tasks.
Similarly, it will be further appreciated that any flow charts, flow diagrams, state transition diagrams, and the like represent various processes which may be substantially described as program code stored in computer readable media and so executed by a computing device or processor, whether or not such computing device or processor is explicitly shown.
As used herein, the term "storage medium" may refer to one or more devices for storing data, including Read Only Memory (ROM), Random Access Memory (RAM), magnetic RAM, kernel memory, magnetic disk storage media, optical storage media, flash memory devices, and/or other machine-readable media for storing information. The term "computer-readable medium" can include, but is not limited to portable or fixed storage devices, optical storage devices, and various other mediums capable of storing and/or containing instructions and/or data.
A code segment may represent a procedure, a function, a subprogram, a program, a routine, a subroutine, a module, a software package, a class, or any combination of instructions, data structures, or program descriptions. A code segment may be coupled to another code segment or a hardware circuit by passing and/or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, etc. may be passed, forwarded, or transmitted via any suitable means including memory sharing, information passing, token passing, network transmission, etc.
The term "computer device" in this context refers to an electronic device that can perform predetermined processes such as numerical calculation and/or logic calculation by executing predetermined programs or instructions, and may at least include a processor and a memory, wherein the predetermined processes are performed by the processor executing program instructions prestored in the memory, or performed by hardware such as ASIC, FPGA, DSP, or implemented by a combination of the two.
The "computer device" is typically embodied in the form of a general-purpose computer device, and its components may include, but are not limited to: one or more processors or processing units, system memory. The system memory may include computer readable media in the form of volatile memory, such as Random Access Memory (RAM) and/or cache memory. The "computer device" may further include other removable/non-removable, volatile/nonvolatile computer-readable storage media. The memory may include at least one computer program product having a set (e.g., at least one) of program modules that are configured to perform the functions and/or methods of embodiments of the present invention. The processor executes various functional applications and data processing by executing programs stored in the memory.
For example, the memory stores a computer program for executing the functions and processes of the present invention, and the processor executes the corresponding computer program, so that the present invention is implemented as a scheme for embedding watermarks in a vector map.
Typically, the computer devices include, for example, user equipment and network devices. Wherein the user equipment includes but is not limited to a Personal Computer (PC), a notebook computer, a mobile terminal, etc., and the mobile terminal includes but is not limited to a smart phone, a tablet computer, etc.; the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of computers or network servers, wherein Cloud Computing is one of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers. Wherein the computer device can be operated alone to implement the invention, or can be accessed to a network and implement the invention through interoperation with other computer devices in the network. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, and the like.
It should be noted that the user devices, network devices, networks, etc. are merely examples, and other existing or future computing devices or networks may be suitable for the present invention, and are included in the scope of the present invention and are incorporated by reference herein.
Specific structural and functional details disclosed herein are merely representative and are provided for purposes of describing example embodiments of the present invention. The present invention may, however, be embodied in many alternate forms and should not be construed as limited to only the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element may be termed a second element, and, similarly, a second element may be termed a first element, without departing from the scope of example embodiments. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
The present invention is described in further detail below with reference to the attached drawing figures.
Fig. 1 shows a flow diagram of a method according to an embodiment of the invention, in which a process of embedding a watermark for a vector map is specifically shown.
As shown in FIG. 1, in step 110, a computer device obtains a first working set and an avoidance set in vector map data; in step 120, the computer device filters a back-off set from the first working set to obtain a second working set in which a watermark can be embedded; in step 130, the computer device embeds a watermark sequence into the second working set.
Specifically, in step 110, the computer device obtains a first working set and an avoidance set in the vector map data.
Here, the first working set includes all data sets to be watermarked in the vector map data. Typically, the first working set is a data set of line segments connected end to end that describe a political relationship. For example, when a watermark is embedded in a vector map describing a national relationship, a data set to be watermarked is country-level data, which is embodied as line segments connected end to end.
The avoidance set is used for limiting the range in which the watermark cannot be embedded in the vector map data. Typically, the avoidance set may be a set of points comprising reference data, wherein the reference data may comprise, for example, continents, rivers, lakes, and the like.
According to a preferred example of the invention, each point object of the surface objects in the first working set is constructed with an n-bit precision.
For precision reasons, the points that should be overlapped on the common edges of the adjacent country surfaces are not necessarily the same point, if the watermark sequence embedded in one of the countries passes through the common edge or a part of the common edge, the two adjacent countries can intersect or have a gap, so the surface data in the first working set needs to be processed, and the points on the common edges of the adjacent surfaces are referred to the same object. Accordingly, when the watermark is embedded on the common edge, the adjacent surfaces are correspondingly changed, and the invisibility is better.
Referring to fig. 2(a) and (B), two faces a and B are shown in each figure, each face consisting of five points with a common edge between the two faces. There are three adjacent points on the common edge. Referring to the left part of fig. 2(a), since the precisions of two surfaces a and B are different, wherein the precision of the surface a is (1,1.001) and the precision of the surface B is (1,1.0012), if a watermark is added to a point of one of the surfaces, the position of the point will be shifted, and the situation shown on the right side will occur. That is, if adjacent points on the common edge are not subjected to the same processing, when a surface is embedded with a watermark, the adjacent points are shifted, and the two surfaces cannot be aligned. Continuing with the left-hand portion of FIG. 2(b), three adjacent points on the common edge are treated as identical, i.e., two references to each adjacent point are the same object. At this time, the precision of both surfaces a and B is the same, and the precision is (1, 1.001). When a surface is embedded with a watermark, the shifting of adjacent points in the surface will cause the shifting of the same points in the other surface, as shown in the right part of fig. 2(b), and the common edges of the two surfaces are still aligned, so as to achieve the desired effect.
Here, the precision n may be adjusted according to the condition of the data to be embedded, and the smaller n is, the worse the effect will be in the use scene of the map supporting zooming is, in the case of fixing the watermark data to be embedded; the larger n, the more susceptible to user-perceived problems, such as jagged boundaries. In the embodiment in the present description, n is 6, for example, according to the data characteristics of the vector map.
Wherein the first working set includes a plurality of face objects, each face object including a plurality of point objects. For each point object in a surface object, it is reconstructed with n-bit precision to ensure the identity of neighboring point objects.
According to an example of the present invention, a reference point object is set with n-bit precision, an initial point object of the face object is compared with the reference point object for each face object, and when the initial point object and the reference point object do not coincide with each other, the initial point object is replaced with the reference point object and added to the current face object.
For example, specifically, the reconstruction process of the point object according to the n-bit precision is as follows:
in the step (i), the computer device establishes an empty set of point objects, for example, denoted as SP; in the second step, the computer equipment traverses each surface data; in step (c), taking one surface data as an example, the surface data is a multi-level list of points, for example, abstracting the surface data to L1 ═ p1, p2,. pn ], Pi (1 ═ i ═ n), the specific numerical value is (1.001,. 1.0011), traversing all points of the surface data, if no point object with the same numerical value as Pi at the n-bit precision exists in the SP, newly creating a point object Pi, replacing Pi in the surface data with a reference point Pi, and adding Pi to the set SP; if there is a point object Pi in SP whose value is the same as Pi at n-bit precision, then directly replacing Pi as the point object Pi, and finally obtaining a new face object can describe L1 ═ P1, P2.., Pn ], Pi (1 ═ i ≦ n) as an element in SP. Likewise, the neighboring planes may be described as L2 ═ P1, P2, Pn +1. ], where P1, P2 are points on the common side of L1 and L2), thereby achieving that points on the common side of the neighboring planes with n-bit precision are references to the same point object.
In step 120, the computer device filters the back-off set from the first working set to obtain a second working set in which the watermark may be embedded.
Here, for each surface object in the first working set, traversing the point object therein, and if the distance between the current point object and a point object in the dodge set is less than a predetermined distance length, filtering the current point object. That is, the filtered points cannot enter the data sequence in which the watermark is to be embedded.
Further, since the avoidance set usually includes land and major rivers and lakes around the world, which causes the above traversal method to be very computationally intensive and time-consuming, the present invention proposes an optimization filtering algorithm to optimize the computation time.
According to an embodiment of the present invention, the point objects in the dodge set are also reconstructed with n-bit precision, and a longitude list lons and a latitude list lats are obtained by respectively sorting the longitudes and latitudes of the point objects therein. Accordingly, for each point object in the surface objects of the first working set, with the current point object as an index, respectively searching for a point object whose distance from the current point object is less than half of the predetermined distance length in the longitude list and the latitude list to obtain an intersection of the point objects searched in the two lists; and if the distance between the current point object and one point object in the intersection is less than a preset distance length, filtering the current point object.
For example, specifically, the optimized filtering algorithm is shown as follows:
in step 120.1, since the point object in the avoidance set is reconstructed according to the n-bit precision, that is, the same point is subjected to the homogenization treatment, the computer device can quickly judge whether the point in the first working set is consistent with the point in the avoidance set according to the hash value of each point, and if the point in the first working set is the same as the point in the avoidance set, the point is marked as failing to pass;
in step 120.2, the computer device obtains a set, which may have a distance less than length from the longitude list lons and the latitude list lats of the respective point objects in the avoidance set arranged in ascending order, as denoted by APPROXIMATE, and is denoted by S1 and S2, respectively, where the approximation algorithm is specifically described as follows:
in the first step, taking the comparison of the lons as an example, the computer equipment adopts an adjusted binary search algorithm to obtain an index value of a target point object in the lons;
in step two, respectively traversing from the left side and the right side of the index value to two sides, calculating the difference value between the longitude of the target point object and the longitude of the point object in the lons list by the computer equipment, if the difference value is less than length/2, adding the point in the lons list to the set S1 until the difference value of the point is more than or equal to length/2; similarly, calculating the lats portion, the computer device may obtain the set S2;
in the third step, the computer device takes the intersection of S1 and S2 and records as a pending sequence pending;
in the fourth step, the computer device traverses the pending sequence pending obtained in the previous step, calculates the distance between the target point object and each point in the pending sequence, and marks that the target point object cannot pass through if a point with the distance smaller than length exists;
in step (v), the computer device marks pass if the target point object is not marked as unable to pass.
The relevant code parts of the above approximation algorithm are shown below:
inputting: the point object is a first working set S reconstructed according to n bit precision, a lons list of an avoidance set, and a lats list of the avoidance set
Function: approximation algorithm APPROXIMATE, DISTANCE algorithm DISTANCE for calculating DISTANCE between two points
And (3) outputting: data sequence qualified capable of embedding watermark
The larger the length is, the smaller the quantity of the insertable watermarks in the map is; the smaller the length, the more susceptible to user perception problems, such as jagged boundaries. In the embodiment in the present description, length is 0.2 (degrees) according to the characteristics of the vector map data.
In step 120.3, the computer device traverses each surface object in the first working set, converts longitude into a real part of the complex number and latitude into an imaginary part of the complex number by using a point sequence of each surface object passing a filtering strategy, and converts the real part of the complex number into a time-domain complex sequence;
in step 120.4, the computer device converts the complex sequence in the time domain into DFT coefficients in the frequency domain using DFT (discrete fourier transform), resulting in a data sequence in which the watermark can be embedded, i.e. a second working set.
Continuing back to fig. 1, next, in step 130, the computer device embeds a watermark sequence into the second working set.
According to one embodiment of the invention, the process of embedding the watermark is as follows:
in step 130.1, the computer device defines the watermark strength P, for example using an empirical value of 0.02;
in step 130.2, the computer device traverses the embeddable sequence acquired by each facet in the second working set: if the number of points in the surface data is less than or equal to the size of the watermark sequence, the surface can not be embedded with the watermark; due to the property of Fourier transform, the first element of the sequence to be embedded is not modified, the sequence index is recorded as i from the second element, and the modified phase value is the original value plus P watermark sequence drips [ i ], until the watermark sequence is added.
If the watermark to be embedded is not a binary image, such as black or white, and if the number of pixel bits is 8, the pixel value is 255 or 0, the computer device converts the binary image into a binary image, and converts the pixels of the binary image (two-dimensional matrix) into a binary sequence with a value of-1 or 1 according to row priority or column priority, that is, the watermark sequence to be embedded is a pair.
Here, the step of acquiring the watermark to be embedded may occur at any stage prior to performing step 130.
In step 130.3, the computer device converts the DFT coefficients of the frequency domain into a time-domain complex sequence with embedded watermark by IDFT (inverse discrete fourier transform);
in step 130.4, the computer device converts the real part of the complex number into longitude and the complex part into latitude to obtain the point set embedded with the watermark, and replaces the corresponding part with the time-domain complex sequence embedded with the watermark.
It will be understood by those skilled in the art that the above embodiment is only an example of the process of embedding the watermark and is not intended to limit the present invention, and other existing or future ways of embedding the watermark, such as may be applicable to the present invention, are included in the scope of the present invention and are incorporated herein by reference.
According to the watermark embedding scheme of the invention, referring to the embodiment shown in fig. 1, the watermarked vector map still has better invisibility when other elements are overlaid, especially in a map use scene supporting zooming.
Fig. 3 shows a flow diagram of a method according to another embodiment of the invention, in which a process of embedding a watermark for a vector map is specifically shown.
As shown in FIG. 3, in step 310, the computer device obtains a first working set and an avoidance set in the vector map data; in step 320, the computer device filters a back-off set from the first working set to obtain a second working set in which a watermark can be embedded; in step 330, the computer device embeds a watermark sequence into the second working set; in step 340, the computer device performs bad watermark detection on the face objects after embedding the watermark sequence.
The operations performed in steps 310 and 330 are the same as or similar to the operations performed in steps 110 and 130 shown in fig. 1, and are not repeated herein. Step 340 will be described in detail below.
In step 340, the computer device performs bad watermark detection on the face objects after embedding the watermark sequence. Wherein the bad watermark detection comprises at least any one of:
1) detecting the self-intersection of each surface object embedded with the watermark sequence;
if a face object embedded with the watermark sequence has self-intersection, the computer equipment clears the watermark sequence in the face object.
Specifically, for example, the computer device performs topology check on each surface data separately, and if there is a topology error, clears the watermark sequence embedded in the surface.
2) Detecting the sharp angle of the point object in each object after the watermark sequence is embedded;
if the included angle between one point object and the connecting line of two adjacent point objects in the surface object embedded with the watermark sequence is smaller than the preset angle, the computer equipment adjusts the point object to be the middle point of the connecting line of the two adjacent point objects.
For example, for a point in a surface object after embedding the watermark sequence, if an angle formed by a connecting line between the point and its two adjacent points toward the surface object is smaller than a predetermined angle, for example, 0.34 (degree), the point is considered to constitute a sharp angle. Due to the nature of the fourier transform, adjusting the point to the midpoint of the line connecting two adjacent points can remove sharp corners and have little impact on watermark extraction. Further, the judgment of the sharp angle can also be combined with the length of the opposite side of the included angle of the point, for example, when the length of the opposite side is also less than 0.016 (degree), the point is considered to form the sharp angle.
3) Detecting the gland of the adjacent surface object in each surface object after embedding the watermark sequence;
if a face object after embedding the watermark sequence intersects an adjacent face object, the computer device marks the face object and returns to the filtering step 320 to filter and unmark each point object in the current face object again until each face object is unmarked.
Specifically, according to one embodiment of the present invention, the computer device checks whether the watermarked face intersects with an adjacent face, and if so, marks the face, e.g., as checked. Furthermore, if there is a face marked by a packet, the computer returns to the filtering step 320, and on the basis of the filtering policy, filters the face marked by the packet, that is, filters each point in the face marked by the packet again according to the back-off set, and then clears the face packet. Until there is no face marked by the checked, at which point watermark embedding is complete.
After the introduction of the detection of the bad watermark, the scheme of the invention can enhance the invisibility of the vector map digital watermark, so that a user can not easily find that the map is added with the watermark and the actual expression of the map is not influenced.
Fig. 4 shows a schematic diagram of an apparatus according to an embodiment of the present invention, in which an apparatus for embedding watermarks for vector maps is specifically shown.
As shown in fig. 4, the watermark embedding apparatus 40 is installed in the computer device 400, and the watermark embedding apparatus 40 specifically includes an obtaining apparatus 41, a filtering apparatus 42 and an embedding apparatus 43.
Wherein, the obtaining device 41 obtains a first working set and an avoidance set in the vector map data; filtering means 42 filters the back-off set from the first working set to obtain a second working set in which the watermark can be embedded; the embedding means 43 embed the watermark sequence in said second working set.
Specifically, the acquisition device 41 acquires a first working set and an avoidance set in the vector map data.
Here, the first working set includes all data sets to be watermarked in the vector map data. Typically, the first working set is a data set of line segments connected end to end that describe a political relationship. For example, when a watermark is embedded in a vector map describing a national relationship, a data set to be watermarked is country-level data, which is embodied as line segments connected end to end.
The avoidance set is used for limiting the range in which the watermark cannot be embedded in the vector map data. Typically, the avoidance set may be a set of points comprising reference data, wherein the reference data may comprise, for example, continents, rivers, lakes, and the like.
According to a preferred example of the invention, each point object of the surface objects in the first working set is constructed with an n-bit precision.
Here, the precision n may be adjusted according to the condition of the data to be embedded, and the smaller n is, the worse the effect will be in the use scene of the map supporting zooming is, in the case of fixing the watermark data to be embedded; the larger n, the more susceptible to user-perceived problems, such as jagged boundaries. In the embodiment in the present description, n is 6, for example, according to the data characteristics of the vector map.
Wherein the first working set includes a plurality of face objects, each face object including a plurality of point objects. For each point object in a surface object, it is reconstructed with n-bit precision to ensure the identity of neighboring point objects.
According to an example of the present invention, a reference point object is set with n-bit precision, an initial point object of the face object is compared with the reference point object for each face object, and when the initial point object and the reference point object do not coincide with each other, the initial point object is replaced with the reference point object and added to the current face object.
Next, the filtering means 42 filters the back-off set from the first working set to obtain a second working set in which the watermark can be embedded.
Here, for each surface object in the first working set, traversing the point object therein, and if the distance between the current point object and a point object in the dodge set is less than a predetermined distance length, filtering the current point object. That is, the filtered points cannot enter the data sequence in which the watermark is to be embedded.
Further, since the avoidance set usually includes land and major rivers and lakes around the world, which causes the above traversal method to be very computationally intensive and time-consuming, the present invention proposes an optimization filtering algorithm to optimize the computation time.
According to an embodiment of the present invention, the point objects in the dodge set are also reconstructed with n-bit precision, and a longitude list lons and a latitude list lats are obtained by respectively sorting the longitudes and latitudes of the point objects therein. Accordingly, for each point object in the surface objects of the first working set, with the current point object as an index, respectively searching for a point object whose distance from the current point object is less than half of the predetermined distance length in the longitude list and the latitude list to obtain an intersection of the point objects searched in the two lists; and if the distance between the current point object and one point object in the intersection is less than a preset distance length, filtering the current point object.
The larger the length is, the smaller the quantity of the insertable watermarks in the map is; the smaller the length, the more susceptible to user perception problems, such as jagged boundaries. In the embodiment in the present description, length is 0.2 (degrees) according to the characteristics of the vector map data.
Subsequently, the embedding means 43 embed the watermark sequence in the second working set.
Here, the acquisition operation of the watermark to be embedded may occur at any stage before the embedding device 43 performs the embedding operation.
If the watermark to be embedded is not a binary image, such as black or white, and if the number of pixel bits is 8, the pixel value is 255 or 0, the watermark acquisition device (not shown in fig. 4) in the watermark embedding device 40 converts the binary image into a binary image, and converts the pixels of the binary image (two-dimensional matrix) into a binary sequence with a value of-1 or 1 according to row priority or column priority, that is, the watermark sequence to be embedded is a pair.
According to the watermark embedding scheme of the invention, referring to the embodiment shown in fig. 4, the vector map after being added with the watermark still has good invisibility when other elements are superposed, especially in the map use scene supporting zooming.
Fig. 5 shows a schematic diagram of an apparatus according to another embodiment of the present invention, in which an apparatus for embedding watermarks into a vector map is specifically shown.
As shown in fig. 5, the watermark embedding apparatus 50 is installed in a computer device 500, and the watermark embedding apparatus 50 specifically includes an obtaining apparatus 51, a filtering apparatus 52, an embedding apparatus 53 and a detecting apparatus 54.
Wherein, the obtaining device 51 obtains a first working set and an avoidance set in the vector map data; filtering means 52 filters the back-off set from said first working set to obtain a second working set in which the watermark can be embedded; embedding means 53 embed the watermark sequence in said second working set; the detection means 54 performs a bad watermark detection on the respective face images after embedding the watermark sequence.
The operations performed by the acquiring device 51, the filtering device 52 and the embedding device 53 are the same as or similar to the operations performed by the acquiring device 41, the filtering device 42 and the embedding device 43 shown in fig. 4, and are not described again. The operation of the detection device 54 will be described in detail below.
Specifically, the detection device 54 performs bad watermark detection on the respective face images after embedding the watermark sequence. Wherein the bad watermark detection comprises at least any one of:
1) detecting the self-intersection of each surface object embedded with the watermark sequence;
if a face object after embedding the watermark sequence has self-intersection, the detection device 54 clears the watermark sequence in the face object.
Specifically, for example, the detection device 54 performs topology check on each surface data, and if there is a topology error, clears the watermark sequence embedded in the surface.
2) Detecting the sharp angle of the point object in each object after the watermark sequence is embedded;
if the angle between one point object and the connecting line of two adjacent point objects in the surface object embedded with the watermark sequence is smaller than the preset angle, the detection device 54 adjusts the point object to be the middle point of the connecting line of the two adjacent point objects.
For example, specifically, for example, for a point in a surface object after embedding the watermark sequence, if an angle formed by a connecting line between the point and its adjacent two points in the surface object is smaller than a predetermined angle, for example, 0.34 (degree), the detection device 54 considers that the point constitutes a sharp corner. Due to the nature of the fourier transform, adjusting the point to the midpoint of the line connecting two adjacent points can remove sharp corners and have little impact on watermark extraction. Further, the judgment of the sharp angle can also be combined with the length of the opposite side of the included angle of the point, for example, when the length of the opposite side is also less than 0.016 (degree), the point is considered to form the sharp angle.
3) Detecting the gland of the adjacent surface object in each surface object after embedding the watermark sequence;
if a face object after embedding the watermark sequence intersects an adjacent face object, the detection means 54 marks the face object and triggers the filtering means 52 to filter and unmark each point object in the current face object again by the filtering means 52 until each face object is unmarked.
In particular, according to an embodiment of the present invention, the detecting device 54 checks whether the watermarked surface intersects with an adjacent surface, and if so, marks the surface, for example, as checked. Furthermore, if there is a face marked by a packet, the filtering apparatus 52 is triggered, so that the filtering apparatus 52 filters the face marked by the packet based on the filtering policy, that is, each point in the face marked by the packet is filtered again according to the back-off set, and then the face packet is cleared. Until there is no face marked by the checked, at which point watermark embedding is complete.
After the introduction of the detection of the bad watermark, the scheme of the invention can enhance the invisibility of the vector map digital watermark, so that a user can not easily find that the map is added with the watermark and the actual expression of the map is not influenced.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, at least a portion of the present invention may be implemented as a computer program product, such as computer program instructions, which, when executed by a computing device, may invoke or provide methods and/or aspects in accordance with the present invention through operation of the computing device. Program instructions which invoke/provide the methods of the present invention may be stored on fixed or removable recording media and/or transmitted via a data stream over a broadcast or other signal-bearing medium, and/or stored in a working memory of a computing device operating in accordance with the program instructions.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
While exemplary embodiments have been particularly shown and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the claims. The protection sought herein is as set forth in the claims below. These and other aspects of the various embodiments are specified in the following numbered clauses:
1. a method for embedding a watermark in a vector map, the method comprising the steps of:
acquiring a first working set and an avoidance set in vector map data;
filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding a watermark sequence into the second working set.
2. The method of clause 1, wherein the first working set is a data set of line segments connected end to end describing a political relationship.
3. The method of clause 1, wherein the first working set comprises a plurality of face objects, each face object comprising a plurality of point objects, the point objects being reconstructed with n-bit precision.
4. The method according to clause 3, characterized in that the step of reconstructing specifically comprises:
setting a reference point object according to n-bit precision for each surface object, comparing an initial point object of the current surface object with the reference point object, and replacing the initial point object with the reference point object and adding the initial point object into the previous object when the initial point object and the reference point object are not consistent.
5. The method of clause 1, wherein the back-off set is used to define the range where a watermark cannot be inserted.
6. The method of clause 1, wherein the avoidance set is a set of points of reference data, the reference data including continents, rivers, and lakes.
7. The method according to clause 1, characterized in that the filtering step specifically comprises:
and traversing each point object of each surface object in the first working set, and filtering the current point object in the current surface object if the distance between each point object in the first working set and each point object in the avoidance set is less than a preset distance.
8. The method of clause 7, wherein point objects in the back-off set are reconstructed to n-bit precision;
respectively sequencing the longitudes and latitudes of each point object in the avoidance set to obtain a longitude list and a latitude list;
wherein the filtering step specifically comprises:
for each point object in the surface object, respectively searching a point object, the distance between which and the current point object is less than half of the preset distance, in the longitude list and the latitude list by taking the current point object as an index so as to obtain the intersection of the point objects searched in the two lists; and if the distance between the current point object and one point object in the intersection is less than the preset distance, filtering the current point object.
9. The method according to clause 1, characterized in that the method further comprises the steps of:
and acquiring a watermark sequence to be embedded into the vector map data.
10. The method according to clause 1, characterized in that the method further comprises the steps of:
and performing bad watermark detection on the face images after the watermark sequence is embedded.
11. The method of clause 10, wherein the bad watermark detection includes at least any one of:
-self-intersection detection of said face objects;
-detecting sharp corners of point objects in said respective pair of objects;
-gland detection of adjacent ones of said face objects.
12. The method of clause 11, wherein the bad watermark detection comprises self-intersection detection of the facet objects;
wherein, the method also comprises the following steps:
if a face object embedded with the watermark sequence has self-intersection, the watermark sequence in the face object is removed.
13. The method of clause 11, wherein the bad watermark detection includes sharp corner detection of point objects in the respective face objects;
wherein, the method also comprises the following steps:
if the included angle between one point object in the surface objects embedded with the watermark sequences and the connecting line of two adjacent point objects is smaller than the preset angle, the point object is adjusted to be the middle point of the connecting line of the two adjacent point objects.
14. The method of clause 11, wherein the bad watermark detection includes gland detection of adjacent ones of the face objects;
wherein, the method also comprises the following steps:
if a face object embedded with the watermark sequence intersects with an adjacent face object, marking the face object and returning to the filtering step so as to filter each point object in the current face object again and remove the mark until each face object is not marked.
15. An apparatus for embedding a watermark in a vector map, the apparatus comprising:
the acquiring device is used for acquiring a first working set and an avoidance set in the vector map data;
filtering means for filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding means for embedding the watermark sequence in said second working set.
16. The apparatus of clause 15, wherein the first working set is a data set of line segments connected end to end describing a political relationship.
17. The apparatus of clause 15, wherein the first working set comprises a plurality of face objects, each face object comprising a plurality of point objects, the point objects being reconstructed with n-bit precision.
18. The apparatus according to clause 17, wherein the reconstructing operation specifically comprises:
setting a reference point object according to n-bit precision for each surface object, comparing an initial point object of the current surface object with the reference point object, and replacing the initial point object with the reference point object and adding the initial point object into the previous object when the initial point object and the reference point object are not consistent.
19. The apparatus of clause 15, wherein the back-off set is configured to define a range in which a watermark cannot be inserted.
20. The apparatus of clause 15, wherein the avoidance set is a set of points of reference data, the reference data including continents, rivers, and lakes.
21. The apparatus according to clause 15, characterized in that the filtering operation comprises in particular:
and traversing each point object of each surface object in the first working set, and filtering the current point object in the current surface object if the distance between each point object in the first working set and each point object in the avoidance set is less than a preset distance.
22. The apparatus of clause 21, wherein point objects in the back-off set are reconstructed to n-bit precision;
respectively sequencing the longitudes and latitudes of each point object in the avoidance set to obtain a longitude list and a latitude list;
wherein the filtering operation specifically comprises:
for each point object in the surface object, respectively searching a point object, the distance between which and the current point object is less than half of the preset distance, in the longitude list and the latitude list by taking the current point object as an index so as to obtain the intersection of the point objects searched in the two lists; and if the distance between the current point object and one point object in the intersection is less than the preset distance, filtering the current point object.
23. The apparatus of clause 15, further comprising:
and the watermark acquisition device is used for acquiring the watermark sequence to be embedded into the vector map data.
24. The apparatus of clause 15, further comprising:
and the detection device is used for carrying out bad watermark detection on each face image after the watermark sequence is embedded.
25. The apparatus of clause 24, wherein the bad watermark detection includes at least any one of:
-self-intersection detection of said face objects;
-detecting sharp corners of point objects in said respective pair of objects;
-gland detection of adjacent ones of said face objects.
26. The method of clause 25, wherein the bad watermark detection comprises self-intersection detection of the facet objects;
wherein the detection device is further configured to:
if a face object embedded with the watermark sequence has self-intersection, the watermark sequence in the face object is removed.
27. The apparatus of clause 25, wherein the bad watermark detection includes sharp corner detection of point objects in the respective face objects;
wherein the detection device is further configured to:
if the included angle between one point object in the surface objects embedded with the watermark sequences and the connecting line of two adjacent point objects is smaller than the preset angle, the point object is adjusted to be the middle point of the connecting line of the two adjacent point objects.
28. The apparatus of clause 25, wherein the bad watermark detection includes gland detection of adjacent ones of the face objects;
wherein the detection device is further configured to:
if a face object embedded with the watermark sequence intersects with an adjacent face object, marking the face object and triggering the filtering device, so that each point object in the current face object is filtered again by the filtering device and marked until each face object is not marked.
29. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of clauses 1 to 14 when executing the computer program.
30. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of clauses 1 to 14.
31. A computer program product, characterized in that it implements the method according to any of clauses 1 to 14 when executed by a computer device.
Claims (10)
1. A method for embedding a watermark in a vector map, the method comprising the steps of:
acquiring a first working set and an avoidance set in vector map data;
filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding a watermark sequence into the second working set.
2. The method of claim 1, wherein the first working set is a data set of line segments that are end-to-end describing a political relationship.
3. The method of claim 1, wherein the first working set comprises a plurality of face objects, each face object comprising a plurality of point objects, the point objects being reconstructed with n-bit precision.
4. The method of claim 1, wherein the back-off set is used to define a range in which a watermark cannot be inserted.
5. An apparatus for embedding a watermark in a vector map, the apparatus comprising:
the acquiring device is used for acquiring a first working set and an avoidance set in the vector map data;
filtering means for filtering an avoidance set from the first working set to obtain a second working set in which a watermark can be embedded;
embedding means for embedding the watermark sequence in said second working set.
6. The apparatus of claim 5, wherein the first working set is a data set of line segments that are end-to-end describing a political relationship.
7. The apparatus of claim 5, wherein the first working set comprises a plurality of face objects, each face object comprising a plurality of point objects, the point objects being reconstructed with n-bit precision.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
10. A computer program product, characterized in that it implements the method according to any one of claims 1 to 4 when executed by a computer device.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2020101837625 | 2020-03-16 | ||
CN202010183762 | 2020-03-16 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111563835A true CN111563835A (en) | 2020-08-21 |
CN111563835B CN111563835B (en) | 2021-06-22 |
Family
ID=72071464
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010252198.8A Active CN111563835B (en) | 2020-03-16 | 2020-04-01 | Method and device for embedding watermark into vector map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111563835B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968757A (en) * | 2012-09-28 | 2013-03-13 | 浙江工业大学 | Vector map watermark embedding method and detection method based on virtual circle |
CN102982500A (en) * | 2012-09-28 | 2013-03-20 | 浙江工业大学 | Watermark embedding method and watermark detection method of vector map based on virtual grids |
CN103971324A (en) * | 2014-05-28 | 2014-08-06 | 中国人民解放军信息工程大学 | Asymmetric watermarking method for protecting vector map data copyright |
CN104680472A (en) * | 2014-08-02 | 2015-06-03 | 兰州交通大学 | Space domain and frequency domain combined vector spatial data multi-blind watermarking method |
CN105550971A (en) * | 2015-12-15 | 2016-05-04 | 南京师范大学 | Vector geographic data confidentiality level identification method based on distance ratio modulation |
CN106599727A (en) * | 2016-12-02 | 2017-04-26 | 江苏师范大学 | Vector map integrity authentication method |
CN110390620A (en) * | 2019-07-12 | 2019-10-29 | 浙江工商大学 | A kind of contour map data blind watermarking method based on curve Fourier transformation |
US20190349498A1 (en) * | 2014-08-12 | 2019-11-14 | Digimarc Corporation | Spot color substitution for encoded signals |
-
2020
- 2020-04-01 CN CN202010252198.8A patent/CN111563835B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968757A (en) * | 2012-09-28 | 2013-03-13 | 浙江工业大学 | Vector map watermark embedding method and detection method based on virtual circle |
CN102982500A (en) * | 2012-09-28 | 2013-03-20 | 浙江工业大学 | Watermark embedding method and watermark detection method of vector map based on virtual grids |
CN103971324A (en) * | 2014-05-28 | 2014-08-06 | 中国人民解放军信息工程大学 | Asymmetric watermarking method for protecting vector map data copyright |
CN104680472A (en) * | 2014-08-02 | 2015-06-03 | 兰州交通大学 | Space domain and frequency domain combined vector spatial data multi-blind watermarking method |
US20190349498A1 (en) * | 2014-08-12 | 2019-11-14 | Digimarc Corporation | Spot color substitution for encoded signals |
CN105550971A (en) * | 2015-12-15 | 2016-05-04 | 南京师范大学 | Vector geographic data confidentiality level identification method based on distance ratio modulation |
CN106599727A (en) * | 2016-12-02 | 2017-04-26 | 江苏师范大学 | Vector map integrity authentication method |
CN110390620A (en) * | 2019-07-12 | 2019-10-29 | 浙江工商大学 | A kind of contour map data blind watermarking method based on curve Fourier transformation |
Non-Patent Citations (3)
Title |
---|
LI, AN-BO 等: ""Copyright authentication of digital vector maps based on spatial autocorrelation indices"", 《EARTH SCIENCE INFORMATICS》 * |
刘京会 等: "《土地信息系统实验教程》", 31 January 2010 * |
曹阳 等: ""基于零水印和可逆水印的矢量地图多重水印算法"", 《华南师范大学学报(自然科学版)》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111563835B (en) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Kwon et al. | Learning jpeg compression artifacts for image manipulation detection and localization | |
Walia et al. | Digital image forgery detection: a systematic scrutiny | |
Lin et al. | Fast, automatic and fine-grained tampered JPEG image detection via DCT coefficient analysis | |
Zeng et al. | Image splicing localization using PCA-based noise level estimation | |
Al-Qershi et al. | Evaluation of copy-move forgery detection: datasets and evaluation metrics | |
Cao et al. | Edge-based Blur Metric for Tamper Detection. | |
CN111709883A (en) | Image detection method, device and equipment | |
CN113592698B (en) | Sixteen-element moment-based multi-view color image zero watermark processing method and system | |
Chen et al. | Screen-cam robust and blind watermarking for tile satellite images | |
CN105513014A (en) | Method and system for reconstruction of multiframe image super resolution | |
EP2195765A1 (en) | Enhanced image identification | |
Mahmood et al. | A passive technique for detecting copy-move forgeries by image feature matching | |
Wang et al. | Fast detection and segmentation of partial image blur based on discrete Walsh–Hadamard transform | |
Niu et al. | Fast quaternion log-polar radial harmonic fourier moments for color image zero-watermarking | |
Qi et al. | Improved reversible visible image watermarking based on HVS and ROI-selection | |
Meikap et al. | Improved center-folding based directional pixel value ordering for reversible data hiding scheme | |
Zhao et al. | Proactive image manipulation detection via deep semi-fragile watermark | |
CN111563835B (en) | Method and device for embedding watermark into vector map | |
CN111814543B (en) | Depth video object repairing and tampering detection method | |
Nikolaidis | Local distortion resistant image watermarking relying on salient feature extraction | |
CN116757903A (en) | Watermark embedding and extracting method and watermark processing device | |
Wang et al. | Image authentication based on perceptual hash using Gabor filters | |
Chaitra et al. | Digital image forgery: taxonomy, techniques, and tools–a comprehensive study | |
Niu et al. | GIS watermarking: hiding data in 2D vector maps | |
Lu et al. | Blind watermarking algorithm with 2D-SCCM chaotic system encryption based on SURF and RHFMs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: A408, Room 401, 4 / F, No.1, Wangjing East Road, Chaoyang District, Beijing 100102 Applicant after: Beijing perfect knowledge technology Co.,Ltd. Address before: Room 503-69, Building 29, No. 89 Heyuan Road, Jingjin science and Technology Valley Industrial Park, Wuqing District, Tianjin Applicant before: Tianjin perfect Gravity Technology Co.,Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |