CN108711131B - Watermark method and device based on image feature matching - Google Patents

Watermark method and device based on image feature matching Download PDF

Info

Publication number
CN108711131B
CN108711131B CN201810401357.9A CN201810401357A CN108711131B CN 108711131 B CN108711131 B CN 108711131B CN 201810401357 A CN201810401357 A CN 201810401357A CN 108711131 B CN108711131 B CN 108711131B
Authority
CN
China
Prior art keywords
image
feature
points
point
watermark
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.)
Active
Application number
CN201810401357.9A
Other languages
Chinese (zh)
Other versions
CN108711131A (en
Inventor
李晓妮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shuke Wangwei Technology Co ltd
Original Assignee
Beijing Shuke Wangwei Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Shuke Wangwei Technology Co ltd filed Critical Beijing Shuke Wangwei Technology Co ltd
Priority to CN201810401357.9A priority Critical patent/CN108711131B/en
Publication of CN108711131A publication Critical patent/CN108711131A/en
Application granted granted Critical
Publication of CN108711131B publication Critical patent/CN108711131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection

Abstract

The embodiment of the invention provides a watermark method and a watermark device based on image feature matching, wherein the method comprises the following steps: acquiring an image file sample set to be embedded with watermark information, and extracting line characteristics of all image files in the image text sample set; determining a stable characteristic point set according to the line characteristics of all the image files; after stable characteristic points in the stable characteristic point set are modified and watermark information is embedded, a watermark image is obtained; after stable characteristic points in the watermark image are matched, the embedded watermark information is extracted and identified. The invention embeds the watermark information by modifying the stable characteristic points, and the embedding of the watermark information does not depend on the watermark word stock any more, so the implementation process is simpler; the watermark algorithm has better robust performance, can resist the attacks of scaling and unequal resolution, and is widely suitable for identifying watermark information in images shot by devices such as a digital camera or a mobile phone; and by adopting image matching based on the characteristic information, the computation complexity of watermark information extraction and identification is lower.

Description

Watermark method and device based on image feature matching
Technical Field
The invention relates to the technical field of document protection and image processing, in particular to a watermarking method and a watermarking device based on image feature matching.
Background
In the big data era, with the popularization of networking and the improvement of information management level, the number of important documents in a plurality of enterprises and public institutions is increasing, and the documents are widely distributed in electronic and paper media. Wherein, the paper document can be transmitted in the forms of printing, scanning and copying; the electronic document can be easily copied and copied. Since the document content is easily obtained and tampered illegally in the document information dissemination process, it is very important to protect important documents. Digital watermarking technology plays a positive role in the information security of documents. Certain information having an identification function, such as document generation time, attribution of a document, and the like, is hidden in the confidential document data, and the hidden information is not visually visible. When the document is illegally acquired or copied, the source of the text can be tracked through the information hidden in the document extracted by a specific device so as to achieve the purposes of copyright protection and leakage tracing.
Among the document data, the specific gravity of the text document is relatively large. In the prior art, a text watermarking technology which can only be used in text with a fixed format exists, for example, watermark information is embedded by changing the character spacing or line spacing; there is another text watermarking technology based on document image, which must require using a binary image with the same size as the original document, turning over the pixels of a specific area in the binary image in a certain way to achieve the purpose of embedding the watermark, specifically by changing the brightness hidden information of the specific area of the document image; alternatively, watermark information may also be embedded by modifying the stroke width in the font. However, when the strokes of the font are small, the embedded watermark information is limited; moreover, when the document image is not a binary image, the above method is no longer applicable; in addition, for hiding information by changing the brightness of a specific region of a document image, a gray scale map generated after scanning can be used for detection, but the above techniques are not applicable when the document image is subjected to a scaling attack.
Aiming at the problem of poor adaptability of a text watermarking technology in the prior art, a watermarking method based on word stock modification is provided for improving the robustness of watermarking information embedded in a carrier. The chinese patent with patent application number 200510065893.9 and patent name "text digital watermarking technology based on character topological structure" proposes a text watermarking algorithm based on the topological structure of the character pattern, and the text digital watermarking technology mainly achieves the purpose of embedding and extracting the watermark by changing the number of the connected regions or the closed regions of the character pattern or mapping the font structure into a graph after changing the font topological structure and then utilizing the correlation principle of graph theory. The Chinese patent with the patent application number of 200510093364.X and the patent name of 'a document encryption method' provides a method for encrypting and identifying authenticity of an electronic document or a document. The invention automatically encrypts the electronic official documents or documents through the special word stock in the exchange or printing process of the official documents, so that each electronic official document or document printed by a receiving unit has slight difference on partial font, and a special code of the electronic official documents or documents is formed. For such special codes, identification can be made by hand or by OCR techniques to identify provenance and authenticity of documents or documents.
However, for the above technical solution of the text digital watermarking technology based on the character topology, there are the following problems: 1) the watermarking method needs the support of a special watermark character library, wherein different topological structures of each watermark character represent different watermark information bit strings. Therefore, the design workload of the watermark word stock is large; in addition, when the number of different topological structures of the font is large, the number of glyphs to be designed is correspondingly increased, and the volume of the font library file is also large. 2) The change of the topological structure is mainly embodied by the change of the connection and disconnection relation among the strokes, and the visual effect of the modified font is poor because the modification lacks a certain standard. Especially when the watermark character is displayed on a computer screen, in order to ensure that the photographing effect of the mobile phone is obvious, the stroke breaking amplitude must be increased, and therefore the visual effect of the watermark character is further reduced. 3) The extraction recognition rate of the watermarking algorithm is relatively low. After the text is printed out and copied, the number of the connected areas and the closed areas of the character image is easy to change. Especially for the photographed image, when the acquired text image is poor, errors of inter-stroke continuity relation are easily generated in the font, such as: the strokes which are originally close but not connected are adhered, the adhered strokes are broken, one original complete stroke is broken into a plurality of parts, even the whole stroke is lost, and the identification accuracy is seriously influenced by the phenomena.
However, for the technical solution of the above document encryption method, the following problems mainly exist: 1) the support of the watermark word stock is also needed, and the workload is large; 2) the modified character corresponds to new coding information, and the optical character recognition OCR module for automatic recognition can recognize the modified character only after special processing, so that the applicability is relatively poor. 3) The computation complexity of the watermark information extraction and identification process is high. During the identification of the watermark character, the characteristic vector of the character is calculated, then the characteristic vector is compared with all the character font deformation characteristic vectors one by one, the relative distance is calculated, the font structure with the shortest distance is regarded as the target watermark character, and the corresponding watermark information bit string is solved reversely. The feature vectors are consistent with the traditional OCR recognition method, the vector dimension is high, and in addition, the feature vectors of the font structures needing to be compared are more, so the calculation complexity is high. 4) Because the OCR also has certain errors, the accuracy of watermark information extraction can be further reduced.
Disclosure of Invention
The embodiment of the invention provides a watermark method and a watermark device based on image feature matching, which are used for solving the problems of dependence on a watermark word stock, high computation complexity in a watermark extraction process, poor visual effect of watermark characters, relatively low watermark information extraction and identification accuracy and the like in the prior art.
The first aspect of the embodiments of the present invention provides a watermark method based on image feature matching, including:
acquiring an image file sample set to be embedded with watermark information, and extracting line characteristics of all image files in the image text sample set;
determining a stable characteristic point set according to the line characteristics of all the image files;
after watermark information is embedded by modifying the stable characteristic points in the stable characteristic point set, a watermark image is obtained;
and after the stable characteristic points in the watermark image are matched, extracting and identifying the embedded watermark information.
The second aspect of the embodiments of the present invention provides a watermark method based on text image feature matching, including:
acquiring all character images in a text image file to be embedded with watermark information, and determining component unit sub-images forming each character image;
extracting structural feature points in the component unit sub-images;
after the watermark information is embedded by modifying the attribute of the structural feature point, a watermark image is obtained;
and after matching the structural feature points in the watermark image, extracting and identifying the embedded watermark information.
A third aspect of the embodiments of the present invention provides a watermark device based on image feature matching, including:
the first extraction module is used for acquiring an image file sample set to be embedded with watermark information and extracting line characteristics of all image files in the image text sample set;
the first determining module is used for determining a stable characteristic point set according to the line characteristics of all the image files;
the first embedding module is used for obtaining a watermark image after the stable characteristic points in the stable characteristic point set are modified to embed watermark information;
and the first identification module is used for extracting and identifying the embedded watermark information after matching the stable characteristic points in the watermark image.
A fourth aspect of the embodiments of the present invention provides a watermark apparatus based on text image feature matching, including:
the second determining module is used for acquiring all character images in the text image file to be embedded with the watermark information and determining component unit sub-images forming each character image;
the second extraction module is used for extracting structural feature points in the component unit sub-images;
the second embedding module is used for embedding the watermark information by modifying the attribute of the structural feature point to obtain a watermark image;
and the second identification module is used for extracting and identifying the embedded watermark information after matching the structural feature points in the watermark image.
A fifth aspect of the embodiments of the present invention provides a watermark terminal based on image feature matching, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement an image feature matching based watermarking method of the first aspect.
A sixth aspect of the embodiments of the present invention provides a watermark terminal based on text image feature matching, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement a text image feature matching based watermarking method according to the second aspect.
A seventh aspect of an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored;
the computer program is executed by a processor to implement an image feature matching based watermarking method according to the first aspect.
An eighth aspect of the embodiments of the present invention provides a computer-readable storage medium on which a computer program is stored;
the computer program is executed by a processor to implement a text image feature matching based watermarking method according to the second aspect.
According to the image feature matching-based watermark method and device provided by the embodiment of the invention, the watermark information is embedded by modifying the stable feature points in the stable feature point set, specifically, the watermark information can be embedded by changing the attribute of the disturbance feature points without manually designing a corresponding special watermark font library in advance, so that the embedding of the watermark information does not depend on the watermark font library any more, the implementation process is simpler, and the workload is reduced; the embedded watermark information is extracted and identified through the image matching information of the stable characteristic points, specifically, when the watermark information is extracted and identified, the image matching is carried out through the fixed characteristic points, then whether the attribute change occurs in the disturbed characteristic points compared with the original characteristic point state or not is judged, whether the watermark information is embedded or not is judged according to whether the attribute change occurs or not, so that the represented specific watermark bit string information is extracted, the robustness of a watermark algorithm is better, the attack of zooming and unequal resolutions can be resisted, and the method is widely suitable for the identification of the watermark information in the shot images of equipment such as a digital camera or a mobile phone; the image matching method based on the gray scale information is adopted, the key feature point information needing to be compared is less, and the calculation complexity of extracting and identifying the corresponding watermark information is lower, so that the practicability of the watermark method is improved, and the popularization and the application of the market are facilitated.
Drawings
Fig. 1 is a schematic flowchart of a watermarking method based on image feature matching according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a watermark method based on text image feature matching according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a partial Chinese character image beside a Chinese character according to an embodiment of the present invention;
fig. 4a is a schematic diagram of a type of a feature point of an image in the shape of a "blunt object" according to an embodiment of the present invention;
FIG. 4b is a schematic diagram of types of feature points of an image in a shape of "kou" according to an embodiment of the present invention;
FIG. 4c is a schematic diagram of the types of image feature points in a "wood" shape according to an embodiment of the present invention;
FIG. 4d is a schematic diagram of the types of feature points of the image in the shape of "small" according to an embodiment of the present invention;
FIG. 5 is a block diagram of a topology of building blocks provided by an embodiment of the present invention;
fig. 6a is a schematic diagram illustrating a method for modifying a feature point of a "blunt; straightforward" character according to an embodiment of the present invention;
FIG. 6b is a schematic diagram of a method for modifying feature points of a Chinese character 'kou' according to an embodiment of the present invention;
FIG. 6c is a schematic diagram of a method for modifying feature points of a word in a shape of "mu" according to an embodiment of the present invention;
FIG. 6d is a schematic diagram of a method for modifying feature points of a small word according to an embodiment of the present invention;
fig. 7 is a schematic grouping diagram of feature points according to an embodiment of the present invention;
fig. 8 is a schematic diagram for comparing the effect of the feature point method and the method for changing the topology structure provided in the embodiment of the present invention;
fig. 9 is a schematic structural diagram of a watermark apparatus based on image feature matching according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a watermark apparatus based on text image feature matching according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a watermark terminal based on text image/image feature matching according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention, are intended to cover non-exclusive inclusions, e.g., a process or an apparatus that comprises a list of steps is not necessarily limited to those structures or steps expressly listed but may include other steps or structures not expressly listed or inherent to such process or apparatus.
Fig. 1 is a schematic flow diagram of a watermarking method based on image feature matching according to an embodiment of the present invention, and it can be seen with reference to fig. 1 that the embodiment provides a watermarking method based on image feature matching, which can implement embedding and identification of a watermark on the premise of ensuring that a topological structure of a character or a character string is not changed, specifically, the method includes:
s101: acquiring an image file sample set to be embedded with watermark information, and extracting line characteristics of all image files in the image text sample set;
the image file sample set may include one or more image files, and the specific acquisition mode of the image file sample set may be directly input by a user or sent by the user. After the image file sample set is obtained, the image files in the image file sample set may be analyzed to obtain line features of all the image files, and specifically, extracting the line features of all the image files in the image text sample set may include:
s1011: carrying out binarization preprocessing on all image files to obtain a black-white binary image;
s1012: performing thinning operation on the black-white binary image to obtain a skeleton curve of the line;
the thinning operation is to remove some points from the black-and-white binary image, but the original shape is still to be maintained, that is, the skeleton of the black-and-white binary image is maintained.
S1013: and determining the skeleton curve segment with the continuous length exceeding the preset threshold length in the skeleton curve as the line characteristic.
The threshold length may be preset by a user, and a specific numerical range of the threshold length is not limited in this embodiment, and a person skilled in the art may set the threshold length according to a specific design requirement, and in order to ensure the accuracy and reliability of analysis processing based on line characteristics, the threshold length N is preferably greater than or equal to 10 pixels.
S102: determining a stable characteristic point set according to the line characteristics of all the image files;
after obtaining the line features of all the image files, analyzing the line features of all the image files to obtain a stable feature point set, specifically, determining the stable feature point set according to the line features of all the image files may include:
s1021: constructing a stable characteristic point model according to the line characteristics of all the image files and generating a stable characteristic point descriptor;
specifically, training and learning all the line features, classifying the line features of all the image files, selecting a representative element in each class, and calling the representative element as a stable feature point, wherein the stable feature point can keep consistent after being subjected to proportion, rotation and translation transformation in the image files; in addition, the feature point descriptor refers to the attribute value description of the feature point, and may include at least one of the following: relative positions of feature points, feature point types, and line feature vector quadrant distributions.
S1022: and selecting a stable characteristic point set by using the stable characteristic point model and according to the stable characteristic point descriptor.
Specifically, the line features of all image files are trained and learned, so that a stable feature point model is constructed, a stable feature point descriptor is generated, and the stable feature point descriptor can be stored in a preset knowledge base for subsequent use. Further, the selected stable feature point set can be divided into two groups, wherein one group is a fixed feature point, and the attribute of the fixed feature point is kept unchanged; another group of feature points are perturbation feature points, and the attribute of the perturbation feature points can be changed.
S103: after watermark information is embedded by modifying stable characteristic points in the stable characteristic point set, a watermark image is obtained;
after the stable feature point set is obtained, the stable feature points in the stable feature point set may be modified to achieve the purpose of embedding the watermark information, and specifically, the embedding the watermark information by dynamically modifying the stable feature points in the stable feature point set may include:
s1031: determining disturbance feature points in the stable feature point set, wherein the disturbance feature points are stable feature points of which the attributes in the stable feature point set can change;
s1032: and embedding watermark information by modifying the attribute value of the disturbance characteristic point.
S104: after stable characteristic points in the watermark image are matched, the embedded watermark information is extracted and identified.
Specifically, after matching the stable feature points in the watermark image, extracting and identifying the embedded watermark information may include:
s1041: extracting line features in the watermark image;
s1042: determining a fixed characteristic point and a disturbance characteristic point in a stable characteristic point set according to the line characteristics, wherein the fixed characteristic point is a stable characteristic point with unchanged attribute in the stable characteristic point set, and the disturbance characteristic point is a stable characteristic point with changeable attribute in the stable characteristic point set;
s1043: and performing image matching through the fixed characteristic points, and if the attribute of the disturbance characteristic points is changed compared with that of the original state, extracting and identifying the embedded watermark information according to the disturbance characteristic points.
The image matching refers to a process of identifying the same-name point between two or more images through a certain matching algorithm. The image matching mainly comprises the following steps: grayscale-based matching (grayscale matching) and feature-based matching (feature matching). The gray matching is based on pixels, and the feature matching is based on regions, and specifically, the feature matching refers to an algorithm that parameterizes and describes features (points, lines, planes and other features) by respectively extracting the features of two or more images, and then performs matching by using the described parameters. Features are the most abstract description of the image content, and are less likely to change with respect to geometric image and radiance effects than the grayscale matching method. Further, in the present embodiment, it is preferable to adopt a feature-based image matching method.
Specifically, image matching is performed by a preset criterion of similarity (similarity measure) of fixed feature points. Wherein, the similarity measure refers to what measure is used to determine the similarity between the features to be matched, and it is usually defined as some cost function or in the form of a distance function. Classical similarity measures include correlation functions and Minkowski distances, and in recent years Hausdorff distance, mutual information, has been proposed as a matching measure. In this embodiment, it is preferable to use the Minkowski distance as the criterion of the matching metric.
After the similarity criterion is determined, whether the attribute of the disturbed feature point is changed compared with the original feature point can be judged, so that whether the watermark information is embedded is judged, namely after the fixed feature point is accurately matched, whether the disturbed feature point is the same as the original feature point is compared, if so, the watermark information is represented as 0, otherwise, the watermark information is represented as 1; when the representative watermark information is 1, the representative watermark bit string information (i.e. the embedded watermark information) can be extracted according to the attribute change of the disturbance feature point. It should be noted that if the perturbation feature points change in more than one way, the change in the feature point attribute may represent multi-bit watermark information.
In the image feature matching-based watermark method provided by this embodiment, the watermark information is embedded by modifying the stable feature points in the stable feature point set, specifically, the watermark information can be embedded by changing the attribute of the disturbance feature points, and a corresponding special word library for watermark does not need to be manually designed in advance, so that the embedding of the watermark information does not rely on the watermark word library any more, the implementation process is simpler, and the workload is reduced; the embedded watermark information is extracted and identified through the image matching information of the stable characteristic points, specifically, when the watermark information is extracted and identified, the image matching is carried out through the fixed characteristic points, then whether the attribute change occurs in the disturbed characteristic points compared with the original characteristic point state or not is judged, whether the watermark information is embedded or not is judged according to whether the attribute change occurs or not, so that the represented specific watermark bit string information is extracted, the robustness of a watermark algorithm is better, the attack of zooming and unequal resolutions can be resisted, and the method is widely suitable for the identification of the watermark information in the shot images of equipment such as a digital camera or a mobile phone; the image matching method based on the gray scale information is adopted, the key feature point information needing to be compared is less, and the calculation complexity of extracting and identifying the corresponding watermark information is lower, so that the practicability of the watermark method is improved, and the popularization and the application of the market are facilitated.
Fig. 2 is a schematic flow chart of a watermark method based on text image feature matching according to an embodiment of the present invention, and as can be seen from fig. 2, another aspect of the present embodiment provides a watermark method based on text image feature matching, where the method includes:
s201: acquiring all character images in a text image file to be embedded with watermark information, and determining component unit sub-images forming each character image;
the character image can comprise a Chinese character image, component unit sub-images of Chinese characters are radicals of Chinese characters, and FIG. 3 is a schematic diagram of partial Chinese character radicals; therefore, one or more character images can be included in the character image file, and the specific acquisition mode of the character image file can be directly input by a user or transmitted by the user. After the character image file is acquired, all the character images in the character image file are analyzed to acquire a component unit sub-image of each character image.
S202: extracting structural feature points in the component unit sub-images;
the structural characteristic point is a structure formed by connecting one stroke with the other stroke at a non-end point in the process of forming the glyph by two discontinuous strokes of the character image. According to the difference of the font structure formed by the strokes, the types of the characteristic points can be divided into: 1) three-way points, if starting from the connection point of the stroke, there are three connected branches, and the length of each connected branch is greater than a preset threshold N1, such as the gray point in the left original drawing shown in fig. 4 a; 2) an inflection point, if starting from a connection point of the stroke, there are two connected branches, and an internal angle formed by two branch vectors is close to 90 degrees, such as a gray point in the left original drawing shown in fig. 4 b; 3) at the multi-branch point, starting from the connection point of the stroke, there are three or more connected branches, and the length of each connected branch is greater than a predetermined threshold N1, as shown in the middle point of fig. 4 c. 4) If the hook point starts from the connection point of the stroke, there are two connected branches, and the inner angle formed by the two branch vectors is close to 45 degrees, as shown in fig. 4 d. In the above fig. 4 a-4 d: triangles represent inflection points, rectangles represent trifurcations, circles represent colluding points, and pentagons represent multi-furcations.
Specifically, extracting the structural feature points in the component unit sub-image may include:
s2021: performing thinning processing on the component unit sub-images to obtain a skeleton curve;
in this embodiment, a classic Hilditch algorithm may be used to perform thinning processing on the character component sub-images.
S2022: and determining skeleton structure characteristic points on the skeleton curve, and determining the skeleton structure characteristic points as structure characteristic points in the component unit sub-images.
In a specific operation, in order to ensure convenient and reliable use of the watermarking method, after determining the structural feature points on the skeleton curve, the method may further include:
s2023: respectively adding a feature descriptor to each structural feature point, wherein the feature descriptor comprises at least one of the following: the relative position of the characteristic points, the type of the characteristic points and the quadrant distribution of the stroke line characteristic vectors;
s2024: and (3) constructing a topological structure diagram by distributing all the structural feature points according to preset relative positions, wherein each node is a structural feature point, and each edge is a stroke skeleton curve connecting two structural feature points.
The topology structure diagram may include: the method comprises the following steps that fixed characteristic points of a character image and disturbance characteristic points of the character image are obtained, wherein attribute value descriptor information of the fixed characteristic points is not changed before and after the watermark is embedded, and the attribute value descriptor information can be regarded as an anchor point for image matching; the perturbation feature points are used to embed watermark information. As shown in fig. 7, the gray areas represent feature points that disturb the feature points, and the remaining black areas represent fixed feature points.
After the topology structure diagram is constructed, the topology structure diagram may be stored in a preset knowledge base, wherein the topology structure diagram of each component unit may be regarded as a classification. As shown in fig. 5, fig. 5 is a topological structure diagram of a component unit.
In order to further ensure the accuracy of the use of the watermarking method, it is more preferable that before adding a feature descriptor to each structural feature point, the method further includes:
s2025: and filtering the component element sub-images without the structural feature points.
Such as: the Chinese character capital-digit character 'one' is removed because the Chinese character capital-digit character 'one' does not have the four characteristic point types, so that the accuracy and the reliability of the use of the watermarking method can be effectively improved.
S203: after the watermark information is embedded by modifying the attribute of the structural feature point, a watermark image is obtained;
when the document is output, reading a character image of a watermark carrier, and embedding watermark information by dynamically modifying the attribute of the structural feature point of the component unit sub-image, wherein the attribute of the structural feature point comprises at least one of the following: the relative position of the structural characteristic points, the type of the structural characteristic points and the quadrant distribution of the stroke line characteristic vectors; specifically, the embedding the watermark information by modifying the attribute of the structural feature point may include:
s2031: determining disturbance feature points in the structural feature points, wherein the disturbance feature points are structural feature points with changeable attributes;
s2032: and embedding watermark information by modifying the attribute value of the disturbance characteristic point.
Wherein, embedding watermark information by modifying the attribute value of the perturbation feature point may include:
watermark information is embedded by at least one of moving the position of the feature points, modifying the feature point type, and changing the stroke line feature vector quadrant distribution.
Further, after embedding the watermark information by modifying the attribute value of the perturbation feature point, the method further comprises:
s2033: obtaining a component unit sub-image where the modified disturbance feature point is located;
s2034: and replacing the original component unit sub-image with the modified component unit sub-image, and acquiring and outputting the replaced character image.
It should be noted that, the sequence of modifying the perturbation feature points and obtaining the modified construction unit sub-images is not limited, that is, the construction unit sub-images may be obtained first, and then the perturbation feature points in the construction unit sub-images are modified, which may specifically be: in the read carrier character image, the component composition of the character can be obtained according to the code of the carrier character, and the sub image blocks of the component unit are extracted; then, watermark information is embedded by modifying the attribute value of the structural characteristic point (disturbance characteristic point) in the sub image block; and finally, replacing the modified sub-image to the same position in the original character image block, and outputting. The two modes can realize the embedding of the watermark information and can effectively ensure the stability and the reliability of the embedding of the watermark information.
Modifying the attribute values of the structural feature points in the sub image blocks may include: 1) extracting all stable character structure feature points from the sub-image blocks, and changing descriptor attribute information of the feature points by dynamically modifying or moving one or more of relative positions of the feature points, changing types of the feature points or adjusting quadrant distribution of stroke line feature vectors; as shown in fig. 6 a-6 d, fig. 6a shows that the type of the feature point is unchanged, and the position of the feature point is shifted; FIG. 6b is a view of changing the inflection point to a triple point; FIG. 6c changes the quadrant distribution of the multi-point stroke branches; fig. 6d changes the quadrant distribution of the stroke branch vector of the tick point. Of course, other forms of attribute value definition and modification of structural feature points may be provided, such as changing the length of the stroked curve segment, changing the number of connected curve segments for a feature point, etc.
2) And (3) storing the component sub-images with the modified character structure characteristic points in a knowledge base in advance, and directly carrying out image replacement to realize the embedding operation of the watermark information.
As shown in fig. 8, a schematic diagram comparing the effect of the feature point modification method and the topology change method provided for the embodiment of the present invention is provided, where each line has three image elements, the leftmost image element is the original radical image element, the middle image element is the image element after feature point modification, and the right image element is the image element after topology change. The effect schematic diagram of the method in the embodiment of the invention is better from the graphic effect, wherein the comparison effect of the Chinese character 'Xiao' and the English letters 'a' and 'b' is particularly obvious.
S204: after structural feature points in the watermark image are matched, the embedded watermark information is extracted and identified.
Specifically, after matching the structural feature points in the watermark image, extracting and identifying the embedded watermark information may include:
s2041: dividing the watermark image into a plurality of character image blocks;
s2042: performing thinning processing on each character image block, and extracting all character image structure feature points;
s2043: reconstructing a topological structure diagram of the character structure feature points in each character image block according to all the character image structure feature points, searching a sub-topological structure diagram of the character image block by using a preset machine learning method, and classifying according to the sub-topological structure diagram;
s2044: and extracting and identifying the embedded watermark information according to the image matching difference between the reconstructed character structure feature point topological structure diagram and the original feature point topological structure diagram of the corresponding category.
Extracting and identifying the embedded watermark information according to the image matching difference between the reconstructed character structure feature point topological structure diagram and the original feature point topological structure diagram of the corresponding category may include:
s20441: matching the feature points of the original feature point topological structure chart with the fixed feature points of the reconstructed character structure feature point topological structure chart;
specifically, based on a similarity measure criterion, and by using a rigid body transformation model, searching and matching the feature points of the original feature point topological structure diagram (reference diagram) and the fixed feature points of the reconstructed character structure feature point topological structure diagram (diagram to be matched). The searching and matching can be completed by adopting a data structure of a k-d tree, and the searching content is that a reference image feature point which is most adjacent to the feature point of the image to be matched and an original image feature point which is next adjacent to the feature point of the image to be matched are searched by taking the fixed feature point of the image to be matched as a reference.
After the K-D tree of the data point set is established, the associated point positions of the characteristic points are searched in the K-D tree structure, and preliminary matching between the points is completed. The principle is as follows: setting a threshold value, and taking the feature point with the minimum Euclidean distance from the sample point of the reference image in the image to be matched as the nearest neighbor point, and calling the distance as the nearest neighbor distance; and taking the feature points which have Euclidean distances to the reference image sample point larger than the nearest neighbor point but smaller than all other points as next-neighbor points, and calling the distances as next-neighbor distances. And when the ratio of the nearest neighbor distance to the next nearest neighbor distance is smaller than a threshold value, the nearest neighbor point and the sample point are a matching point pair, otherwise, the nearest neighbor point and the sample point are not the matching point pair. The number of generated matching point pairs is related to the value of the threshold, if the threshold is large, the number of the matching point pairs is large, otherwise, the number of the matching point pairs is reduced. The threshold value is reasonably selected according to the image property, the number of the characteristic points and the like, if the value of the threshold value is too large, the originally unmatched point pairs are possibly identified as matched point pairs, and troubles are brought to image matching; if the threshold value is too small, the images may not be registered because enough valid matching point pairs cannot be detected. Specifically, the matching calculation process is as follows:
1) after finding out key points through a feature extraction algorithm, obtaining a reference image and a to-be-matched image feature point set A and a to-be-matched image feature point set B:
A={x 1 ,x 2 ,…,x m }m≥3;
B={y 1 ,y 2 ,…,y n }n≥3;
2)x i i is more than or equal to 1 and less than or equal to m, and is any point in the characteristic point set A. Calculate x i Nearest neighbor y in point set B j And the next nearest neighbor point y j* ,1≤j≤n,1≤j*≤n。
3) Given a threshold T, x is calculated separately i And its nearest neighbor y in point set B j And the next nearest neighbor point y j* Distance D (x) of i ,y j ) And D (x) i ,y j* ) If the value of the ratio of the two distances, distratito, is less than T:
Figure BDA0001645797810000141
then x i And y j Is a set of matching points. All satisfying the condition of double number (x) i ,y j ) The point pairs constitute a set of matching point pairs.
In addition, the rigid body transformation is a combination of translation, rotation and scaling, and is suitable for registration of two images from the same sensor from the same perspective but at different shooting positions. Under rigid body transformation model, if point (x) 1 ,y 1 ) And (x) 2 ,y 2 ) The two points are respectively corresponding to the reference image and the image to be registered, and the two points satisfy the following relation:
Figure BDA0001645797810000142
in order to increase the accuracy of image feature matching, the image to be registered is subjected to deviation rectification and normalization before image feature matching.
S20442: after all the fixed feature points are matched, matching the disturbance feature points of the reconstructed character structure feature point topological structure chart with the residual disturbance feature points in the original feature point topological structure chart;
s20443: and if the attribute of the disturbance feature point in the reconstructed topological structure diagram of the character structure feature point is changed, extracting and identifying the embedded watermark information according to the disturbance feature point of the reconstructed topological structure diagram of the character structure feature point.
The watermarking algorithm provided by the embodiment does not need to manually design a watermarking word stock in advance, but automatically extracts all feature points from a character image, and stores attribute descriptor information of the feature points in a knowledge base, so that the embedding of the watermarking information does not depend on the watermarking word stock any more, the implementation process is simpler, and the workload is effectively reduced; watermark information is embedded by dynamically changing the attribute values of part of feature points, and correspondingly the watermark information is extracted by an image feature matching method, instead of extracting the feature points in the whole character image, each character is divided into component units with smaller granularity and then extracted, so that the calculated amount of image matching is further reduced; the watermark information is extracted through the accurate matching of the character image characteristics, the robustness of the watermark algorithm is better, so that the method can resist the attacks of scaling and unequal resolution, and is widely suitable for the identification of the watermark information in the images shot by devices such as a digital camera or a mobile phone; in addition, the modification amplitude of the disturbance characteristic points in the character image is relatively small, and in addition, the topological structure of the character font is not changed, so that the visual effect of watermark information embedding is better.
Fig. 9 is a schematic structural diagram of a watermark apparatus based on image feature matching according to an embodiment of the present invention, and referring to fig. 9, the embodiment provides a watermark apparatus based on image feature matching, where the watermark apparatus may perform the above-mentioned watermark method based on image feature matching, and specifically, the apparatus includes:
the first extraction module 101 is configured to obtain an image file sample set to be embedded with watermark information, and extract line features of all image files in the image text sample set;
a first determining module 102, configured to determine a stable feature point set according to line features of all image files;
the first embedding module 103 is configured to obtain a watermark image after embedding watermark information by modifying stable feature points in the stable feature point set;
the first identification module 104 is configured to extract and identify the embedded watermark information by matching stable feature points in the watermark image.
When the first extraction module 101 extracts line features of all image files in the image text sample set, the first extraction module 101 is configured to perform: carrying out binarization preprocessing on all image files to obtain a black-white binary image; performing thinning operation on the black-white binary image to obtain a skeleton curve of the line; and determining the skeleton curve segment with the continuous length exceeding the preset threshold length in the skeleton curve as the line characteristic.
In addition, when the first determining module 102 determines the stable feature point set according to the line features of all the image files, the first determining module 102 is specifically configured to perform: constructing a stable characteristic point model according to the line characteristics of all the image files, and generating a stable characteristic point descriptor, wherein the characteristic point descriptor comprises at least one of the following components: the relative position of the characteristic points, the types of the characteristic points and the quadrant distribution of line characteristic vectors; and selecting a stable characteristic point set by using the stable characteristic point model and according to the stable characteristic point descriptor.
Furthermore, when the first embedding module 103 embeds watermark information by modifying stable feature points in the stable feature point set, the first embedding module 103 is configured to perform: determining disturbance feature points in the stable feature point set, wherein the disturbance feature points are stable feature points with changeable attributes in the stable feature point set; and (4) embedding watermark information by modifying the attribute value of the disturbance characteristic point.
Further, when the first identification module 104 extracts and identifies the embedded watermark information by stabilizing the image matching information of the feature points, the first identification module 104 is configured to perform: extracting line features in the watermark image; determining a fixed characteristic point and a disturbance characteristic point in a stable characteristic point set according to the line characteristics, wherein the fixed characteristic point is a stable characteristic point with unchanged attribute in the stable characteristic point set, and the disturbance characteristic point is a stable characteristic point with changeable attribute in the stable characteristic point set; and carrying out image matching through the fixed characteristic points, and if the attribute of the disturbance characteristic points is changed compared with the original state, extracting and identifying the embedded watermark information according to the disturbance characteristic points.
In this embodiment, specific shape structures of the first extraction module 101, the first determination module 102, the first embedding module 103, and the first identification module 104 are not limited, and those skilled in the art may arbitrarily set them according to their implemented functions, which is not described herein again; in addition, the specific implementation process and implementation effect of the operation step implemented by the first identification module 104 in this embodiment are the same as the specific implementation process and implementation effect of the operation step in the embodiment corresponding to fig. 1 in the foregoing embodiment, and the above statements may be specifically referred to, and are not repeated herein.
Fig. 10 is a schematic structural diagram of a watermark apparatus based on text image feature matching according to an embodiment of the present invention, and referring to fig. 10, another aspect of the present embodiment provides a watermark apparatus based on text image feature matching, where the watermark apparatus may perform the above watermark method based on character image feature matching, and specifically, the apparatus includes:
a second determining module 201, configured to acquire all character images in a character image file to be embedded with watermark information, and determine a component unit sub-image forming each character image;
a second extraction module 202, configured to extract structural feature points in the member unit sub-images;
the second embedding module 203 is configured to obtain a watermark image after embedding the watermark information by modifying the attribute of the structural feature point;
and the second identification module 204 is configured to extract and identify the embedded watermark information after matching the structural feature points in the watermark image.
Wherein the attribute of the structural feature point comprises at least one of: the relative position of the structural characteristic points, the type of the structural characteristic points and the quadrant distribution of the stroke line characteristic vectors; the character image comprises a Chinese character image, and component unit sub-images of the Chinese character are radicals of Chinese characters; the structural characteristic points are as follows: the discontinuous two strokes of the character image form a structure in the process of forming the font, wherein one stroke is connected with the other stroke at a non-end point.
Further, when the second extraction module 202 extracts the structural feature points in the component unit sub-image, the second extraction module 202 may be configured to: performing thinning processing on the component unit sub-images to obtain a skeleton curve; and determining skeleton structure characteristic points on the skeleton curve, and determining the skeleton structure characteristic points as structure characteristic points in the component unit sub-images.
In order to improve the utility of the device, the device may further comprise:
an adding module 205, configured to add a feature descriptor to each structural feature point after determining the structural feature point on the skeleton curve, where the feature descriptor includes at least one of: the relative position of the characteristic points, the type of the characteristic points and the quadrant distribution of the stroke line characteristic vectors;
a constructing module 206, configured to construct a topology structure diagram according to the preset relative position distribution of all the structural feature points, where each node is a structural feature point and an edge is a stroke skeleton curve connecting two structural feature points. Wherein, the topological structure chart includes: fixed feature points of the character image and disturbance feature points of the character image.
In order to further improve the accuracy of the use of the device, the device may further comprise:
a filtering module 207, configured to filter the component element sub-images without structural feature points before adding a feature descriptor to each structural feature point.
Further, when the second embedding module 203 embeds the watermark information by modifying the attribute of the structural feature point, the second embedding module 203 may be configured to perform: determining disturbance feature points in the structural feature points, wherein the disturbance feature points are structural feature points with changeable attributes; and embedding watermark information by modifying the attribute value of the disturbance characteristic point.
When the second embedding module 203 embeds the watermark information by modifying the attribute value of the perturbation feature point, the second embedding module 203 is specifically configured to: watermark information is embedded by at least one of moving the position of the feature points, modifying the feature point type, and changing the stroke line feature vector quadrant distribution.
Furthermore, the apparatus may further include:
an obtaining module 208, configured to obtain a component unit sub-image where the modified perturbation feature point is located after the watermark information is embedded by modifying the attribute value of the perturbation feature point;
and a replacing module 209, configured to replace the original component element sub-image with the modified component element sub-image, and acquire and output a replaced character image.
Further, when the second identification module 204 extracts and identifies the embedded watermark information through the image matching information of the structural feature points, the second identification module 204 may be configured to perform: dividing the watermark image into a plurality of character image blocks; performing fine-line processing on each character image block, and extracting all character image structure characteristic points; reconstructing a topological structure diagram of the character structure feature points in each character image block according to all the character image structure feature points, searching a sub-topological structure diagram of the character image block by using a preset machine learning method, and classifying according to the sub-topological structure diagram; and extracting and identifying the embedded watermark information according to the image matching difference between the reconstructed character structure feature point topological structure diagram and the original feature point topological structure diagram of the corresponding category.
When the second identifying module 204 extracts and identifies the embedded watermark information according to the image matching difference existing between the reconstructed topological structure diagram of the character structure feature points and the topological structure diagram of the original feature points of the corresponding category, the second identifying module 204 may be configured to perform: based on a preset similarity measure criterion and by using a rigid body transformation model, matching the feature points of the original feature point topological structure chart with the fixed feature points of the reconstructed character structure feature point topological structure chart; after all the fixed feature points are matched, matching the disturbance feature points of the reconstructed character structure feature point topological structure chart with the residual disturbance feature points in the original feature point topological structure chart; and if the attribute of the disturbance feature point in the reconstructed topological structure diagram of the character structure feature point is changed, extracting and identifying the embedded watermark information according to the disturbance feature point of the reconstructed topological structure diagram of the character structure feature point.
The watermark device based on character image feature matching provided by this embodiment can be used to execute the method in the embodiments of fig. 2 to 8, and the specific execution manner and the beneficial effects thereof are similar, and are not described herein again.
Another aspect of this embodiment also provides a watermark terminal based on image feature matching, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement one of the image feature matching based watermarking methods described above.
Still another aspect of the present embodiment provides a watermark terminal based on text image feature matching, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement one of the above-mentioned watermarking methods based on text image feature matching.
Specifically, fig. 11 is a schematic structural diagram of a watermark terminal based on text image/image feature matching according to an embodiment of the present invention.
As shown in fig. 11, the watermarking terminal 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the watermarking terminal 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the watermarking terminal 800. Examples of such data include instructions for any application or method operating on the watermarking terminal 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 806 provides power to the various components of the watermark terminal 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the watermarking terminal 800.
The multimedia component 808 includes a screen that provides an output interface between the watermarking terminal 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the watermarking terminal 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 814 includes one or more sensors for providing various aspects of state evaluation for the watermarking terminal 800. For example, the sensor component 814 may detect an open/closed status of the watermark terminal 800, the relative positioning of components, such as a display and keypad of the watermark terminal 800, the sensor component 814 may also detect a change in the location of the watermark terminal 800 or a component of the watermark terminal 800, the presence or absence of user contact with the watermark terminal 800, the orientation or acceleration/deceleration of the watermark terminal 800, and a change in the temperature of the watermark terminal 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. Sensor assembly 814 may also include a camera assembly, which may employ, for example, a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the watermarking terminal 800 and other devices in a wired or wireless manner. The watermarking terminal 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the watermarking terminal 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
Yet another aspect of embodiments of the present invention provides a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement the image feature matching-based watermarking method described above.
Yet another aspect of embodiments of the present invention provides a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement the above-described watermark method based on text image feature matching.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate, all or part of the processes in the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes in the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Each functional unit in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (26)

1. A watermark method based on image feature matching is characterized by comprising the following steps:
acquiring an image file sample set to be embedded with watermark information, and extracting line characteristics of all image files in the image file sample set;
determining a stable characteristic point set according to the line characteristics of all the image files;
after the stable characteristic points in the stable characteristic point set are modified and the watermark information is embedded, a watermark image is obtained;
after stable characteristic points in the watermark image are matched, extracting and identifying the embedded watermark information;
the embedding watermark information by modifying stable feature points in the stable feature point set includes:
determining a disturbance feature point in the stable feature point set, wherein the disturbance feature point is a stable feature point of which the attribute can change in the stable feature point set;
embedding the watermark information by modifying the attribute value of the disturbance characteristic point;
after the stable feature points in the watermark image are matched, extracting and identifying the embedded watermark information includes:
extracting line features in the watermark image;
determining a fixed characteristic point and a disturbance characteristic point in a stable characteristic point set according to the line characteristics, wherein the fixed characteristic point is a stable characteristic point of which the attribute in the stable characteristic point set does not change, and the disturbance characteristic point is a stable characteristic point of which the attribute in the stable characteristic point set can change;
and performing image matching through the fixed characteristic points, and if the attribute of the disturbance characteristic points is changed compared with the original state, extracting and identifying the embedded watermark information according to the disturbance characteristic points.
2. The method of claim 1, wherein extracting line features of all image files in the sample set of image files comprises:
carrying out binarization preprocessing on all image files to obtain a black-white binary image;
performing thinning operation on the black-white binary image to obtain a skeleton curve of a line;
and determining the skeleton curve segment with the continuous length exceeding the preset threshold length in the skeleton curve as the line characteristic.
3. The method of claim 1, wherein determining a stable feature point set from line features of all image files comprises:
constructing a stable characteristic point model according to the line characteristics of all the image files and generating a stable characteristic point descriptor, wherein the characteristic point descriptor comprises at least one of the following components: the relative position of the characteristic points, the types of the characteristic points and the quadrant distribution of line characteristic vectors;
and selecting a stable characteristic point set by using the stable characteristic point model and according to the stable characteristic point descriptor.
4. A watermark method based on text image feature matching is characterized by comprising the following steps:
acquiring all character images in a text image file to be embedded with watermark information, and determining component unit sub-images forming each character image;
extracting structural feature points in the component unit sub-images;
after the watermark information is embedded by modifying the attribute of the structural feature point, a watermark image is obtained;
extracting and identifying the embedded watermark information after matching the structural feature points in the watermark image;
the embedding of the watermark information by modifying the attribute of the structural feature point comprises:
determining disturbance feature points in the structural feature points, wherein the disturbance feature points are structural feature points with changeable attributes;
embedding watermark information by modifying the attribute value of the disturbance characteristic point;
after matching the structural feature points in the watermark image, extracting and identifying the embedded watermark information includes:
dividing the watermark image into a plurality of character image blocks;
performing fine-line processing on each character image block, and extracting all character image structure characteristic points;
reconstructing a topological structure diagram of the character structure feature points in each character image block according to all the character image structure feature points, searching a sub-topological structure diagram of the character image block by using a preset machine learning method, and classifying according to the sub-topological structure diagram;
matching the feature points of the original feature point topological structure diagram with the fixed feature points of the reconstructed character structure feature point topological structure diagram based on a preset similarity measure criterion and by using a rigid body transformation model;
after all the fixed feature points are matched, matching the disturbance feature points of the reconstructed character structure feature point topological structure chart with the residual disturbance feature points in the original feature point topological structure chart;
and if the attribute of the disturbance feature point in the reconstructed topological structure diagram of the character structure feature point is changed, extracting and identifying the embedded watermark information according to the disturbance feature point of the reconstructed topological structure diagram of the character structure feature point.
5. The method of claim 4, wherein extracting structural feature points in the building element sub-images comprises:
performing thinning processing on the component unit sub-images to obtain a skeleton curve;
and determining skeleton structure characteristic points on the skeleton curve, and determining the skeleton structure characteristic points as structure characteristic points in the component unit sub-images.
6. The method of claim 5, wherein after determining the structural feature points on the skeletal curve, the method further comprises:
respectively adding a feature descriptor to each structural feature point, wherein the feature descriptor comprises at least one of the following: the relative position of the characteristic points, the type of the characteristic points and the quadrant distribution of the stroke line characteristic vectors;
and (3) constructing a topological structure diagram by distributing all the structural feature points according to preset relative positions, wherein each node is a structural feature point, and each edge is a stroke skeleton curve connecting two structural feature points.
7. The method of claim 6, wherein prior to adding a feature descriptor separately for each structural feature point, the method further comprises:
and filtering the component unit sub-images without the structural feature points.
8. The method of claim 7, wherein the topological structure diagram comprises: fixed feature points of the character image and disturbance feature points of the character image.
9. The method of claim 4, wherein embedding watermark information by modifying the attribute value of the perturbation feature point comprises:
watermark information is embedded by at least one of moving the position of the feature points, modifying the feature point type, and changing the stroke line feature vector quadrant distribution.
10. The method according to claim 4, wherein after embedding watermark information by modifying the attribute value of the perturbation feature point, the method further comprises:
obtaining a component unit sub-image where the modified disturbance feature point is located;
and replacing the original component unit sub-image with the modified component unit sub-image, and acquiring and outputting the replaced character image.
11. The method according to any of claims 4-10, wherein the attributes of the structural feature points comprise at least one of: relative positions of the structural feature points, types of the structural feature points, and quadrant distribution of stroke line feature vectors.
12. The method of any one of claims 4-10, wherein the character image comprises a chinese kanji character image, and the component cell sub-images of the chinese kanji character are radicals of a chinese character.
13. The method according to any one of claims 4-10, wherein the structural feature points are: and a structure formed by connecting one stroke with the other stroke at a non-end point in the process of forming the font by two discontinuous strokes of the character image.
14. A watermark apparatus based on image feature matching, comprising:
the first extraction module is used for acquiring an image file sample set to be embedded with watermark information and extracting line characteristics of all image files in the image file sample set;
the first determining module is used for determining a stable characteristic point set according to the line characteristics of all the image files;
the first embedding module is used for obtaining a watermark image after the stable characteristic points in the stable characteristic point set are modified to embed watermark information;
the first identification module is used for extracting and identifying the embedded watermark information after matching the stable characteristic points in the watermark image;
the first embedded module is specifically configured to:
determining a disturbance feature point in the stable feature point set, wherein the disturbance feature point is a stable feature point of which the attribute can change in the stable feature point set;
embedding the watermark information by modifying the attribute value of the disturbance characteristic point;
the first identification module is specifically configured to:
extracting line features in the watermark image;
determining a fixed characteristic point and a disturbance characteristic point in a stable characteristic point set according to the line characteristics, wherein the fixed characteristic point is a stable characteristic point of which the attribute in the stable characteristic point set does not change, and the disturbance characteristic point is a stable characteristic point of which the attribute in the stable characteristic point set can change;
and performing image matching through the fixed characteristic points, and if the attribute of the disturbance characteristic points is changed compared with the original state, extracting and identifying the embedded watermark information according to the disturbance characteristic points.
15. The apparatus of claim 14, wherein the first extraction module is configured to:
carrying out binarization preprocessing on all image files to obtain a black-white binary image;
performing thinning operation on the black-white binary image to obtain a skeleton curve of a line;
and determining the skeleton curve segment with the continuous length exceeding the preset threshold length in the skeleton curve as the line characteristic.
16. The apparatus of claim 14, wherein the first determining module is configured to:
constructing a stable characteristic point model according to the line characteristics of all the image files and generating a stable characteristic point descriptor, wherein the characteristic point descriptor comprises at least one of the following components: the relative position of the characteristic points, the types of the characteristic points and the quadrant distribution of line characteristic vectors;
and selecting a stable characteristic point set by using the stable characteristic point model and according to the stable characteristic point descriptor.
17. A watermark device based on text image feature matching is characterized by comprising:
the second determining module is used for acquiring all character images in the text image file to be embedded with the watermark information and determining component unit sub-images forming each character image;
the second extraction module is used for extracting structural feature points in the component unit sub-images;
the second embedding module is used for embedding the watermark information by modifying the attribute of the structural feature point to obtain a watermark image;
the second identification module is used for extracting and identifying the embedded watermark information after matching the structural feature points in the watermark image;
the second embedded module is specifically configured to:
determining disturbance feature points in the structural feature points, wherein the disturbance feature points are structural feature points with changeable attributes;
embedding watermark information by modifying the attribute value of the disturbance characteristic point;
the second identification module is specifically configured to:
dividing the watermark image into a plurality of character image blocks;
performing thinning processing on each character image block, and extracting all character image structure feature points;
reconstructing a topological structure diagram of the character structure feature points in each character image block according to all the character image structure feature points, searching a sub-topological structure diagram of the character image block by using a preset machine learning method, and classifying according to the sub-topological structure diagram;
matching the feature points of the original feature point topological structure diagram with the fixed feature points of the reconstructed character structure feature point topological structure diagram based on a preset similarity measure criterion and by using a rigid body transformation model;
after all the fixed feature points are matched, matching the disturbance feature points of the reconstructed character structure feature point topological structure chart with the residual disturbance feature points in the original feature point topological structure chart;
and if the attribute of the disturbance feature point in the reconstructed topological structure diagram of the character structure feature point is changed, extracting and identifying the embedded watermark information according to the disturbance feature point of the reconstructed topological structure diagram of the character structure feature point.
18. The apparatus of claim 17, wherein the second extraction module is configured to:
performing thinning processing on the component unit sub-images to obtain a skeleton curve;
and determining skeleton structure characteristic points on the skeleton curve, and determining the skeleton structure characteristic points as structure characteristic points in the component unit sub-images.
19. The apparatus of claim 18, further comprising:
an adding module, configured to add a feature descriptor to each structural feature point after determining the structural feature point on the skeleton curve, where the feature descriptor includes at least one of: the relative position of the characteristic points, the type of the characteristic points and the quadrant distribution of the stroke line characteristic vectors;
and the construction module is used for constructing a topological structure diagram by distributing all the structural feature points according to preset relative positions, wherein each node is a structural feature point, and the edge is a stroke skeleton curve connecting the two structural feature points.
20. The apparatus of claim 19, further comprising:
and the filtering module is used for filtering the component unit sub-images without the structural feature points before adding the feature descriptors to each structural feature point.
21. The apparatus of claim 19, wherein the topology structure diagram comprises: fixed feature points of the character image and disturbance feature points of the character image.
22. The apparatus of claim 17, wherein the second embedding module is configured to:
watermark information is embedded by at least one of moving the position of the feature points, modifying the feature point type, and changing the stroke line feature vector quadrant distribution.
23. The apparatus of claim 17, further comprising:
the acquisition module is used for acquiring a component unit sub-image where the modified disturbance characteristic point is located after the watermark information is embedded by modifying the attribute value of the disturbance characteristic point;
and the replacing module is used for replacing the modified component unit sub-image with the original component unit sub-image, and acquiring and outputting the replaced character image.
24. The apparatus according to any of claims 17-23, wherein the attributes of the structural feature points comprise at least one of: relative positions of the structural feature points, types of the structural feature points, and quadrant distribution of stroke line feature vectors.
25. An apparatus according to any one of claims 17 to 23, wherein the character image comprises a chinese kanji character image, component unit sub-images of which are radicals of a kanji character.
26. The apparatus according to any one of claims 17-23, wherein the structural feature points are: and a structure formed by connecting one stroke with the other stroke at a non-end point in the process of forming the font by two discontinuous strokes of the character image.
CN201810401357.9A 2018-04-28 2018-04-28 Watermark method and device based on image feature matching Active CN108711131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810401357.9A CN108711131B (en) 2018-04-28 2018-04-28 Watermark method and device based on image feature matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810401357.9A CN108711131B (en) 2018-04-28 2018-04-28 Watermark method and device based on image feature matching

Publications (2)

Publication Number Publication Date
CN108711131A CN108711131A (en) 2018-10-26
CN108711131B true CN108711131B (en) 2022-08-16

Family

ID=63868780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810401357.9A Active CN108711131B (en) 2018-04-28 2018-04-28 Watermark method and device based on image feature matching

Country Status (1)

Country Link
CN (1) CN108711131B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110514675B (en) * 2019-08-29 2020-12-11 珠海格力电器股份有限公司 Intelligent detection method and system for label
CN110852102B (en) * 2019-11-14 2023-09-05 北京香侬慧语科技有限责任公司 Chinese part-of-speech tagging method and device, storage medium and electronic equipment
CN110992561B (en) * 2019-11-25 2020-08-07 深圳市菲格特智能科技有限公司 Security verification method and access control system
CN112634120A (en) * 2020-12-30 2021-04-09 暨南大学 Image reversible watermarking method based on CNN prediction
CN114419719B (en) * 2022-03-29 2022-08-12 北京爱笔科技有限公司 Biological characteristic processing method and device
CN114998086B (en) * 2022-07-28 2022-10-21 合肥高维数据技术有限公司 Method for manufacturing test sample of screen invisible watermark embedding program and test method
CN116503880B (en) * 2023-06-29 2023-10-31 武汉纺织大学 English character recognition method and system for inclined fonts

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000013136A1 (en) * 1998-08-31 2000-03-09 Digital Video Express, L.P. Watermarking system and methodology for digital multimedia content
CN101593247A (en) * 2008-06-01 2009-12-02 朱烽 Utilize the literal body characteristics to carry the text digital water mark technology of watermark information
CN102968582A (en) * 2012-12-13 2013-03-13 北京大学 Text watermark embedding and extracting method based on character structure characteristics
CN103500296A (en) * 2013-09-29 2014-01-08 北京溯源鸿业科技有限公司 Inlaying method and device of digital watermarks in text documents
CN103632381A (en) * 2013-12-08 2014-03-12 中国科学院光电技术研究所 Method for tracking extended targets by means of extracting feature points by aid of frameworks
CN104281993A (en) * 2014-07-29 2015-01-14 山东科技大学 Rotary attack resisting digital watermarking method based on visual encrypting and feature point matching
CN107066844A (en) * 2017-04-12 2017-08-18 李晓妮 A kind of method and apparatus of paper document security management and control and tracing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100364326C (en) * 2005-12-01 2008-01-23 北京北大方正电子有限公司 Method and apparatus for embedding and detecting digital watermark in text file

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000013136A1 (en) * 1998-08-31 2000-03-09 Digital Video Express, L.P. Watermarking system and methodology for digital multimedia content
CN101593247A (en) * 2008-06-01 2009-12-02 朱烽 Utilize the literal body characteristics to carry the text digital water mark technology of watermark information
CN102968582A (en) * 2012-12-13 2013-03-13 北京大学 Text watermark embedding and extracting method based on character structure characteristics
CN103500296A (en) * 2013-09-29 2014-01-08 北京溯源鸿业科技有限公司 Inlaying method and device of digital watermarks in text documents
CN103632381A (en) * 2013-12-08 2014-03-12 中国科学院光电技术研究所 Method for tracking extended targets by means of extracting feature points by aid of frameworks
CN104281993A (en) * 2014-07-29 2015-01-14 山东科技大学 Rotary attack resisting digital watermarking method based on visual encrypting and feature point matching
CN107066844A (en) * 2017-04-12 2017-08-18 李晓妮 A kind of method and apparatus of paper document security management and control and tracing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Researches on Text Image Watermarking Scheme Based on the Structure of Character Glyph;LIU Yuxin et al;《Mechanics and Materials》;20150129;第163-168页 *
一种基于SIFT特征的抗几何攻击水印算法研究;贾超等;《军械工程学院学报》;20131015(第05期);第52-57页 *
基于特征点的遥感影像地图版权保护方法的研究;杨猛;《中国优秀硕士学位论文全文数据库》;20120515(第05期);第I140-886页 *
静态图像数字水印算法研究;周玲余;《中国优秀博硕士学位论文全文数据库 (硕士)》;20060315(第03期);第I138-26页 *

Also Published As

Publication number Publication date
CN108711131A (en) 2018-10-26

Similar Documents

Publication Publication Date Title
CN108711131B (en) Watermark method and device based on image feature matching
US20220335561A1 (en) Embedding signals in a raster image processor
Amerini et al. Copy-move forgery detection and localization by means of robust clustering with J-Linkage
Fang et al. A camera shooting resilient watermarking scheme for underpainting documents
CN109343920B (en) Image processing method and device, equipment and storage medium thereof
US9916499B2 (en) Method and system for linking printed objects with electronic content
CN107545049B (en) Picture processing method and related product
Nie et al. Robust image fingerprinting based on feature point relationship mining
CN106127222B (en) A kind of the similarity of character string calculation method and similitude judgment method of view-based access control model
Lin et al. Region duplication detection based on image segmentation and keypoint contexts
Singh et al. SiteForge: Detecting and localizing forged images on microblogging platforms using deep convolutional neural network
CN111222585A (en) Data processing method, device, equipment and medium
WO2015032308A1 (en) Image recognition method and user terminal
CN110298811B (en) Image preprocessing method, device, terminal and computer readable storage medium
CN112116565B (en) Method, apparatus and storage medium for generating countersamples for falsifying a flip image
Nawaz et al. Image authenticity detection using DWT and circular block-based LTrP features
CN111027545A (en) Card picture mark detection method and device, computer equipment and storage medium
Oh et al. Low-complexity and robust comic fingerprint method for comic identification
CN113468906B (en) Graphic code extraction model construction method, identification device, equipment and medium
CN113610090A (en) Seal image identification and classification method and device, computer equipment and storage medium
Zhao et al. Partial-duplicate image retrieval based on HSV colour space for coverless information hiding
US20150379751A1 (en) System and method for embedding codes in mutlimedia content elements
Hou et al. New framework for unsupervised universal steganalysis via SRISP-aided outlier detection
RU2739936C1 (en) Method of adding digital labels to digital image and apparatus for realizing method
CN117593596B (en) Sensitive information detection method, system, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220715

Address after: Room 701, floor 7, building 1, No. 1, driveway ditch, Haidian District, Beijing 100089

Applicant after: BEIJING SHUKE WANGWEI TECHNOLOGY Co.,Ltd.

Address before: 100081 2205-1, 19th floor, building 3, 34 Zhongguancun South Street, Haidian District, Beijing

Applicant before: SOFOSOFI TECH. CO.,LTD.

GR01 Patent grant
GR01 Patent grant