CN116992408B - Watermark processing method and device for graphic mark - Google Patents

Watermark processing method and device for graphic mark Download PDF

Info

Publication number
CN116992408B
CN116992408B CN202311234581.0A CN202311234581A CN116992408B CN 116992408 B CN116992408 B CN 116992408B CN 202311234581 A CN202311234581 A CN 202311234581A CN 116992408 B CN116992408 B CN 116992408B
Authority
CN
China
Prior art keywords
graphic
determining
gradual change
processed
rectangular area
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
CN202311234581.0A
Other languages
Chinese (zh)
Other versions
CN116992408A (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.)
Xinzhihuitong Technologies Beijing Co ltd
Original Assignee
Xinzhihuitong Technologies Beijing 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 Xinzhihuitong Technologies Beijing Co ltd filed Critical Xinzhihuitong Technologies Beijing Co ltd
Priority to CN202311234581.0A priority Critical patent/CN116992408B/en
Publication of CN116992408A publication Critical patent/CN116992408A/en
Application granted granted Critical
Publication of CN116992408B publication Critical patent/CN116992408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0085Time domain based watermarking, e.g. watermarks spread over several images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0051Embedding of the watermark in the spatial domain
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0201Image watermarking whereby only tamper or origin are detected and no embedding takes place
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a watermark processing method and device of a graphic mark, and relates to the technical field of computer information processing. The watermark processing method of the graphic mark comprises the following steps: acquiring a graphic identifier to be processed; determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size; according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information; and performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target image. The scheme of the invention can weaken the visual influence of the watermark on the carrier graph, ensure the visual effect of the graph mark after embedding the watermark, resist the attack of printing and scanning, and has strong robustness.

Description

Watermark processing method and device for graphic mark
Technical Field
The invention relates to the technical field of computer information processing, in particular to a watermark processing method and device for graphic identifiers.
Background
Digital watermarking (Digital Watermarking) technology is a widely used technology in the fields of digital rights management, information security, privacy protection and the like, and relates to embedding specific identification information into digital content, so that the source and the use condition of the digital content can be effectively identified and tracked. However, in the daily application scenario, the digital watermarking technology often faces various attacks and threats, such as print scanning attack, graphic processing attack and cropping attack, which are one of the most common and challenging attack means at present, and an attacker prints out the material with the digital watermark and scans or photographs again, so as to try to remove the digital watermark or forge a new digital watermark to fool the detection system. The attack has the advantages of simplicity, easiness, low cost and the like, and can spread the digital content to an uncontrolled environment, thereby forming a great threat to copyright protection.
The prior digital watermarking algorithm can be divided into two types based on a transform domain and a space domain, wherein the transform domain-based method is used for converting an original graph into a frequency domain or a wavelet domain and then embedding the digital watermarking in a high-frequency sub-band, the method can improve the embedding capacity of the digital watermarking, but the robustness is low because the printing scanning operation damages a high-frequency part relied on when the digital watermarking is embedded, in contrast, the space domain-based method is more suitable for coping with printing scanning attacks, the digital watermarking is embedded by changing the brightness and the color of a pixel point, so that the stability of the digital watermarking in the printing scanning operation process is ensured, the method comprises the steps of respectively carrying out digital watermarking embedding on three channels RGB (Red, green, blue, color mode) by utilizing the perception of color change of human eyes, or converting the RGB color space into HSV, YCbCr and other color spaces for embedding, and the key of the method is how to embed the relationship between the concealment and the algorithm robustness is balanced.
Disclosure of Invention
The invention provides a watermark processing method and device for graphic identifiers, which can solve the problems that the watermark has great visual influence on a carrier graphic and the watermark is difficult to resist the attack of printing scanning in the prior art.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a method of watermarking a graphical identifier, the method comprising:
acquiring a graphic identifier to be processed;
determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size;
according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information;
and performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic.
Optionally, before determining the rectangular area according to the graphic identifier to be processed, the method further includes:
converting the filling color of the graphic mark to be processed from a first color space to a second color space;
the target components in the second color space are separated.
Optionally, determining a rectangular area according to the graphic identifier to be processed includes:
determining a plurality of circle centers in the graphic mark to be processed according to a preset radius;
constructing a grid image according to the circle center and the preset radius;
determining the distance between each pixel point in the grid image and the circle center;
and determining the rectangular area according to the distance and the target radius.
Optionally, determining the rectangular area according to the distance and the target radius includes:
generating a rectangular object with the same size as the grid image, and uniformly dividing the rectangular object according to the size of each pixel point to obtain square grid units formed by matrix arrangement;
marking a square grid cell corresponding to a pixel point with a distance smaller than or equal to a target radius in the grid image as 1, and marking a square grid cell corresponding to a pixel point with a distance larger than the target radius as 0 to obtain a rectangular region; the area formed by the square grid cells labeled 1 in the rectangular area is a modifiable area.
Optionally, according to the rectangular area, embedding the gradual change watermark information into the graphic identifier to be processed to obtain a graphic identifier object embedded with the gradual change watermark information, including:
determining a gradual change vector according to the original pixel average value and the embedding strength in the modifiable region;
determining a distance parameter between the centers of the square grid cells marked with 1 and the square grid cells marked with 0 according to each square grid cell marked with 1 in the rectangular area;
obtaining a target value according to the distance parameter and the gradual change vector;
and performing color assignment processing on the modifiable region through the target value to obtain a graphic identifier embedded with the gradual change watermark information.
Optionally, determining the gradient vector according to the original pixel average value and the embedding strength in the modifiable region includes:
determining a new color average value according to the original color average value and the embedding strength in the modifiable area;
and determining a gradual change vector according to the original color average value and the new color average value.
Optionally, performing color space conversion processing on the filling color of the graphic identifier embedded with the gradual change watermark information to obtain a target graphic, including:
combining the target component and the second color space;
and converting the filling color of the graphic mark embedded with the gradual change watermark information from the second color space to the first color space to obtain a target graphic.
An embodiment of the present invention further provides a watermark processing apparatus for graphic identifiers, which is characterized in that the apparatus includes:
the acquisition module is used for acquiring the graphic identifier to be processed;
the processing module is used for determining a rectangular area according to the graphic identifier to be processed; the rectangular block and the graphic mark to be processed have the same size; according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information; and performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic.
The scheme of the invention at least comprises the following beneficial effects:
according to the scheme, the graphic identifier to be processed is obtained; determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size; according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information; and performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic. Therefore, the visual influence of the watermark on the carrier graph can be weakened, the visual effect of the graph is ensured, the attack of printing scanning is resisted, and the robustness is strong.
Drawings
Fig. 1 is a schematic flow diagram of a watermarking method for graphic identifiers according to an embodiment of the present invention.
Fig. 2 is a schematic view of a first rectangular area according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a second rectangular area of distances from each pixel point to the center of the circle according to an embodiment of the present invention.
Fig. 4 is a schematic view of a third rectangular region of modifiable regions, in accordance with an embodiment of the present invention.
Fig. 5 is a flow diagram of a watermark embedding process for graphics according to an embodiment of the invention.
Fig. 6 is a flow diagram of a watermarking process for graphic identification according to an embodiment of the present invention.
Fig. 7 is a flow chart of a watermark extraction process of a graphic according to an embodiment of the present invention.
Fig. 8 is a block diagram of a watermark processing apparatus for graphic identification according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, an embodiment of the present invention provides a watermarking method for graphic identifiers, where the method includes:
step 11, obtaining a graphic identifier to be processed;
step 12, determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size;
step 13, according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain the graphic mark embedded with the gradual change watermark information;
and step 14, performing color space conversion processing on the graphic mark embedded with the gradual change watermark information to obtain a target graphic.
In the embodiment of the invention, by the watermark processing method of the graphic mark, the graphic mark embedded with the gradual change watermark information is obtained by embedding the gradual change watermark information into the graphic mark to be processed according to the rectangular area; performing color space conversion processing on the graphic mark embedded with the gradual change watermark information; the method can weaken the visual influence of the watermark on the carrier graph, ensure the visual effect of the graph, resist the attack of printing scanning, and has strong robustness.
In an optional embodiment of the present invention, before step 12, the method may further include:
step 12A, converting the filling color of the graphic mark to be processed from a first color space to a second color space;
step 12B, separating the target components in the second color space.
Wherein the first color space is RGB (one of the color spaces) and the second color space is YCbCr (one of the color spaces); the target component is a Y component.
In this embodiment, the filling color of the graphic identifier to be processed may be converted from an RGB color space to a YCbCr color space, and the Y component in the YCbCr color space may be separated, where the Y component is the brightness of the color, cb is the concentration offset of blue, and Cr is the concentration offset of null. Thus, the brightness is convenient to modify, and the gradual change effect of the watermark is realized.
In yet another alternative embodiment of the present invention, as shown in fig. 2 and 3, step 12 may include:
step 121, determining a plurality of circle centers in the graphic mark to be processed according to a preset radius; here, the number of the circle centers can be determined according to the number of bits to be embedded; when determining the circle center, the brightness component value of the graphic mark to be processed in the modifiable area formed by the circle center and the preset radius is required to be satisfied within the modifiable range; therefore, the out-of-range phenomenon of the brightness value of the pixel can be prevented, and the gradual change watermark information can be conveniently embedded into the pixels of the modifiable region to form a gradual change effect;
step 122, constructing a grid image according to the circle center and the preset radius;
step 123, determining the distance from each pixel point in the grid image to the circle center;
and 124, determining the rectangular area according to the distance and the target radius.
In particular implementations, step 124 may include:
step 1241, generating a rectangular object with the same size as the grid image, and uniformly dividing the rectangular object according to the size of each pixel point to obtain square grid units formed by matrix arrangement;
step 1242, marking a square grid cell corresponding to a pixel point with a distance smaller than or equal to the target radius in the grid image as 1, and marking a square grid cell corresponding to a pixel point with a distance larger than the target radius as 0, so as to obtain a rectangular area;
as shown in fig. 2, the area formed by square grid cells labeled 1 in the rectangular area is a modifiable area.
It should be noted that, the grid image may be obtained through a masking operation, and the square grid unit is used for marking a modifiable area of modifiable luminance pixel values; the target radius is the radius of the modifiable region.
In this embodiment, a plurality of circle centers are determined in the to-be-processed graphic identifier according to a preset radius, a grid image with the same size as the to-be-processed graphic identifier is constructed according to the plurality of circle centers and the preset radius, the distance from each pixel point in the grid image to the circle center is calculated, a rectangular object with the same size as the grid image is generated, and the rectangular object is uniformly segmented according to the size of each pixel point, so as to obtain a square grid unit formed by matrix arrangement; and marking the square grid cell corresponding to the pixel point with the distance smaller than or equal to the target radius in the grid image as 1, and marking the square grid cell corresponding to the pixel point with the distance larger than the target radius as 0 to obtain a rectangular region. Wherein the area formed by square grid cells marked with 1 in the rectangular area is a modifiable area; the grid image is constructed, so that the operation of pixel level on the graphic mark to be processed can be conveniently carried out; the modifiable area is determined by marking the pixel points according to the distance from each pixel point to the circle center in the grid image, so that the modifiable area is easy to realize.
In yet another alternative embodiment of the present invention, step 13 may include:
step 131, determining a gradual change vector according to the original pixel average value and the embedding strength in the modifiable region;
step 132, determining a distance parameter between the centers of the square grid cell marked with 1 and the square grid cell marked with 0 according to each square grid cell marked with 1 in the rectangular area;
step 133, obtaining a target value according to the distance parameter and the gradual change vector;
and step 134, performing color assignment processing on the modifiable area through the target value to obtain the graphic mark embedded with the gradual change watermark information.
In particular, step 131 may include:
step 1311, determining a new color average value according to the original color average value and the embedding strength in the modifiable area;
step 1312, determining a gradient vector according to the original color average value and the new color average value.
In this embodiment, pixel point assignment processing is performed on the modifiable area according to the distance parameter and the gradient vector, so as to obtain a graphic identifier embedded with gradient watermark information, so that the gradient watermark information can be embedded, and the visual effect of the graphic identifier is ensured.
In an alternative embodiment of the present invention, the determining process of the new pixel average value may include:
determining a new pixel average value according to the original pixel average value and the embedding strength in the modifiable area; wherein the new pixel average value is determined according to the binary number after BCH encoding;
in particular, according toDetermining a new pixel average value;
wherein,for a new pixel value,as the original pixel value is to be obtained,to embed strengthBinary numbers coded by the BCH;
the determining process of the binary number after BCH encoding may include:
and creating a BCH decoder object by using an encoding function in preset tool software, designating the encoding word length, the information bit number and the generator polynomial, receiving copyright information input by a user, and generating binary codes with check bits.
In still another alternative embodiment of the present invention, a target value is obtained according to the distance parameter and the gradient vector, and color assignment processing is performed for the modifiable area through the target value, so that a specific implementation process of obtaining the graphic identifier of embedded gradient watermark information may include:
the distance parameter can be mapped into the range of the gradual change vector through linear interpolation, and the obtained target value is assigned to the pixel point in the modifiable area, so that the gradual change effect can be realized;
the linear interpolation is a process of estimating a function value of the intermediate point by using a linear relation between two end points of the interval on the premise that the function is linearly changed between two adjacent nodes;
concrete embodimentsFor example, there are n known data points (X, Y), wherein,representing the position of a known data point in one dimensionRepresenting the corresponding function value;
due to the need for one locationEstimating, determining an interval based on the adjacent known data pointsSo thatThe method comprises the steps of carrying out a first treatment on the surface of the Then, according to the linear interpolation, the following calculation formula can be used to obtainFunction value at:
wherein,is the function value corresponding to the first end of the fade vector,is the function value corresponding to the second end point of the fade vector,to be used inMapping to a fade vectorA scaling factor within.
Wherein, the determining process of the distance parameter may include:
for each pixel marked 1 in the rectangular area, the minimum distance is subtracted and divided by the distance difference, resulting in a distance parameter ranging between [0,1], and the distance parameter is stored in the rectangular area.
The determining of the gradation vector may include:
and constructing an equidistant number sequence from the new pixel value to the original pixel value, wherein the length of the equidistant number sequence is a target radius, and the equidistant number sequence is taken as a gradual change vector.
In this embodiment, the gradient vector is used as the function value corresponding to the two end points of the interval through the above process, and the range of the gradient effect is represented, that is, the pixel value of the modifiable area gradually transits from the new pixel value to the original pixel value, while the rectangular area can provide the distance between each pixel point in the modifiable area and the circle center, the pixel value after modification of each point, that is, the target value, is calculated according to the distance, and the target value is assigned to the corresponding square grid unit in the modifiable area, so that the brightness value gradually changes from the circle center to the outside in the modifiable area, and the gradient effect similar to the radial effect is formed.
In yet another alternative embodiment of the present invention, step 14 may include:
step 141, combining the target component and the second color space;
and step 142, converting the graphic mark embedded with the gradual change watermark information from the second color space to the first color space to obtain a target graphic.
In this embodiment, the modified Y component is combined with Cb and Cr channels in the second color space, and the graphic identifier embedded with the gradient watermark information is converted from the YCbCr color space to the RGB color space, so as to obtain the target graphic.
In yet another alternative embodiment of the present invention, as shown in fig. 5, a specific implementation procedure of the watermarking method for graphic identification may include:
(1) Setting the code word length and the information bit number, and calculating BCH coding parameters;
(2) Reading a graphic identifier to be processed of an RGB color space, converting the graphic identifier to be processed of the RGB color space into a YCbCr color space, and modifying a Y component;
(3) Calculating the distance from each pixel point on the graph mark to be processed to the circle center, creating a binary matrix graph with the same size as the graph mark according to the target radius, and marking a modifiable area;
(4) Modifying the pixel value in the circular modifiable region to form a difference value with the circular ring outside the concentric modifiable region, wherein the positive and negative of the difference value correspond to 0 or 1 bit;
in the process, a gradual change effect is required to be calculated, a distance parameter is mapped into the range of the gradual change effect and is assigned to a pixel value in a circular modifiable area, so that the circular modifiable area presents a diffusion gradual change effect taking the center of a circle as the center while a specified difference value is formed;
(5) Repeating the steps (3) to (4) until all the center coordinates have data embedding, and finally combining the modified Y component in the graph embedded with the gradual change watermark information with Cb and Cr color spaces to be reconverted into a graph with color, namely RGB color space.
In another optional embodiment of the present invention, the process of performing experimental analysis on probabilities of correct extraction of a plurality of color graphics under different embedding intensities by using the watermarking method of the graphics identifier is as follows:
8 different graphic identifiers to be processed are selected as experimental samples, and the optimal size of the radius of the modifiable area is respectively determined;
the original watermark (15 bits, 11 information bits) is embedded in the 8 pieces of graphic identification with the embedding intensities of t=5, t=10, t=15 and t=20, respectively.
And (3) carrying out extraction experiments on each embedding strength, recording the times of success and failure of extraction, and increasing the repeated experiment times of each combination to 20 times or more for the purpose of making the result more accurate and reliable.
In the embodiment of the invention, the watermark processing method of the graphic mark is based on the characteristic that human eyes are insensitive to the brightness of the graphic, and adopts circular masks and linear interpolation to modify brightness components, so that the local gradual change of the color graphic is realized to embed copyright information, thereby increasing the dispersibility and concealment of watermark information and reducing the visual influence on carrier graphics;
when watermark information is extracted, embedded information is obtained by sampling and comparing local areas of the graph; because the watermark information is dispersedly embedded into each local area of the graph and is fused with the local brightness gradual change of the graph, the watermark information is not easy to be destroyed or forged even through printing and scanning operation, thereby ensuring the robustness of the algorithm;
the watermark processing method of the graphic mark really balances the problem of embedding concealment and robustness against a printing scanning algorithm, a local gradual change mode is used for embedding the watermark, a preselected position is taken as a circle center, and a brightness value gradually changes from the circle center to the outside in a circular area, so that a transition effect from dark to light or from light to dark, namely, a radial-like brightness gradual change is formed;
the watermark embedding mode based on local circular region gradual change is adopted, so that the robustness and invisibility of the watermark can be ensured. Meanwhile, the extracted basis is the difference value between the average pixel value of the gradual change circular area and the average pixel value of the concentric modifiable area, so that the interference of printing ink quality and the like can be effectively avoided, and besides, the steps of manually correcting perspective distortion and correcting errors by using BCH codes can be added, so that the anti-attack capability of the watermark can be enhanced to a certain extent.
As shown in fig. 6, in the above embodiment of the present invention, after the to-be-processed graphic identifier is obtained, the to-be-processed graphic identifier and the preset target graphic may be further subjected to color space conversion processing to obtain the graphic identifier embedded with the graded watermark information; and extracting the gradual change watermark information from the graphic mark embedded with the gradual change watermark information to obtain the gradual change watermark information.
In this embodiment, the to-be-processed graphic identifier and the target graphic are converted into the YCbCr color space by reading the to-be-processed graphic identifier and the manually corrected watermark graphic, that is, the target graphic, and the size of the to-be-processed graphic identifier is obtained at the same time, so that the watermark graphic to be compared is remodeled into the same size as the original graphic, thereby facilitating subsequent processing.
Further, circularly extracting pixel values of the circular modifiable area and the corresponding circular ring according to the corresponding stored circle center coordinates, respectively calculating average values and making differences, and then judging information embedded in the current circular modifiable area according to the average difference value; and performing BCH decoding on the extracted binary data to obtain corrected information bits, namely watermark information.
The gradual change watermark information can be extracted, so that the tracing and tracing of the leakage source and the anti-counterfeiting function are realized. It should be noted that, the extraction of the watermark information with gradual change may be achieved by photographing.
In yet another alternative embodiment of the present invention, as shown in fig. 7, a specific implementation process for extracting a watermark of a graphic identifier may include:
because perspective distortion may occur in the obtained color pattern with watermark, correction is needed by means of professional pattern processing software before formal extraction, the original carrier pattern and the color pattern with watermark are converted into YCbCr color space, Y component is obtained, mask extraction is performed on each modifiable area determined by known circle center coordinates, average difference value of pixel values in the annular area is calculated, and difference is made between the average pixel value of the annular area and the average pixel value of the inner circular area with the same circle center, so that gradual watermark information is obtained;
the specific implementation process is as follows:
(1) Constructing a grid image; the grid image is the same as the target graph in size, a binary rectangular area shown in fig. 4 is obtained through mask operation according to the circle center, the radius of the circular ring and the radius of the modifiable area, wherein a part marked with 1 is the required modifiable area, and a part marked with 0 in the middle corresponds to the modifiable area of the matrix graph shown in fig. 2 and 3;
it should be noted that, in the region represented by the circle with the reference number 1 in fig. 4, the new pixel average value in the graphic identifier to be processed is equal to the original pixel average value;
(2) Calculating the average value of pixels marked as 1 part in a third rectangular area shown in fig. 4 of the target graph and the average value of pixels marked as 1 part in a first rectangular area shown in fig. 2, calculating the difference value of the two average values of pixels, if the difference value is greater than 0, the extraction result is 0, otherwise, the extraction result is 1;
(3) And (3) circularly traversing all preset circle centers according to the steps (1) and (2), splicing the extraction results of each local area to obtain a binary code string, and performing error correction decoding by using the binary code string as input through a BCH encoder to obtain corrected gradual change watermark information.
It should be noted that, the method is a method corresponding to the watermark processing method of the graphic mark, and all implementation manners in the watermark processing method embodiment of the graphic mark are applicable to the embodiment of the method, so that the same technical effect can be achieved.
As shown in fig. 8, an embodiment of the present invention further provides a watermark processing apparatus 80 for graphics, the apparatus 80 including:
an obtaining module 81, configured to obtain a graphic identifier to be processed;
a processing module 82, configured to determine a rectangular area according to the graphic identifier to be processed; the rectangular block and the graphic mark to be processed have the same size; according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information; and performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic.
Optionally, the processing module 82 is further configured to: converting the filling color of the graphic mark to be processed from a first color space to a second color space; the target components in the second color space are separated.
Optionally, determining a rectangular area according to the graphic identifier to be processed includes:
determining a plurality of circle centers in the graphic mark to be processed according to a preset radius;
constructing a grid image according to the circle center and the preset radius;
determining the distance between each pixel point in the grid image and the circle center;
and determining the rectangular area according to the distance and the target radius.
Optionally, determining the rectangular area according to the distance and the target radius includes:
generating a rectangular object with the same size as the grid image, and uniformly dividing the rectangular object according to the size of each pixel point to obtain square grid units formed by matrix arrangement;
marking a square grid cell corresponding to a pixel point with a distance smaller than or equal to a target radius in the grid image as 1, and marking a square grid cell corresponding to a pixel point with a distance larger than the target radius as 0 to obtain a rectangular region; the area formed by the square grid cells labeled 1 in the rectangular area is a modifiable area.
Optionally, according to the rectangular area, embedding the gradual change watermark information into the graphic identifier to be processed to obtain a graphic identifier object embedded with the gradual change watermark information, including:
determining a gradual change vector according to the original pixel average value and the embedding strength in the modifiable region;
determining a distance parameter between the centers of the square grid cells marked with 1 and the square grid cells marked with 0 according to each square grid cell marked with 1 in the rectangular area;
obtaining a target value according to the distance parameter and the gradual change vector;
and performing color assignment processing on the modifiable region through the target value to obtain a graphic identifier embedded with the gradual change watermark information.
Optionally, determining the gradient vector according to the original pixel average value and the embedding strength in the modifiable region includes:
determining a new color average value according to the original color average value and the embedding strength in the modifiable area;
and determining a gradual change vector according to the original color average value and the new color average value.
Optionally, performing color space conversion processing on the filling color of the graphic identifier embedded with the gradual change watermark information to obtain a target graphic, including:
combining the target component and the second color space;
and converting the filling color of the graphic mark embedded with the gradual change watermark information from the second color space to the first color space to obtain a target graphic.
It should be noted that, the device is a device corresponding to the watermark processing method of the graphic identifier, and all implementation manners in the watermark processing method embodiment of the graphic identifier are applicable to the embodiment of the device, so that the same technical effect can be achieved.
Embodiments of the present invention also provide a computing device comprising: a processor, a memory storing a computer program which, when executed by the processor, performs the method as described above. All the implementation manners in the method embodiment are applicable to the embodiment, and the same technical effect can be achieved.
Embodiments of the present invention also provide a computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform a method as described above. All the implementation manners in the method embodiment are applicable to the embodiment, and the same technical effect can be achieved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
Furthermore, it should be noted that in the apparatus and method of the present invention, it is apparent that the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present invention. Also, the steps of performing the series of processes described above may naturally be performed in chronological order in the order of description, but are not necessarily performed in chronological order, and some steps may be performed in parallel or independently of each other. It will be appreciated by those of ordinary skill in the art that all or any of the steps or components of the methods and apparatus of the present invention may be implemented in hardware, firmware, software, or a combination thereof in any computing device (including processors, storage media, etc.) or network of computing devices, as would be apparent to one of ordinary skill in the art after reading this description of the invention.
The object of the invention can thus also be achieved by running a program or a set of programs on any computing device. The computing device may be a well-known general purpose device. The object of the invention can thus also be achieved by merely providing a program product containing program code for implementing said method or apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is apparent that the storage medium may be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is apparent that the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent aspects of the present invention. The steps of executing the series of processes may naturally be executed in chronological order in the order described, but are not necessarily executed in chronological order. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (6)

1. A method of watermarking a graphical representation, the method comprising:
acquiring a graphic identifier to be processed;
determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size;
according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information;
performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic;
determining a rectangular area according to the graphic identifier to be processed, including:
determining a plurality of circle centers in the graphic mark to be processed according to a preset radius;
constructing a grid image according to the circle center and the preset radius;
determining the distance between each pixel point in the grid image and the circle center;
determining the rectangular area according to the distance and the target radius;
wherein determining the rectangular region according to the distance and the target radius comprises:
generating a rectangular object with the same size as the grid image, and uniformly dividing the rectangular object according to the size of each pixel point to obtain square grid units formed by matrix arrangement;
marking a square grid cell corresponding to a pixel point with a distance smaller than or equal to a target radius in the grid image as 1, and marking a square grid cell corresponding to a pixel point with a distance larger than the target radius as 0 to obtain a rectangular region; the area formed by square grid cells marked with 1 in the rectangular area is a modifiable area;
and according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information, wherein the method comprises the following steps of:
determining a gradual change vector according to the original pixel average value and the embedding strength in the modifiable region;
determining a distance parameter between the centers of the square grid cells marked with 1 and the square grid cells marked with 0 according to each square grid cell marked with 1 in the rectangular area;
obtaining a target value according to the distance parameter and the gradual change vector;
performing color assignment processing on the modifiable region through the target value to obtain a graphic identifier embedded with the gradual change watermark information;
wherein determining a gradation vector according to the original pixel average value and the embedding strength in the modifiable region comprises:
determining a new color average value according to the original color average value and the embedding strength in the modifiable area;
and determining a gradual change vector according to the original color average value and the new color average value.
2. The method for watermarking a graphic identifier according to claim 1, wherein before determining a rectangular area according to the graphic identifier to be processed, further comprising:
converting the filling color of the graphic mark to be processed from a first color space to a second color space;
the target components in the second color space are separated.
3. The watermark processing method of a graphic mark according to claim 1, wherein performing color space conversion processing on a filling color of the graphic mark embedded with the graded watermark information to obtain a target graphic comprises:
combining the target component and the second color space;
and converting the filling color of the graphic mark embedded with the gradual change watermark information from the second color space to the first color space to obtain a target graphic.
4. A watermark processing apparatus for graphic identification, the apparatus comprising:
the acquisition module is used for acquiring the graphic identifier to be processed;
the processing module is used for determining a rectangular area according to the graphic identifier to be processed; the rectangular area is the same as the graphic mark to be processed in size; according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information; performing color space conversion processing on the graphic identification object embedded with the gradual change watermark information to obtain a target graphic;
determining a rectangular area according to the graphic identifier to be processed, including:
determining a plurality of circle centers in the graphic mark to be processed according to a preset radius;
constructing a grid image according to the circle center and the preset radius;
determining the distance between each pixel point in the grid image and the circle center;
determining the rectangular area according to the distance and the target radius;
wherein determining the rectangular region according to the distance and the target radius comprises:
generating a rectangular object with the same size as the grid image, and uniformly dividing the rectangular object according to the size of each pixel point to obtain square grid units formed by matrix arrangement;
marking a square grid cell corresponding to a pixel point with a distance smaller than or equal to a target radius in the grid image as 1, and marking a square grid cell corresponding to a pixel point with a distance larger than the target radius as 0 to obtain a rectangular region; the area formed by square grid cells marked with 1 in the rectangular area is a modifiable area;
and according to the rectangular area, embedding the gradual change watermark information into the graphic mark to be processed to obtain a graphic mark object embedded with the gradual change watermark information, wherein the method comprises the following steps of:
determining a gradual change vector according to the original pixel average value and the embedding strength in the modifiable region;
determining a distance parameter between the centers of the square grid cells marked with 1 and the square grid cells marked with 0 according to each square grid cell marked with 1 in the rectangular area;
obtaining a target value according to the distance parameter and the gradual change vector;
performing color assignment processing on the modifiable region through the target value to obtain a graphic identifier embedded with the gradual change watermark information;
wherein determining a gradation vector according to the original pixel average value and the embedding strength in the modifiable region comprises:
determining a new color average value according to the original color average value and the embedding strength in the modifiable area;
and determining a gradual change vector according to the original color average value and the new color average value.
5. A computing device, comprising: a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method of any one of claims 1 to 3.
6. A readable storage medium, characterized in that it stores thereon a program or instructions, which when executed by a processor, implement the steps of the method according to any of claims 1 to 3.
CN202311234581.0A 2023-09-25 2023-09-25 Watermark processing method and device for graphic mark Active CN116992408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311234581.0A CN116992408B (en) 2023-09-25 2023-09-25 Watermark processing method and device for graphic mark

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311234581.0A CN116992408B (en) 2023-09-25 2023-09-25 Watermark processing method and device for graphic mark

Publications (2)

Publication Number Publication Date
CN116992408A CN116992408A (en) 2023-11-03
CN116992408B true CN116992408B (en) 2023-12-22

Family

ID=88530441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311234581.0A Active CN116992408B (en) 2023-09-25 2023-09-25 Watermark processing method and device for graphic mark

Country Status (1)

Country Link
CN (1) CN116992408B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018279A (en) * 2006-02-07 2007-08-15 冲电气工业株式会社 Apparatus and method for embedding electronic watermark
CN111784556A (en) * 2020-06-23 2020-10-16 中国平安人寿保险股份有限公司 Method, device, terminal and storage medium for adding digital watermark in image
CN112040337A (en) * 2020-09-01 2020-12-04 腾讯科技(深圳)有限公司 Video watermark adding and extracting method, device, equipment and storage medium
CN115660933A (en) * 2022-11-02 2023-01-31 北京奕之宣科技有限公司 Method, device and equipment for identifying watermark information
CN116320657A (en) * 2023-04-03 2023-06-23 北京永新视博数字电视技术有限公司 Video watermarking method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10157437B2 (en) * 2013-08-27 2018-12-18 Morphotrust Usa, Llc System and method for digital watermarking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018279A (en) * 2006-02-07 2007-08-15 冲电气工业株式会社 Apparatus and method for embedding electronic watermark
CN111784556A (en) * 2020-06-23 2020-10-16 中国平安人寿保险股份有限公司 Method, device, terminal and storage medium for adding digital watermark in image
CN112040337A (en) * 2020-09-01 2020-12-04 腾讯科技(深圳)有限公司 Video watermark adding and extracting method, device, equipment and storage medium
CN115660933A (en) * 2022-11-02 2023-01-31 北京奕之宣科技有限公司 Method, device and equipment for identifying watermark information
CN116320657A (en) * 2023-04-03 2023-06-23 北京永新视博数字电视技术有限公司 Video watermarking method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Compressing Video using Asymmetric Algorithm and implementing Blind Video Watermarking Techniques;R.Sriramkumar 等;International Journal of Emerging Technology in Computer Science & Electronics;全文 *

Also Published As

Publication number Publication date
CN116992408A (en) 2023-11-03

Similar Documents

Publication Publication Date Title
Sreenivas et al. Fragile watermarking schemes for image authentication: a survey
EP1953752B1 (en) Embedding and detecting hidden information
US6959385B2 (en) Image processor and image processing method
US7046820B2 (en) Methods for digital watermarking of images and images produced thereby
CA2586274C (en) Mixed code, and method and apparatus for generating the same, and method and apparatus for decoding the same
US7065237B2 (en) Image processing apparatus and method
WO2018076409A1 (en) Method for realizing two dimensional code copy prevention and realization system thereof
US20010030759A1 (en) Image processing apparatus for determining specific images
US20010055390A1 (en) Image processor and image processing method
CN110766594A (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
CN104168484A (en) Video watermarking method based on visual attention mechanism
US20100142756A1 (en) Document security method
US6993148B1 (en) Image processing apparatus and method, and storage medium
CN102880999A (en) Color image digital watermark method capable of resisting stamping, printing and scanning processes
JPWO2008035401A1 (en) Digital watermark embedding device and detection device
Huang et al. Robust texture-aware local adaptive image watermarking with perceptual guarantee
CN116992408B (en) Watermark processing method and device for graphic mark
CN110417551B (en) Character and picture generation type camouflage and recovery method combined with error diffusion
Chen et al. Color image authentication and recovery via adaptive encoding
CN112488899B (en) Visual encryption color blind watermarking method based on repetition code and Schur decomposition
CN111612683A (en) Data processing method and system
JP3809310B2 (en) Image processing apparatus and method, and storage medium
CN111127288A (en) Reversible image watermarking method and device and computer readable storage medium
Qi et al. A print-scan-resilient watermarking scheme for trademark images
CN113344763B (en) Robust watermarking algorithm based on JND and oriented to screen shooting

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
GR01 Patent grant
GR01 Patent grant