CN111612683A - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN111612683A
CN111612683A CN202010271175.1A CN202010271175A CN111612683A CN 111612683 A CN111612683 A CN 111612683A CN 202010271175 A CN202010271175 A CN 202010271175A CN 111612683 A CN111612683 A CN 111612683A
Authority
CN
China
Prior art keywords
target
macro block
image
original image
pixel
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.)
Pending
Application number
CN202010271175.1A
Other languages
Chinese (zh)
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010271175.1A priority Critical patent/CN111612683A/en
Publication of CN111612683A publication Critical patent/CN111612683A/en
Pending legal-status Critical Current

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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0062Embedding of the watermark in text images, e.g. watermarking text documents using letter skew, letter distance or row distance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The present disclosure provides a data processing method and system, which relates to the technical field of electronic information and can solve the problem of difficulty in identification when watermarking is performed on an image. The specific technical scheme is as follows: determining a target resolution of a target mask image by determining a target macro block in an original image, and establishing a corresponding relation between the macro block and a pixel point in the target mask image; and generating a target mask image according to the target resolution and a preset mark graph, and modifying a target macro block according to the target mask image, so that the target mask is embedded in the target image. The present disclosure is directed to processing of image watermarks.

Description

Data processing method and system
Technical Field
The present disclosure relates to the field of electronic information technologies, and in particular, to a data processing method and system.
Background
The digital watermarking technology is to embed some identification information, namely digital watermark, directly into a digital carrier or indirectly express the identification information, without affecting the use value of the original carrier, and the identification information is not easy to be detected and modified again, wherein the indirect expression can comprise the modification of the structure of a specific area, and the digital carrier comprises multimedia, documents, software and the like. But can be recognized and recognized by the producer by decoding the image. The information hidden in the carrier can achieve the purposes of confirming content creators and purchasers, transmitting secret information, judging whether the carrier is tampered or not and the like. Digital watermarking is an effective method for protecting information safety, realizing anti-counterfeiting tracing and copyright protection, and is an important branch and research direction in the field of information hiding technology research.
In the prior art, digital watermarks include two types of transparent watermarks and opaque watermarks, wherein the opaque watermarks achieve the same effect as the transparent watermarks on the premise of not affecting visual effects, and have stronger robustness and tamper resistance, so the digital watermarks have good safety.
The transparent digital watermarking algorithm is mainly focused in the spatial domain direction and the frequency domain direction. Spatial algorithms embed information on the least significant pixel bits of randomly selected image points, which ensures that the embedded watermark is invisible. Most of frequency domain algorithms change an image into a frequency domain, and then a watermark is embedded at an intermediate frequency end, so that the invisible of the watermark is also ensured. The frequency domain algorithm has better robustness and attack resistance, and is adopted by most digital watermarking schemes.
However, the two digital watermarking technologies in the space domain and the frequency domain have seriously reduced attack resistance when processing images of text types. Text-type images can still remain visually acceptable when subjected to severe non-linear attacks, as compared to spectrally complex images. For example, the watermark embedded by the two technologies can be completely destroyed by carrying out binarization processing or high-pass filtering on the text image, and the like, thereby causing difficulty in identification and recognition
Disclosure of Invention
The embodiment of the disclosure provides a data processing method and system, which can solve the problem of difficulty in identification when watermarking is performed on an image. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a data processing method applied to an encoding device, the method including:
acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
generating the target mask image according to the target resolution and a preset identification graph;
and processing the target macro block in the original image according to the target mask image and the target mapping to generate a target image.
In one embodiment, the acquiring the target macro block in the original image comprises:
and acquiring at least one target macro block in the original image according to the high-gradient pixels and the preset resolution in the original image.
In one embodiment, before acquiring the target macro block in the original image, the method further comprises:
acquiring the frequency corresponding to each pixel value in the original image;
determining whether the original image is of a text type or not according to the frequency corresponding to each pixel value;
and when the original image is a text type image, acquiring a target macro block in the original image.
In one embodiment, the generating the target image includes:
according to a preset rule, carrying out binarization processing on the target mask image, and determining the value of each pixel point in the target mask image;
when the value of a pixel point in the target mask image is a first pixel value, modifying the pixel value of a target macro block corresponding to the pixel point in the target image;
and when the value of the pixel point in the target mask image is the second pixel value, not modifying the pixel value of the pixel point in the corresponding target macro block in the target image.
In one embodiment, the modifying the pixel values of the pixels in the target macroblock in the target image includes:
acquiring a target coordinate in the target macro block, wherein the target coordinate is a coordinate corresponding to a pixel point adjacent to the high pixel point in the target macro block;
and modifying the pixel value of the pixel point corresponding to the target coordinate point according to a preset rule.
The data processing method provided by the embodiment of the disclosure determines a target macro block in an original image, determines a target resolution of a target mask image according to the target macro block after the target macro block is determined, and establishes a corresponding relationship between the macro block and a pixel point in the target mask image; and generating a target mask image according to the target resolution and a preset mark graph, and modifying a target macro block according to the target mask image, so that the target mask is embedded in the target image. The method provided by the disclosure fully utilizes the spatial distribution characteristics of the pixels of the text type image, carries out identification embedding processing on the image in a space domain, simultaneously considers the self-retaining capability of the spectrum of the image to embed the identification when attacked, and has stronger robustness and attack resistance.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing method applied to a decoding device, including:
acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
determining a target value of each pixel point corresponding to the target macro block in the target mask image according to the target mapping and a comparison result of the target macro block, wherein the comparison result refers to a comparison result of the target macro block and a macro block at a position corresponding to the target macro block in the target image, and the target image is an image of the original image after being processed by the target mask image;
and generating the target mask image according to the target resolution and the target value.
In one embodiment, before determining the target value corresponding to each pixel point in the target mask image corresponding to the target macroblock, the method further comprises:
acquiring a target residual error matrix, wherein the target residual error matrix is generated according to the comparison result of the target image and the original image;
traversing the target residual error matrix according to the position information of the target macro block, finding a macro block corresponding to the target macro block in the target residual error matrix, and determining whether the target macro block has a residual error;
and generating a comparison result of the target macro block according to whether the target macro block has a residual error.
In one embodiment, the obtaining the target residual matrix includes:
acquiring a target image corresponding to the original image;
normalizing the target image and the original image;
and carrying out difference processing on the target image and the original image after the normalization processing to generate a target residual error matrix.
In one embodiment, the generating the target residual matrix comprises:
when the comparison result of the target macro block shows that the target macro block changes, determining the target value of the pixel point corresponding to the target macro block as a first numerical value;
and when the comparison result of the target macro block shows that the target macro block is not changed, determining the target value of the pixel point corresponding to the target macro block as a second numerical value.
According to a third aspect of embodiments of the present disclosure, there is provided a data processing system, the system comprising: an encoding device and a decoding device are provided,
the coding device is connected with the decoding device;
the encoding device is used for acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
generating the target mask image according to the target resolution and a preset identification graph;
processing a target macro block in the original image according to the target mask image and the target mapping to generate a target image;
the decoding device is used for acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
determining a target value of each pixel point corresponding to the target macro block in the target mask image according to the target mapping and a comparison result of the target macro block, wherein the comparison result refers to a comparison result of the target macro block and a macro block at a position corresponding to the target macro block in the target image, and the target image is an image of the original image after being processed by the target mask image;
and generating the target mask image according to the target resolution and the target value.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a data processing method provided by an embodiment of the present disclosure;
FIG. 1a is a schematic diagram of a high gradient pixel in a data processing method provided by an embodiment of the present disclosure;
FIG. 1b is a diagram of a mask in a data processing method according to an embodiment of the present disclosure;
fig. 2 is a flowchart 1 of a data processing method provided by an embodiment of the present disclosure;
FIG. 3 is a block diagram of a data processing system according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Example one
The embodiment of the present disclosure provides a data processing method applied to an encoding device, as shown in fig. 1, the data processing method includes the following steps:
101. an original image and a target macro block in the original image are obtained.
The target macroblock includes at least one high gradient pixel.
In an optional embodiment, the method provided by the present disclosure, before the dividing the original image, further includes analyzing the original image to determine a type of the original image, and specifically may include:
step one, extracting an image gray level image. Specifically, the extraction method can be determined according to the format of the original image: for example, if the source image is in RGB pixel format, it needs to be converted into a gray scale image, and if the source image is a video type YUV image, the luminance data Y is directly used. Extraction method of gray level image without limitation
And step two, carrying out gray level image quantization on the original image to obtain a gray level frequency histogram.
And step three, acquiring two pixel values with the most frequencies according to the frequency corresponding to each pixel value in the gray frequency histogram. For example, the most frequent pixel may be considered as a background color and the second most frequent pixel may be considered as a text color.
And step four, judging whether the type of the original image is the type of the text image or not according to the background color and the text color.
And comparing the background color and the text color by more than a threshold value, wherein the sum of the number of the background color and the text color is far more than the sum of the number of other pixels, and regarding the text image as a text image.
In an alternative embodiment, the method provided by the present disclosure, after determining that the original image is a text-type image, further includes high-gradient pixels in the original image, and specifically may include:
for example, the above text color where background pixels exist may be considered as high gradient pixels. And generating a binary matrix from the high gradient pixels.
As shown in fig. 1a, each cell replaces one pixel, the white cell represents the background color pixel, and the gray cell represents the text color. According to the high gradient pixel determination rule, the pixel at the point a, the pixel at the point b, the pixel at the point c, the pixel at the point d, the pixel at the point f, the pixel at the point g, the pixel at the point h, and the pixel at the point i are high gradient pixels, and the pixel at the white lattice position and the pixel at the point e are not high gradient pixels.
In an alternative implementation, the method provided by the present disclosure further includes dividing the original image to obtain target macroblocks, and the steps include:
and determining at least one target macro block in the original image according to the high gradient pixels and the preset resolution in the original image.
For example: preset resolution, i.e. resolution of target macroblock: the resolution of the target macroblock may be selected from squares such as 8x8, 16x16, 32x32, etc., or squares such as 16x8, 8x16, 32x 8, etc.
The preset rules may include:
rule 1, ensure that there are enough high gradient pixels within a macroblock (too few and more than m, can destroy the visual effect, or can easily produce missing codes when decoding). Such macroblocks are considered to be embeddable macroblocks. Operability range modifiable red-white insertion black
Rule 2, after determining the resolution of the target macroblock, the number of macroblocks that can be embedded into the image is greater than the square value of a certain value X (the mask is a square with a side length X, and the code length is X square), such as 36, 49, 64, etc.
In the case where the conditions of rules 1 and 2 are satisfied, as many generation targets as possible can be embedded in the macroblock.
After the target macro block is determined, the target macro block is marked in the original picture, and the number of the target macro blocks is counted
102. And determining the target resolution and the target mapping of the target mask image according to the target macro block.
The target map is used for indicating the corresponding relation between the pixel points in the target mask image and the target macro blocks in the original image
In the method provided by the present disclosure, the resolution of the target mask image is determined, that is, the number of pixels corresponding to the side length in the target mask image is determined according to the number of target macro blocks.
Specifically, the method comprises the following steps: according to the number of the target macro blocks, the resolution corresponding to the target mask image is determined, wherein the image resolution comprises horizontal pixel number multiplied by vertical pixel number, namely, the pixel point contained in each edge in the target mask image can be determined, and the square of a certain X smaller than the number of the target macro blocks can be selected as the specific pixel point contained in each edge. For example, if the number of target macroblocks is 70, X is selected to be 8, and the mask code length is 64, thereby ensuring effective embedding. When the number of the target macro blocks is larger, the larger size of the identification mask can be selected, and the larger size of the identification mask means more accurate recognition after decoding.
103. Generating the target mask image according to the target resolution and a preset identification graph;
the preset identification pattern is a watermark pattern to be loaded in the original image.
In generating the target mask image, may include: the preset identification image can be subjected to binarization processing to generate a target mask image.
For example, in a two-bit image of X width X height, the entire substrate is set to white, and then a pattern with high visibility (black grid) is inserted. The pattern has high identification degree after decoding even if missing codes or mixed with error codes are generated. As shown in fig. 1 b. Mask selection is not limited to that shown in FIG. 1 b.
104. And processing the target macro block in the original image according to the target mask image and the target mapping to generate a target image.
The method provided by the present disclosure, before processing the target macro block, includes scanning the mask line by line to form a code key for the target mask image. The white color is 0, the black color is 1, and after the zigzag scanning processing, the value distribution corresponding to the pixel points in the target mask image can be more uniform.
In an alternative embodiment, the present disclosure provides a method for modifying a corresponding target macroblock in an original image, including:
traversing the target mask pattern pixel by pixel according to the target mapping;
when the value of a pixel point in the target mask image is a first pixel value, modifying the pixel value of a target macro block corresponding to the pixel point in the target image;
and when the value of the pixel point in the target mask image is the second pixel value, not modifying the pixel value of the pixel point in the corresponding target macro block in the target image.
In an optional embodiment, in the method provided by the present disclosure, when a pixel value of a pixel point in a target mask image is 1, modifying a target macro block corresponding to the pixel point includes:
according to high gradient pixels in an original image, searching N (N is less than equal and M) high gradient pixels in a target macro block according to a preset rule, wherein the larger N is, the stronger the attack resistance is;
after determining the high gradient pixel in the target macro block, acquiring the non-high gradient pixel coordinate around the high gradient pixel, and marking the coordinate as a target coordinate, namely an embedded coordinate;
and modifying the pixel value of the pixel point corresponding to the target coordinate into a high-gradient pixel value.
Further, when visual effects are impaired, high gradient pixels after weighted multiplication can be inserted, and the closer to the high gradient value, the stronger the attack resistance.
In an alternative embodiment, the method provided by the present disclosure generates the target image according to the modified target macro block after the target macro blocks corresponding to all the pixel points in the traversal target mask image have been processed. Because the corresponding pixel points in the modified target macro block are the pixel points around the high-gradient pixels, the modified target macro block can be understood as the pixel points around the characters in the original image, and the difficulty in identification of the original image after the watermark is added is avoided.
The target image is the image in which the target mask image has been embedded in the original image.
The data processing method provided by the embodiment of the disclosure determines a target macro block in an original image, determines a target resolution of a target mask image according to the target macro block after the target macro block is determined, and establishes a corresponding relationship between the macro block and a pixel point in the target mask image; and generating a target mask image according to the target resolution and a preset mark graph, and modifying a target macro block according to the target mask image, so that the target mask is embedded in the target image. The method provided by the disclosure fully utilizes the spatial distribution characteristics of the pixels of the text type image, carries out identification embedding processing on the image in a space domain, simultaneously considers the self-retaining capability of the spectrum of the image to embed the identification when attacked, and has stronger robustness and attack resistance.
Example two
Based on the data processing method provided by the embodiment corresponding to fig. 1, another embodiment of the present disclosure provides a data processing method, which may be applied to a decoding device, and referring to fig. 2, the data processing method provided by this embodiment includes the following steps:
201. an original image and a target macro block in the original image are obtained.
The target macroblock includes at least one high gradient pixel.
In an alternative implementation, the method provided by the present disclosure further includes dividing the original image to obtain target macroblocks, and the steps include:
and determining at least one target macro block in the original image according to the high gradient pixels and the preset resolution in the original image.
For example: preset resolution, i.e. resolution of target macroblock: the resolution of the target macroblock may be selected from squares such as 8x8, 16x16, 32x32, etc., or squares such as 16x8, 8x16, 32x 8, etc.
After determining the target macro block in the original image, the present disclosure further marks the target macro block, and obtains parameters of the target macro block, where the parameters include a position of the target macro block and a number of the target macro blocks.
202. And determining the target resolution and the target mapping of the target mask image according to the target macro block.
The target map is used to indicate a correspondence between pixel points in the target mask image and target macro blocks in the original image.
In the method provided by the present disclosure, the resolution of the target mask image is determined, that is, the number of pixels corresponding to the side length in the target mask image is determined according to the number of target macro blocks.
203. And determining the target value of each pixel point corresponding to the target macro block in the target mask image according to the comparison result of the target mapping and the target macro block.
The comparison result refers to the comparison result between the target macro block and the macro block at the position corresponding to the target macro block in the target image, and the target image is the image of the original image after the target mask image processing; the target residual matrix is a contrast residual matrix of the original image and a target image, and the target image is an image of the original image after the target mask image embedding processing.
In an optional implementation, the determining the comparison result of the target macroblock in the method provided by the present disclosure may specifically include:
acquiring a target residual error matrix, wherein the target residual error matrix is generated according to the comparison result of the target image and the original image;
traversing the target residual error matrix according to the position information of the target macro block, finding a macro block corresponding to the target macro block in the target residual error matrix, and determining whether the target macro block has a residual error;
and generating a comparison result of the target macro block according to whether the target macro block has a residual error.
Further, for the above method for obtaining a target residual matrix, the method may include:
and carrying out normalization processing on the original image and the target image. Such as normalizing the pixel range to a range of 0 to 1000
Carrying out difference processing on the original image and the coded image after normalization processing to generate a residual error matrix;
and calculating the median of the residual matrix, and performing binarization processing on the residual matrix according to the median or the weighted value of the median to obtain a binarized residual matrix, namely a target residual matrix.
The method for determining the target value corresponding to each pixel point of the target mask image includes:
traversing the target macro block by block, and determining the value of a pixel point corresponding to the target macro block according to the comparison result of the target macro block, specifically:
when the comparison result of the target macro block shows that the target macro block has residual errors, namely the target macro block in the original image is compared with the target image, the target macro block is changed, and at the moment, the value of a pixel point corresponding to the target macro block is marked as a first numerical value;
when the comparison result of the target macro block shows that the target macro block has no residual error, namely the target macro block in the original image is compared with the target image and the target macro block is unchanged, marking the value of the pixel point corresponding to the target macro block as a second numerical value;
until all target macro blocks are traversed.
204. And generating the target mask image according to the target resolution and the target value.
Specifically, according to the target macro block and the target mapping, the target value is filled into the pixel points of the target mask image corresponding to the target macro block, and then the target mask image is generated. According to the generated target mask image, a preset identification graph is obtained, the preset identification graph is the watermark in the target image, through analyzing the watermark content, the corresponding encryption equipment or encryption user when the original file is added with the watermark can be obtained, the original file is convenient for the user to manage, and the safety of the original file is also improved.
The data processing method provided by the embodiment of the disclosure is applied to decoding equipment, and comprises the steps of determining a target macro block in an original image, determining a target resolution of a target mask image according to the target macro block after the target macro block is determined, and establishing a corresponding relation between the target macro block and pixel points in the target mask image; and determining the target value of a pixel point in the target mask image according to the corresponding relation and whether the target macro block is changed compared with the macro block at the corresponding position in the watermarked target image, and finally generating the target mask image according to the target resolution and the target value. After the target mask image is obtained, the identification information added to the original image, i.e. the watermark on the target image, can be obtained. The method provided by the disclosure fully utilizes the spatial distribution characteristics of the pixels of the text type image, carries out identification embedding processing on the image in a space domain, simultaneously considers the self-retaining capability of the spectrum of the image to embed the identification when attacked, and has stronger robustness and attack resistance.
EXAMPLE III
Based on the data processing method described in the embodiments corresponding to fig. 1 and fig. 2, the following is an embodiment of the system of the present disclosure, which can be used to execute an embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a data processing system, as shown in fig. 3, the data processing system 30 includes: the encoding device 301 and the decoding device 302,
the encoding device 301 is connected with the decoding device 302;
the encoding device 301 is configured to obtain an original image and a target macro block in the original image, where the target macro block includes at least one high gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
generating the target mask image according to the target resolution and a preset identification graph;
processing a target macro block in the original image according to the target mask image and the target mapping to generate a target image;
the decoding device 302 is configured to obtain an original image and a target macroblock in the original image, where the target macroblock includes at least one high gradient pixel;
determining a target resolution and a target map of a target mask image according to the target macro block, wherein the target map is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
determining a target value of each pixel point corresponding to the target macro block in the target mask image according to the target mapping and a comparison result of the target macro block, wherein the comparison result refers to a comparison result of the target macro block and a macro block at a position corresponding to the target macro block in the target image, and the target image is an image of the original image after being processed by the target mask image;
and generating the target mask image according to the target resolution and the target value.
The data processing system provided by the embodiment of the disclosure makes full use of the spatial distribution characteristics of the pixels of the text type image, performs identification embedding processing on the image in a spatial domain, and considers the self-retaining capability of the spectrum of the image in embedding identification when attacked, thereby having stronger robustness and attack resistance.
Based on the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A data processing method applied to an encoding apparatus, the method comprising:
acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target mapping of a target mask image according to the target macro block, wherein the target mapping is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
generating the target mask image according to the target resolution and a preset identification graph;
and processing the target macro block in the original image according to the target mask image and the target mapping to generate a target image.
2. The method of claim 1, wherein the obtaining the target macro block in the original image comprises:
and acquiring at least one target macro block in the original image according to the high gradient pixels and the preset resolution in the original image.
3. The method of claim 2, wherein prior to obtaining the target macroblock in the original image, the method further comprises:
acquiring the frequency corresponding to each pixel value in the original image;
determining whether the original image is of a text type or not according to the frequency corresponding to each pixel value;
and when the original image is a text type image, acquiring a target macro block in the original image.
4. The method of claim 1, wherein the generating the target image comprises:
according to a preset rule, carrying out binarization processing on the target mask image, and determining the value of each pixel point in the target mask image;
when the value of a pixel point in the target mask image is a first pixel value, modifying the pixel value of a target macro block corresponding to the pixel point in the target image;
and when the value of the pixel point in the target mask image is the second pixel value, not modifying the pixel value of the pixel point in the corresponding target macro block in the target image.
5. The method of claim 4, wherein the modifying the pixel values of the pixels in the corresponding target macroblock in the target image comprises:
acquiring target coordinates in the target macro block, wherein the target coordinates are coordinates corresponding to the adjacent pixel points of the high pixel points in the target macro block;
and modifying the pixel value of the pixel point corresponding to the target coordinate point according to a preset rule.
6. A data processing method applied to a decoding device, the method comprising:
acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target mapping of a target mask image according to the target macro block, wherein the target mapping is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
determining a target value of each pixel point corresponding to the target macro block in the target mask image according to the target mapping and a comparison result of the target macro block, wherein the comparison result refers to a comparison result of the target macro block and a macro block at a position corresponding to the target macro block in the target image, and the target image is an image of the original image after being processed by the target mask image;
and generating the target mask image according to the target resolution and the target value.
7. The method of claim 6, wherein prior to determining the target value corresponding to each pixel point in the target mask image corresponding to the target macroblock, the method further comprises:
acquiring a target residual error matrix, wherein the target residual error matrix is generated according to a comparison result of the target image and the original image;
according to the position information of the target macro block, traversing the target residual error matrix, finding a macro block corresponding to the target macro block in the target residual error matrix, and determining whether the target macro block has a residual error;
and generating a comparison result of the target macro block according to whether the target macro block has a residual error.
8. The method of claim 7, wherein obtaining the target residual matrix comprises:
acquiring a target image corresponding to the original image;
carrying out normalization processing on the target image and the original image;
and carrying out difference processing on the target image and the original image after the normalization processing to generate a target residual error matrix.
9. The method of claim 7, wherein generating the target residual matrix comprises:
when the comparison result of the target macro block shows that the target macro block changes, determining the target value of the pixel point corresponding to the target macro block as a first numerical value;
and when the comparison result of the target macro block shows that the target macro block is not changed, determining the target value of the pixel point corresponding to the target macro block as a second numerical value.
10. A data processing system, characterized in that the system comprises: an encoding device and a decoding device are provided,
the encoding device is connected with the decoding device;
the encoding device is used for acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high-gradient pixel;
determining a target resolution and a target mapping of a target mask image according to the target macro block, wherein the target mapping is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
generating the target mask image according to the target resolution and a preset identification graph;
processing a target macro block in the original image according to the target mask image and the target mapping to generate a target image;
the decoding device is used for acquiring an original image and a target macro block in the original image, wherein the target macro block comprises at least one high gradient pixel;
determining a target resolution and a target mapping of a target mask image according to the target macro block, wherein the target mapping is used for indicating a corresponding relation between a pixel point in the target mask image and the target macro block in the original image;
determining a target value of each pixel point corresponding to the target macro block in the target mask image according to the target mapping and a comparison result of the target macro block, wherein the comparison result refers to a comparison result of the target macro block and a macro block at a position corresponding to the target macro block in the target image, and the target image is an image of the original image after being processed by the target mask image;
and generating the target mask image according to the target resolution and the target value.
CN202010271175.1A 2020-04-08 2020-04-08 Data processing method and system Pending CN111612683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010271175.1A CN111612683A (en) 2020-04-08 2020-04-08 Data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010271175.1A CN111612683A (en) 2020-04-08 2020-04-08 Data processing method and system

Publications (1)

Publication Number Publication Date
CN111612683A true CN111612683A (en) 2020-09-01

Family

ID=72202255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010271175.1A Pending CN111612683A (en) 2020-04-08 2020-04-08 Data processing method and system

Country Status (1)

Country Link
CN (1) CN111612683A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411635A (en) * 2021-05-14 2021-09-17 广东欧谱曼迪科技有限公司 Image tag data processing and restoring system, processing method, restoring method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411635A (en) * 2021-05-14 2021-09-17 广东欧谱曼迪科技有限公司 Image tag data processing and restoring system, processing method, restoring method and device

Similar Documents

Publication Publication Date Title
US8538068B2 (en) Embedding and detecting hidden information
Chou et al. Embedding color watermarks in color images
US8009862B2 (en) Embedding data in images
US20110052094A1 (en) Skew Correction for Scanned Japanese/English Document Images
US20080267520A1 (en) Method of image authentication and restoration
Yeung et al. Fragile watermarking of three-dimensional objects
US20100142756A1 (en) Document security method
JP4595014B2 (en) Digital watermark embedding device and detection device
Keskinarkaus et al. Image watermarking with feature point based synchronization robust to print–scan attack
Dittmann Content-fragile watermarking for image authentication
US8243981B2 (en) Identifying embedded data in an image
CN111612683A (en) Data processing method and system
CN116579908B (en) Method and device for implanting encrypted hidden information into image
CN100370481C (en) Method of using vulnerable watermark technology for digital image fidelity
Qi et al. An adaptive visible watermark embedding method based on region selection
AU2006252223B2 (en) Tamper Detection of Documents using Encoded Dots
CN109474830B (en) Embedding and extracting method of digital video steel seal
US8031905B2 (en) Extracting data from images
KR100944488B1 (en) Watermark Inserting Method to Vector data for using Azimuth Information and Watermark Detecting Method to the same
JP4167372B2 (en) Digital watermark embedding method, extraction method, invisibility method, visualization method, and embedding device
US7974437B2 (en) Identifying steganographic data in an image
CN109685711B (en) Anti-rotation watermark method for embedding periodogram in characteristic region
Mambo et al. Highly robust image watermarking using complementary modulations
CN116823583B (en) Watermark embedding and extracting method based on remote sensing image
KR101654564B1 (en) Method for embedding and extracting a watermark at printed document using hysteresis and minimal inverse quantization

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