Data processing method, device and equipment
By performing block processing and edge area judgment on the carrier image, the target image block is determined and information is embedded, and the problem of low watermark in the prior art is solved, and watermark embedding with high visual quality and high invisibility is achieved.
Patent Information
- Application Number
- CN202011335904.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-11-25
AI Technical Summary
In the prior art, when embedding information into a carrier object, the watermark is less unaware of, and it is difficult to improve the unawareness of the watermark while maintaining the visual quality of the carrier image.
By blocking the channel to be embedded in the carrier image, the target image block is determined based on whether the image block is located in the edge area, and the information to be embedded is embedded in the frequency domain coefficient of the target image block.
While maintaining the visual quality of the carrier image, the invisibility of the watermark is improved and the protection of the carrier image is enhanced.
Smart Images

Figure CN114547561B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to two data processing methods, two data processing devices, two electronic devices and two storage devices. Background Art
[0002] With the rapid development of communication technology and multimedia technology, issues such as digital media security, copyright protection and authentication have become research hotspots. Convenient network communication conditions have made illegal distribution increasingly rampant, seriously infringing the basic interests of copyright owners. In order to prevent digital image works from being illegally distributed and tampered with, image watermarking technology has been widely used in the protection of original images. Image watermarking technology embeds watermark information into the image without affecting the normal use of the image. When piracy or copyright disputes occur, the watermark information can be extracted from it as evidence of copyright ownership to safeguard the rights and interests of the owner.
[0003] Digital watermarking technology is a technology that achieves the purpose of information embedding by modifying the content of the carrier image. The performance of watermark is usually described by three parts, namely robustness, imperceptibility and the capacity of embedded information. Under the same method, these three performances are in a trade-off relationship. When the capacity of embedded information remains unchanged, when the robustness is enhanced, the imperceptibility of the watermark will inevitably decrease.
[0004] How to improve the imperceptibility of watermark while keeping the embedded information capacity unchanged is an urgent problem to be solved. Summary of the invention
[0005] The present application provides a data processing method, a data processing device, an electronic device and a storage device to solve the problem of low imperceptibility of watermarks when information is embedded into a carrier object.
[0006] The present application provides a data processing method, comprising:
[0007] Obtaining a carrier image and information to be embedded;
[0008] The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded;
[0009] Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0010] Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0011] The information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0012] Optionally, the information to be embedded includes: watermark information to be embedded.
[0013] Optionally, determining the target image block for embedding information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded includes:
[0014] Determine whether the image block to be embedded in the channel is located in the edge area of the channel to be embedded;
[0015] If not, determining the image block of the channel to be embedded as the target image block to be embedded with information;
[0016] If so, it is determined that the image block of the channel to be embedded is not the target image block to be embedded with information.
[0017] Optionally, the determining whether the image block to be embedded in the channel is located in an edge area of the channel to be embedded includes:
[0018] Performing low-pass filtering on the carrier image to obtain a filtered carrier image;
[0019] Performing edge detection on the filtered carrier image to obtain an edge information map;
[0020] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the channels to be embedded in the carrier image;
[0021] It is determined, according to the sum of the values of the elements contained in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge region of the to-be-embedded channel.
[0022] Optionally, determining, according to the sum of values of elements included in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge region of the to-be-embedded channel includes:
[0023] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in an edge region of the to-be-embedded channel;
[0024] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the channel to be embedded corresponding to the image block of the edge information map is not located in the edge area of the channel to be embedded.
[0025] Optionally, also include:
[0026] Providing a judgment result of whether the corresponding image block of the channel to be embedded is located in the edge area of the channel to be embedded to the client;
[0027] Obtain a second judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded according to the judgment result feedback from the client, and use the second judgment result as the target judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded.
[0028] Optionally, obtaining the carrier image and the information to be embedded includes:
[0029] Obtain carrier image and original information;
[0030] The original information is encoded to obtain information to be embedded.
[0031] Optionally, encoding the original information to obtain the information to be embedded includes:
[0032] Encoding the original information to obtain a bit sequence to be embedded;
[0033] According to the embedding capacity of a single image block and the number of bits contained in the bit sequence to be embedded, the information to be embedded is grouped to obtain a plurality of bit subsequences to be embedded.
[0034] Optionally, encoding the original information to obtain a bit sequence to be embedded includes:
[0035] Performing scrambling processing on the original information to obtain scrambled original information;
[0036] A bit sequence to be embedded is generated according to the scrambled original information, the check code and the watermark information header.
[0037] Optionally, the method further includes: grouping the image blocks to be embedded in the channel to obtain image block groups with the same number as the bit subsequences to be embedded; each image block group is used to embed a bit subsequence corresponding thereto;
[0038] The embedding the information to be embedded into the frequency domain coefficient of the target image block comprises:
[0039] The bit subsequence to be embedded is embedded into the frequency domain coefficient of the target image block included in the corresponding image block group.
[0040] Optionally, embedding the to-be-embedded bit subsequence into a frequency domain coefficient of a target image block included in a corresponding image block group includes:
[0041] Determining an embedding position of each bit of the bit subsequence to be embedded in the target image block;
[0042] According to the embedding position, obtaining a frequency domain coefficient set of a target image block included in the image block group corresponding to each bit position;
[0043] According to the number of positive coefficients, the number of negative coefficients and the embedding strength corresponding to the embedding position of the frequency domain coefficient set, the bit is embedded into the frequency domain coefficient set of the target image block included in the corresponding image block group.
[0044] Optionally, embedding bits into a frequency domain coefficient set of a target image block included in the corresponding image block group according to the number of positive coefficients, the number of negative coefficients, and the embedding strength corresponding to the embedding position of the frequency domain coefficient set includes:
[0045] The signs of the coefficients of the frequency domain coefficient set are modified so that the relationship between the number of positive coefficients, the number of negative coefficients, and the embedding strengths corresponding to the embedding positions of the modified frequency domain coefficient set satisfies a preset relationship.
[0046] Optionally, also include:
[0047] The embedding strength corresponding to the embedding position is determined according to the frequency band position in the target image block corresponding to the frequency domain coefficient of the target image block.
[0048] The present application also provides a data processing method, comprising:
[0049] Obtaining a target carrier image;
[0050] Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0051] Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0052] Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0053] The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0054] Optionally, determining the target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel includes:
[0055] Determine whether the image block of the extraction channel is located in the edge area of the extraction channel;
[0056] If not, determining that the image block of the extraction channel is the target image block in which the information has been embedded;
[0057] If so, it is determined that the image block of the extracted channel is not a target image block in which information has been embedded.
[0058] Optionally, the determining whether the image block of the extraction channel is located in an edge area of the extraction channel includes:
[0059] Performing low-pass filtering on the target carrier image to obtain a filtered target carrier image;
[0060] Performing edge detection on the filtered target carrier image to obtain an edge information map;
[0061] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the to-be-embedded channels of the target carrier image;
[0062] It is determined, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge region of the extraction channel.
[0063] Optionally, determining whether an image block of an extraction channel corresponding to an image block of an edge information map is located in an edge region of the extraction channel according to a sum of values of elements included in the image block of the edge information map includes:
[0064] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel;
[0065] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the extraction channel corresponding to the image block of the edge information map is not located in the edge area of the extraction channel.
[0066] Optionally, obtaining the original information according to the frequency domain coefficient of the target image block in which the information has been embedded includes:
[0067] Obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded;
[0068] Combining the multiple bit subsequences to generate a bit sequence;
[0069] The original information is obtained according to the bit sequence.
[0070] Optionally, obtaining original information according to the bit sequence includes:
[0071] Checking the bit sequence according to a check code;
[0072] After the verification is passed, the scrambled original information is extracted from the bit sequence;
[0073] The scrambled original information is subjected to descrambling processing to obtain the original information.
[0074] Optionally, the method further includes: grouping the image blocks of the extraction channel to obtain image block groups with the same number as the bit subsequences; each image block group is used to extract a bit subsequence corresponding thereto;
[0075] The step of obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded comprises:
[0076] A bit subsequence corresponding to the image block group is obtained from the frequency domain coefficients of the target image blocks included in each image block group.
[0077] Optionally, obtaining a bit subsequence corresponding to the image block group from the frequency domain coefficients of the target image blocks included in each image block group includes:
[0078] Obtaining an embedding position of a bit of the bit subsequence in a target image block included in a corresponding image block group;
[0079] According to the embedding position, obtaining a set of frequency domain coefficients of the target image block corresponding to the bit position contained in the image block group;
[0080] Determining, according to the number of positive coefficients and the number of negative coefficients of the frequency domain coefficient set, a value of a bit corresponding to the frequency domain coefficient set;
[0081] The values of each bit are combined to obtain a bit subsequence corresponding to the image block group.
[0082] The present application also provides a data processing device, comprising:
[0083] An information obtaining unit, used for obtaining a carrier image and information to be embedded;
[0084] An image block obtaining unit is used to perform block processing on the to-be-embedded channel of the carrier image to obtain image blocks of the to-be-embedded channel;
[0085] A frequency domain transform unit, configured to perform frequency domain transform on the image block of the channel to be embedded, so as to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0086] a target image block determining unit, configured to determine a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0087] The information embedding unit is used to embed the information to be embedded into the frequency domain coefficients of the target image block.
[0088] The present application also provides an electronic device, including:
[0089] Processor; and
[0090] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:
[0091] Obtaining a carrier image and information to be embedded;
[0092] The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded;
[0093] Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0094] Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0095] The information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0096] The present application also provides a storage device storing a program of a data processing method, wherein the program is executed by a processor to perform the following steps:
[0097] Obtaining a carrier image and information to be embedded;
[0098] The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded;
[0099] Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0100] Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0101] The information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0102] The present application also provides a data processing device, comprising:
[0103] An image acquisition unit, used for acquiring an image of a target carrier;
[0104] An image block obtaining unit, used for performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0105] A frequency domain transform unit, used to perform frequency domain transform on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0106] a target image block determining unit, configured to determine a target image block in which information has been embedded, according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0107] The original information obtaining unit is used to obtain the original information according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0108] The present application also provides an electronic device, comprising:
[0109] Processor; and
[0110] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:
[0111] Obtaining a target carrier image;
[0112] Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0113] Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0114] Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0115] The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0116] The present application also provides a storage device storing a program of a data processing method, wherein the program is executed by a processor to perform the following steps:
[0117] Obtaining a target carrier image;
[0118] Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0119] Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0120] Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0121] The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0122] Compared with the prior art, this application has the following advantages:
[0123] The present application provides a data processing method, including: obtaining a carrier image and information to be embedded; performing block processing on the channel to be embedded of the carrier image to obtain the image block of the channel to be embedded; performing frequency domain transformation on the image block of the channel to be embedded to obtain the frequency domain coefficient of the image block of the channel to be embedded; determining the target image block of the information to be embedded according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded; and embedding the information to be embedded into the frequency domain coefficient of the target image block. The data processing method provided by the present application determines the target image block of the information to be embedded according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded, and embeds the information to be embedded into the frequency domain coefficient of the target image block. Since whether the image block is located in the edge area is taken into consideration when determining the target image block, embedding information in the edge area is avoided. Therefore, after the information is embedded, the carrier image still has a high visual quality, which improves the imperceptibility of the watermark. BRIEF DESCRIPTION OF THE DRAWINGS
[0124] Figure 1A It is a schematic diagram of a scenario embodiment provided by the present application.
[0125] Figure 1 It is a flowchart of a data processing method provided in the first embodiment of the present application.
[0126] Figure 2 It is a schematic diagram of frequency domain coefficients of an image block to be embedded in a channel provided in the first embodiment of the present application.
[0127] Figure 3 It is a schematic diagram of detection results of two commonly used edge detection algorithms provided in the first embodiment of the present application.
[0128] Figure 4 It is a schematic diagram of two ways of grouping image blocks provided in the first embodiment of the present application.
[0129] Figure 5 It is a flow chart of a data processing method provided in the second embodiment of the present application.
[0130] Figure 6 It is a schematic diagram of a data processing device provided in the third embodiment of the present application.
[0131] Figure 7 It is a schematic diagram of a data processing device provided in the sixth embodiment of the present application. DETAILED DESCRIPTION
[0132] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.
[0133] In order to present the present application more clearly, the application scenario of the data processing method provided in the first embodiment of the present application is briefly introduced.
[0134] The data processing method provided in the first embodiment of the present application can be applied to the scenario of interaction between the client and the server, such as Figure 1A When the original information needs to be embedded into the carrier image, the client usually first establishes a connection with the server. After the connection is established, the client can send the carrier image and the original information to the server. After the server receives the carrier image and the original information, it can generate the information to be embedded according to the original information in the information generation unit 101. Then, in the image block acquisition unit 102, the channel to be embedded of the carrier image is divided into blocks to obtain the image block of the channel to be embedded; then, in the frequency domain transformation unit 103, the image block of the channel to be embedded is transformed in the frequency domain to obtain the frequency domain coefficient of the image block of the channel to be embedded; then, in the target image block determination unit 104, according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded, the target image block of the information to be embedded is determined; in the information embedding unit 105, the information to be embedded is embedded in the frequency domain coefficient of the target image block. Then, the server provides the carrier image containing the information to be embedded to the client, and the client receives the carrier image containing the information to be embedded.
[0135] The first embodiment of the present application provides a data processing method, the execution subject of which is a watermark embedding end, and the following is combined with Figure 1 Make an introduction.
[0136] like Figure 1 As shown, in step S101, a carrier image and information to be embedded are obtained.
[0137] The carrier image refers to the carrier image in which the information to be embedded is to be embedded. For example, when the copyright owner of an image needs to distribute the content to multiple partners, different watermarks need to be embedded so that when piracy occurs, it can be traced back to which partner the content was leaked from. This image is a carrier image. In addition, the carrier image can also be a video frame in a carrier video. The carrier video can be a physical video file. For example, the carrier video is a video file stored in a remote server for local download and playback. It can also be in the form of streaming media. For example, the carrier video is a video stream provided by an online video on demand platform or an online live broadcast platform that can be directly streamed. In addition, the carrier video can be a video in the form of AR, VR, etc., or a stereoscopic video. Of course, with the continuous advancement of technology, the carrier video can also be a video related to the video in other formats and forms, which is not specifically limited here.
[0138] The information to be embedded refers to the additional information added to the carrier image. The information to be embedded is generated based on the original information, which can be a digital watermark or other types of hidden information. Adding appropriate original information to the carrier object can prevent data leakage and protect data security. For example, adding copyright information as a watermark to the carrier image can prevent piracy.
[0139] The step of obtaining the carrier image and the information to be embedded includes:
[0140] Obtain carrier image and original information;
[0141] The original information is encoded to obtain information to be embedded.
[0142] The encoding process of the original information to obtain a bit sequence to be embedded includes:
[0143] Performing scrambling processing on the original information to obtain scrambled original information;
[0144] A bit sequence to be embedded is generated according to the scrambled original information, the check code and the watermark information header.
[0145] For example, the original information is 11110000, the watermark information header is 10101010, and the parity check code 0 for verifying the watermark information is added. The original information is cyclically shifted by 4 positions to obtain the scrambled information 00001111. Then, the information to be embedded can be organized using the structure {watermark information header, scrambled original information, check code}, that is, the information to be embedded is a bit sequence of {10101010000011110}.
[0146] like Figure 1As shown, in step S102, the channel to be embedded of the carrier image is divided into blocks to obtain image blocks of the channel to be embedded.
[0147] The channel to be embedded refers to a color channel of the carrier image. Common color spaces include RGB, YUV, YCrCb, etc. For example, the channel to be embedded is the Y channel.
[0148] For example, the channel to be embedded of the carrier image may be divided into blocks to obtain image blocks of a size of 8*8.
[0149] It should be noted that, during actual embedding, only one channel to be embedded may be selected, or multiple channels to be embedded may be selected.
[0150] like Figure 1 As shown, in step S103, frequency domain transformation is performed on the image block of the channel to be embedded, so as to obtain frequency domain coefficients of the image block of the channel to be embedded.
[0151] like Figure 2 As shown, the figure contains 4 image blocks to be embedded in the channel, and the numbers in each block are the frequency domain coefficients of the image block.
[0152] like Figure 1 As shown, in step S104, the target image block to be embedded with information is determined according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded.
[0153] The target image block refers to the image block where information is actually embedded.
[0154] In order to improve the visual quality of the carrier image after embedding information, the image block located in the edge area is not suitable for embedding information. Therefore, it is necessary to determine the target image block to be embedded according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded.
[0155] The step of determining the target image block to be embedded with information according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded, comprises:
[0156] Determine whether the image block to be embedded in the channel is located in the edge area of the channel to be embedded;
[0157] If not, determining the image block of the channel to be embedded as the target image block to be embedded with information;
[0158] If so, it is determined that the image block of the channel to be embedded is not the target image block to be embedded with information.
[0159] The target image block determined in the present application is an image block that is not located in the edge area.
[0160] The step of judging whether the image block to be embedded in the channel is located in an edge area of the channel to be embedded, comprises:
[0161] Performing low-pass filtering on the carrier image to obtain a filtered carrier image;
[0162] Performing edge detection on the filtered carrier image to obtain an edge information map;
[0163] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the channels to be embedded in the carrier image;
[0164] It is determined, according to the sum of the values of the elements contained in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge region of the to-be-embedded channel.
[0165] For example, if the size of the block used when dividing the channel to be embedded of the carrier image into blocks is 8*8, the size of the block used when dividing the edge information map into blocks is also 8*8.
[0166] First, the carrier image is low-pass filtered to obtain a filtered carrier image, and then the filtered carrier image is edge detected to obtain an edge information map. There are many low-pass filtering methods that can be used, including but not limited to: Gaussian filtering, Wiener filtering, etc.; there are many edge detection methods that can be used, including but not limited to: Canny edge detection method, Fast Edge Detection method, etc. Figure 3 The following is a schematic diagram of the detection results of two commonly used edge detection algorithms. Figure 3 (b) uses the Laplace edge detection method to Figure 3 (a) Perform edge detection, Figure 3 (c) in the figure uses the canny edge detection method to Figure 3 (a) Perform edge detection.
[0167] Determining, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge area of the to-be-embedded channel includes:
[0168] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in an edge region of the to-be-embedded channel;
[0169] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the channel to be embedded corresponding to the image block of the edge information map is not located in the edge area of the channel to be embedded.
[0170] In order to more accurately determine the target image block for embedding information, after machine judgment, human-computer interaction may be introduced to further judge whether the corresponding image block of the channel to be embedded is located in the edge area of the channel to be embedded.
[0171] As an implementation mode, the first embodiment of the present application may further include:
[0172] Providing a judgment result of whether the corresponding image block of the channel to be embedded is located in the edge area of the channel to be embedded to the client;
[0173] Obtain a second judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded according to the judgment result feedback from the client, and use the second judgment result as the target judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded.
[0174] like Figure 1 As shown, in step S105, the information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0175] After obtaining the target image block, the information to be embedded can be embedded into the frequency domain coefficients of the target image block. After embedding the information, the image block of the embedded channel is inversely transformed into the spatial domain to obtain the image channel after the information is embedded.
[0176] As an implementation method, in order to increase the capacity of the embedded information, the embedded information may be grouped.
[0177] The encoding process of the original information to obtain the information to be embedded includes:
[0178] Encoding the original information to obtain a bit sequence to be embedded;
[0179] According to the embedding capacity of a single image block and the number of bits contained in the bit sequence to be embedded, the information to be embedded is grouped to obtain a plurality of bit subsequences to be embedded.
[0180] Still using the previous example, assume that the embedding capacity c of a single image block is 5 bits, encode the original information, and obtain the bit sequence to be embedded {10101010000011110}. The number of bits 1 contained in the bit sequence to be embedded is 17, and the number of groups is g = l / c = 17 / 5 = 4 groups, resulting in 4 bit subsequences to be embedded: {10101}, {01000}, {00111}, {10}.
[0181] It should be noted that the embedding capacity of a single image block needs to be less than the number of frequency domain coefficients of the image block contained in the image block.
[0182] When the information to be embedded is grouped, the image blocks of the channel to be embedded also need to be grouped, and the method further includes: grouping the image blocks of the channel to be embedded to obtain image block groups with the same number as the bit subsequences to be embedded; each image block group is used to embed a bit subsequence corresponding to it;
[0183] The embedding the information to be embedded into the frequency domain coefficient of the target image block comprises:
[0184] The bit subsequence to be embedded is embedded into the frequency domain coefficient of the target image block included in the corresponding image block group.
[0185] Still using the previous example, the information to be embedded is divided into 4 bit subsequences, and the image blocks of the channel to be embedded are divided into 4 image block groups, each image block group is used to embed a corresponding bit subsequence.
[0186] like Figure 4 As shown in FIG. 4(a) and FIG. 4(b), two methods of grouping image blocks are shown. 1, 2, 3, 4 in the figure represent the group numbers of the image blocks.
[0187] The step of embedding the bit subsequence to be embedded into the frequency domain coefficient of the target image block included in the corresponding image block group includes:
[0188] Determining an embedding position of each bit of the bit subsequence to be embedded in the target image block;
[0189] According to the embedding position, obtaining a frequency domain coefficient set of a target image block included in the image block group corresponding to each bit position;
[0190] According to the number of positive coefficients, the number of negative coefficients and the embedding strength corresponding to the embedding position of the frequency domain coefficient set, the bit is embedded into the frequency domain coefficient set of the target image block included in the corresponding image block group.
[0191] Specifically, the embedding position of each bit of the bit subsequence to be embedded in the target image block can be determined by setting the embedding position set of the embedding coefficients to s = {p1, p2, ..., p c}, obtain the embedding position of each bit of the bit subsequence to be embedded in the target image block from the embedding position set, where c is the embedding capacity of a single image block. For example, set s = {(1,2), (2,1), (2,2), (3,1), (1,3)}, then determine that the embedding position of the first bit in the target image block is {1,2}, the embedding position of the second bit in the target image block is {2,1}, ..., and the embedding position of the fifth bit in the target image block is {1,3}. In the subsequent embedding process, the coefficients of these positions will be modified; Figure 2 The figure shows the composition of the coefficient set at the (1,1) position (the upper left corner of each block is marked as (0,0)) when the image is divided into 4*4 blocks, where the frequency domain coefficients at the same position of each small block form a set.
[0192] The embedding of bits into the frequency domain coefficient set of the target image block included in the corresponding image block group according to the number of positive coefficients, the number of negative coefficients, and the embedding strength corresponding to the embedding position of the frequency domain coefficient set comprises:
[0193] The signs of the coefficients of the frequency domain coefficient set are modified so that the relationship between the number of positive coefficients, the number of negative coefficients, and the embedding strengths corresponding to the embedding positions of the modified frequency domain coefficient set satisfies a preset relationship.
[0194] The following describes the process of embedding the information to be embedded into the frequency domain coefficients of the target image block with reference to an example.
[0195] by Figure 4 Taking the grouping method in (a) as an example, there are 4 bit subsequences to be embedded: {10101}, {01000}, {00111}, {10}. {10101} is embedded in the area of image block group 1, {01000} is embedded in the area of image block group 2, {00111} is embedded in the area of image block group 3, and {10} is embedded in the area of image block group 3.
[0196] It is possible to determine which image blocks are suitable for embedding based on the Mask of edge information. The Mask graph (edge information graph) is a binary graph with the same size as the channel to be embedded. The Mask graph is divided into blocks, and the method of dividing the edge information graph into blocks is the same as the method of dividing the channel to be embedded in the carrier image into blocks. The image block Mi in the Mask region corresponding to the image block Bi in the channel to be embedded is called. The calculation method for determining whether Bi is suitable for embedding can be calculated according to Equation (1), where blockNum represents the total number of image blocks in this group of image blocks, and TH represents a threshold preset according to experience. If flag i is 1, it means that this image block is not suitable for embedding, and this image block is skipped during the subsequent coefficient modification process; if flag i is 0, it means that it is suitable for embedding. The embedding process is to adjust the positive and negative value ratios of the frequency domain coefficients of all image blocks with flag i being 0 at the positions in the set s = {p1, p2,..., p c}. The adjustment method is shown in Equation (2). Let s p be the set of transform domain coefficients of all suitable embedding blocks at position p. Let posNump represent the number of positive coefficients in s p , and negNump represent the number of negative coefficients in s p . Tp represents the embedding weight used for the coefficient at position p.
[0197]
[0198] When the watermark wp to be embedded, posNump, and negNump satisfy Equation (2), there is no need to modify the set sp. Otherwise, it is necessary to modify the signs of some coefficients in sp to make it satisfy Equation (2). It should be noted here that when modifying the set s_p, some numbers can be randomly selected from the set sp to modify their signs, or according to a certain priority, the numbers with higher priority can be selected first to modify their signs. For example: when wp = 1 and posNump / negNump < Tp, select from the set sp For example, in region 1 (the region of image block group 1) to be embedded in {10101}, the position set s = {(1,2), (2,1), (2,2), (3,1), (1,3)}, the coefficient set at position (1,2) of all image blocks suitable for embedding in this region is {1.5, 2.0, -0.8, 0.4}, the coefficient set at position (2,1) is {-0.5, 0.9, 1.6, 2.3}, and T_((1,2)) = 2, T_((2,1))=2, the embedded information at position (1,2) is 1, posNump=3, negNump=1, so there is no need to modify the coefficients, the embedded information at position (2,1) is 0, posNump=3, negNump=1, and the coefficient set needs to be modified to {-0.5,-0.9,-1.6,2.3} according to the above process, so that posNump=1, negNump=3, which satisfies the inequality. The embedding process of other positions (2,2)(3,1)(1,3) is similar to the above process. After all the information {10101} is embedded, it is embedded in area 2, area 3, and area 4 in turn, and finally all the embedding is completed.
[0199] The first embodiment of the present application further includes:
[0200] The embedding strength corresponding to the embedding position is determined according to the frequency band position in the target image block corresponding to the frequency domain coefficient of the target image block.
[0201] The low-frequency part of the image is not easy to change before and after the attack, so the position set s = {p1, p2, ..., p c} i When the image is at a lower frequency, a smaller Tpi is used. i When the image is at a relatively medium frequency position, a larger Tpi is used. The adjustment method of Tpi can be arbitrary. Here is an example: Let s = {p1, p2, ..., p c The sorting method is from low frequency to high frequency, Tpi=i*Δ+Tmin, where Tmin is the preset minimum embedding strength and Δ is the step size.
[0202] The first embodiment of the present application introduces a process of embedding information to be embedded into a carrier image. Corresponding to the first embodiment of the present application, the second embodiment of the present application is a process of extracting the embedded information.
[0203] The second embodiment of the present application provides a data processing method, the execution subject of which is a watermark extraction end. Figure 5 Make an introduction.
[0204] like Figure 5 As shown, in step S501, a target carrier image is obtained.
[0205] The target carrier image refers to an image in which the information to be embedded is embedded. The information to be embedded includes original information, which can be a digital watermark or other types of hidden information.
[0206] like Figure 5 As shown, in step S502, the extraction channel of the target carrier image is divided into blocks to obtain image blocks of the extraction channel.
[0207] The extracted channel is the same as the channel to be embedded in the data processing method provided in the first embodiment of the present application. For example, if the channel to be embedded is the Y channel, the extracted channel is also the Y channel.
[0208] The extracted channel of the target carrier image is processed into blocks to obtain image blocks of the extracted channel. The block processing method is the same as the block processing method of the to-be-embedded channel of the carrier image at the watermark embedding end.
[0209] like Figure 5 As shown, in step S503, the image block of the extraction channel is transformed in the frequency domain to obtain the frequency domain coefficients of the image block of the extraction channel.
[0210] like Figure 5 As shown, in step S504, the target image block in which information has been embedded is determined according to whether the image block of the extraction channel is located in the edge area of the extraction channel.
[0211] The step of determining the target image block in which information has been embedded according to whether the image block of the extraction channel is located in the edge area of the extraction channel comprises:
[0212] Determine whether the image block of the extraction channel is located in the edge area of the extraction channel;
[0213] If not, determining that the image block of the extraction channel is a target image block in which information has been embedded;
[0214] If so, it is determined that the image block of the extracted channel is not a target image block in which information has been embedded.
[0215] The determining whether the image block of the extraction channel is located in the edge area of the extraction channel includes:
[0216] Performing low-pass filtering on the target carrier image to obtain a filtered target carrier image;
[0217] Performing edge detection on the filtered target carrier image to obtain an edge information map;
[0218] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the to-be-embedded channels of the target carrier image;
[0219] It is determined, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge region of the extraction channel.
[0220] The step of determining, based on the sum of values of elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel comprises:
[0221] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel;
[0222] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the extraction channel corresponding to the image block of the edge information map is not located in the edge area of the extraction channel.
[0223] like Figure 5 As shown, in step S505, the original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0224] The obtaining original information according to the frequency domain coefficient of the target image block in which the information has been embedded comprises:
[0225] Obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded;
[0226] Combining the multiple bit subsequences to generate a bit sequence;
[0227] The original information is obtained according to the bit sequence.
[0228] The obtaining original information according to the bit sequence includes:
[0229] Checking the bit sequence according to a check code;
[0230] After the verification is passed, the scrambled original information is extracted from the bit sequence;
[0231] The scrambled original information is subjected to descrambling processing to obtain the original information.
[0232] When the original information is obtained based on the bit sequence, a check code is needed to check the bit sequence. If the check passes, it means that the extracted information is correct; if it fails, it means that the extracted information is wrong.
[0233] For example, if the extracted bit sequence is {10101010000011110}, the check code has passed because the last bit is 0, and the first 8 bits are the watermark information header 10101010. The scrambled original information 00001111 is then descrambled, that is, it is cyclically shifted right by four bits to obtain the final extracted original information 11110000.
[0234] As an implementation method, the second embodiment of the present application further includes: grouping the image blocks of the extraction channel to obtain image block groups with the same number as the bit subsequences; each image block group is used to extract a bit subsequence corresponding thereto;
[0235] The step of obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded comprises:
[0236] A bit subsequence corresponding to the image block group is obtained from the frequency domain coefficients of the target image blocks included in each image block group.
[0237] It should be noted that the manner of grouping the image blocks of the extracted channel is the same as the manner of grouping the image blocks of the channel to be embedded.
[0238] Still using the example of the first embodiment of the present application, the way of dividing the extraction channel into blocks and the grouping method are consistent with the embedding end: the image blocks of the extraction channel are grouped and processed to obtain a 4-bit subsequence image block group. The watermark information {10101} is extracted in area 1 (the area included in the image block group 1), the information {01000} is extracted in area 2, the information {00111} is extracted in area 3, and the information {10} is extracted in area 4. The information of the four areas is combined into the watermark information {10101010000011110} according to the structure {area 1 watermark information, area 2 watermark information, area 3 watermark information, area 4 watermark information}, and the first 8 bits are the watermark header information {10101010}, which is consistent with the embedded watermark information header. Therefore, the information {10101010000011110} is used as the preliminary watermark information (i.e., the extracted bit sequence). It should be noted that if the watermark information header is inconsistent with the embedded watermark information header, it is necessary to adjust the position of the overall extraction channel block before extraction.
[0239] The step of obtaining a bit subsequence corresponding to the image block group from the frequency domain coefficients of the target image block included in each image block group includes:
[0240] Obtaining an embedding position of a bit of the bit subsequence in a target image block included in a corresponding image block group;
[0241] According to the embedding position, obtaining a set of frequency domain coefficients of the target image block corresponding to the bit position contained in the image block group;
[0242] Determining, according to the number of positive coefficients and the number of negative coefficients of the frequency domain coefficient set, a value of a bit corresponding to the frequency domain coefficient set;
[0243] The values of each bit are combined to obtain a bit subsequence corresponding to the image block group.
[0244] The following describes a process of obtaining multiple bit subsequences from the frequency domain coefficients of the target image block in which information has been embedded.
[0245] The target carrier image is low-pass filtered and edge extracted using the same low-pass filtering method and edge extraction algorithm as the embedding end to obtain the edge information Mask. The Mask can be used to determine which image blocks are involved in the watermark embedding process. Here, only the blocks involved in the watermark embedding process are selected to participate in the extraction of watermark information. The ideal Mask should be the same as the Mask used during embedding. Figure 1 The calculation method for judging whether Bi participates in the watermark embedding process still uses formula (1). At this time, if flag i If it is 1, it means that the image block will not participate in the watermark information extraction process and will be skipped in the subsequent coefficient statistics process; if flag i If it is 0, it means that the image block will participate in the extraction of watermark information. The extraction process is to calculate all flags i The frequency domain coefficients of the image blocks with a value of 0 are located in the position set s = {p1, p2, ..., p c The number of positive and negative values of the coefficient at} is as follows:
[0246]
[0247] For example, for region 1, the position set s = {(1,2), (2,1), (2,2), (3,1), (1,3)}, and the coefficient set S at position (1,2) in all image blocks participating in watermark information extraction in this region (1,2) ={-0.2,-0.7,-1.4,2.1}At this time, posNump=1, negNump=3. Therefore, the information extracted according to formula 3 is 0. The coefficient set at position (2,1) is S (2,1)={0.3,1.4,-1.2,0.5}, posNump=3, negNump=1. According to Formula 3, the information extracted at this time is 1. The extraction process of other positions (2,2), (3,1), (1,3) is similar to the above process. After the information of area 1 is extracted, a bit subsequence is generated, and then the information of area 2, area 3, and area 4 is extracted in turn. Finally, the extraction of all bit subsequences is completed.
[0248] It should be noted that since the data processing method of the second embodiment of the present application is based on the data processing method of the first embodiment of the present application, some steps of which are similar to those of the first embodiment, please refer to the relevant parts of the first embodiment for details.
[0249] Corresponding to the data processing method provided in the first embodiment of the present application, the third embodiment of the present application provides a data processing device.
[0250] like Figure 6 As shown, the data processing device comprises:
[0251] The information obtaining unit 601 is used to obtain the carrier image and the information to be embedded;
[0252] An image block obtaining unit 602 is used to perform block processing on the to-be-embedded channel of the carrier image to obtain image blocks of the to-be-embedded channel;
[0253] A frequency domain transform unit 603 is used to perform frequency domain transform on the image block of the channel to be embedded, so as to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0254] A target image block determining unit 604 is used to determine a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0255] The information embedding unit 605 is used to embed the information to be embedded into the frequency domain coefficients of the target image block.
[0256] Optionally, the information to be embedded includes: watermark information to be embedded.
[0257] Optionally, the target image block determination unit is specifically configured to:
[0258] Determine whether the image block to be embedded in the channel is located in the edge area of the channel to be embedded;
[0259] If not, determining the image block of the channel to be embedded as the target image block to be embedded with information;
[0260] If so, it is determined that the image block of the channel to be embedded is not the target image block to be embedded with information.
[0261] Optionally, the target image block determination unit is specifically configured to:
[0262] Performing low-pass filtering on the carrier image to obtain a filtered carrier image;
[0263] Performing edge detection on the filtered carrier image to obtain an edge information map;
[0264] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the channels to be embedded in the carrier image;
[0265] It is determined, according to the sum of the values of the elements contained in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge region of the to-be-embedded channel.
[0266] Optionally, the target image block determination unit is specifically configured to:
[0267] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in an edge region of the to-be-embedded channel;
[0268] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the channel to be embedded corresponding to the image block of the edge information map is not located in the edge area of the channel to be embedded.
[0269] Optionally, the device further includes: a judgment unit,
[0270] for providing a judgment result of whether the corresponding image block of the channel to be embedded is located in the edge area of the channel to be embedded to the client;
[0271] Obtain a second judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded according to the judgment result feedback from the client, and use the second judgment result as the target judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded.
[0272] Optionally, the information obtaining unit is specifically used to:
[0273] Obtain carrier image and original information;
[0274] The original information is encoded to obtain information to be embedded.
[0275] Optionally, the information obtaining unit is specifically used to:
[0276] Encoding the original information to obtain a bit sequence to be embedded;
[0277] According to the embedding capacity of a single image block and the number of bits contained in the bit sequence to be embedded, the information to be embedded is grouped to obtain a plurality of bit subsequences to be embedded.
[0278] Optionally, the information obtaining unit is specifically used to:
[0279] Performing scrambling processing on the original information to obtain scrambled original information;
[0280] A bit sequence to be embedded is generated according to the scrambled original information, the check code and the watermark information header.
[0281] Optionally, the device further comprises: a grouping unit, configured to group the image blocks of the to-be-embedded channels to obtain image block groups having the same number as the bit subsequences to be embedded; each image block group is configured to embed a bit subsequence corresponding thereto;
[0282] Optionally, the information embedding unit is specifically used for:
[0283] The bit subsequence to be embedded is embedded into the frequency domain coefficient of the target image block included in the corresponding image block group.
[0284] Optionally, the information embedding unit is specifically used for:
[0285] Determining an embedding position of each bit of the bit subsequence to be embedded in the target image block;
[0286] According to the embedding position, obtaining a frequency domain coefficient set of a target image block included in the image block group corresponding to each bit position;
[0287] According to the number of positive coefficients, the number of negative coefficients and the embedding strength corresponding to the embedding position of the frequency domain coefficient set, the bit is embedded into the frequency domain coefficient set of the target image block included in the corresponding image block group.
[0288] Optionally, the information embedding unit is specifically used for:
[0289] The signs of the coefficients of the frequency domain coefficient set are modified so that the relationship between the number of positive coefficients, the number of negative coefficients, and the embedding strengths corresponding to the embedding positions of the modified frequency domain coefficient set satisfies a preset relationship.
[0290] Optionally, the device further comprises: an embedding strength determination unit,
[0291] It is used to determine the embedding strength corresponding to the embedding position according to the frequency band position in the target image block corresponding to the frequency domain coefficient of the target image block.
[0292] It should be noted that for the detailed description of the device provided in the third embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0293] Corresponding to the data processing method provided in the first embodiment of the present application, the fourth embodiment of the present application provides an electronic device.
[0294] The electronic device comprises:
[0295] Processor; and
[0296] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:
[0297] Obtaining a carrier image and information to be embedded;
[0298] The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded;
[0299] Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0300] Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0301] The information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0302] It should be noted that for the detailed description of the electronic device provided in the fourth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0303] Corresponding to the data processing method provided in the first embodiment of the present application, the fifth embodiment of the present application provides a storage device storing a program of the data processing method, the program is executed by a processor to perform the following steps:
[0304] Obtaining a carrier image and information to be embedded;
[0305] The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded;
[0306] Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded;
[0307] Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded;
[0308] The information to be embedded is embedded into the frequency domain coefficients of the target image block.
[0309] It should be noted that for the detailed description of the storage device provided in the fifth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0310] Corresponding to the data processing method provided in the second embodiment of the present application, the sixth embodiment of the present application provides a data processing device.
[0311] like Figure 7 As shown, the device comprises:
[0312] An image acquisition unit 701 is used to acquire an image of a target carrier;
[0313] An image block obtaining unit 702 is used to perform block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0314] A frequency domain transform unit 703 is used to perform frequency domain transform on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0315] A target image block determining unit 704 is used to determine a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0316] The original information obtaining unit 705 is used to obtain the original information according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0317] Optionally, the target image block determination unit is specifically configured to:
[0318] Determine whether the image block of the extraction channel is located in the edge area of the extraction channel;
[0319] If not, determining that the image block of the extraction channel is a target image block in which information has been embedded;
[0320] If so, it is determined that the image block of the extracted channel is not a target image block in which information has been embedded.
[0321] Optionally, the target image block determination unit is specifically configured to:
[0322] Performing low-pass filtering on the target carrier image to obtain a filtered target carrier image;
[0323] Performing edge detection on the filtered target carrier image to obtain an edge information map;
[0324] The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the to-be-embedded channels of the target carrier image;
[0325] It is determined, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge region of the extraction channel.
[0326] Optionally, the target image block determination unit is specifically configured to:
[0327] If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel;
[0328] If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the extraction channel corresponding to the image block of the edge information map is not located in the edge area of the extraction channel.
[0329] Optionally, the original information obtaining unit is specifically used for:
[0330] Obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded;
[0331] Combining the multiple bit subsequences to generate a bit sequence;
[0332] The original information is obtained according to the bit sequence.
[0333] Optionally, the original information obtaining unit is specifically used for:
[0334] Checking the bit sequence according to a check code;
[0335] After the verification is passed, the scrambled original information is extracted from the bit sequence;
[0336] The scrambled original information is subjected to descrambling processing to obtain the original information.
[0337] Optionally, the device further comprises: a grouping unit, configured to group the image blocks of the extraction channel to obtain image block groups having the same number as the bit subsequences; each image block group is used to extract a bit subsequence corresponding thereto;
[0338] Optionally, the original information obtaining unit is specifically used for:
[0339] A bit subsequence corresponding to the image block group is obtained from the frequency domain coefficients of the target image blocks included in each image block group.
[0340] Optionally, the original information obtaining unit is specifically used for:
[0341] Obtaining an embedding position of a bit of the bit subsequence in a target image block included in a corresponding image block group;
[0342] According to the embedding position, obtaining a frequency domain coefficient set of the target image block corresponding to the bit position contained in the image block group;
[0343] Determining, according to the number of positive coefficients and the number of negative coefficients of the frequency domain coefficient set, a value of a bit corresponding to the frequency domain coefficient set;
[0344] The values of each bit are combined to obtain a bit subsequence corresponding to the image block group.
[0345] It should be noted that for the detailed description of the device provided in the sixth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0346] Corresponding to the data processing method provided in the second embodiment of the present application, the seventh embodiment of the present application provides an electronic device.
[0347] The electronic device comprises:
[0348] Processor; and
[0349] The memory is used to store a program of the data processing method. After the device is powered on and the program of the data processing method is run by the processor, the following steps are performed:
[0350] Obtaining a target carrier image;
[0351] Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0352] Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0353] Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0354] The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0355] It should be noted that for the detailed description of the electronic device provided in the seventh embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0356] Corresponding to the data processing method provided in the second embodiment of the present application, the eighth embodiment of the present application provides a storage device storing a program of the data processing method, the program is executed by a processor to perform the following steps:
[0357] Obtaining a target carrier image;
[0358] Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel;
[0359] Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel;
[0360] Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel;
[0361] The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
[0362] It should be noted that for the detailed description of the storage device provided in the eighth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0363] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0364] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0365] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0366] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0367] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
Claims
1. A data processing method, characterized in that: include: Obtaining a carrier image and information to be embedded; The channel to be embedded of the carrier image is processed into blocks to obtain image blocks of the channel to be embedded; Performing frequency domain transformation on the image block of the channel to be embedded, to obtain frequency domain coefficients of the image block of the channel to be embedded; Determining a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge area of the channel to be embedded, wherein the target image block is an image block that is not located in an edge area of the channel to be embedded; The information to be embedded is embedded into the frequency domain coefficients of the target image block.
2. The method according to claim 1, characterized in that: The information to be embedded includes: watermark information to be embedded.
3. The method according to claim 1, characterized in that The step of determining the target image block to be embedded with information according to whether the image block of the channel to be embedded is located in the edge area of the channel to be embedded, comprises: Determine whether the image block to be embedded in the channel is located in the edge area of the channel to be embedded; If not, determining the image block of the channel to be embedded as the target image block to be embedded with information; If so, it is determined that the image block of the channel to be embedded is not the target image block to be embedded with information.
4. The method according to claim 3, characterized in that The step of judging whether the image block to be embedded in the channel is located in an edge area of the channel to be embedded, comprises: Performing low-pass filtering on the carrier image to obtain a filtered carrier image; Performing edge detection on the filtered carrier image to obtain an edge information map; The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the channels to be embedded in the carrier image; It is determined, according to the sum of the values of the elements contained in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge region of the to-be-embedded channel.
5. The method according to claim 4, characterized in that Determining, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in the edge area of the to-be-embedded channel includes: If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the to-be-embedded channel corresponding to the image block of the edge information map is located in an edge region of the to-be-embedded channel; If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the channel to be embedded corresponding to the image block of the edge information map is not located in the edge area of the channel to be embedded.
6. The method according to claim 5, characterized in that Also includes: Providing a result of determining whether the corresponding image block of the channel to be embedded is located in an edge area of the channel to be embedded to a client; Obtain a second judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded according to the judgment result feedback from the client, and use the second judgment result as the target judgment result of whether the image block of the corresponding channel to be embedded is located in the edge area of the channel to be embedded.
7. The method according to claim 1, characterized in that The step of obtaining the carrier image and the information to be embedded includes: Obtain carrier image and original information; The original information is encoded to obtain information to be embedded.
8. The method according to claim 7, characterized in that The encoding process of the original information to obtain the information to be embedded includes: Encoding the original information to obtain a bit sequence to be embedded; According to the embedding capacity of a single image block and the number of bits contained in the bit sequence to be embedded, the information to be embedded is grouped to obtain a plurality of bit subsequences to be embedded.
9. The method according to claim 8, characterized in that The encoding process of the original information to obtain a bit sequence to be embedded includes: Performing scrambling processing on the original information to obtain scrambled original information; A bit sequence to be embedded is generated according to the scrambled original information, the check code and the watermark information header.
10. The method according to claim 8, characterized in that Also includes: Grouping the image blocks of the to-be-embedded channels to obtain image block groups with the same number as the bit subsequences to be embedded; Each image block group is used to embed a bit subsequence corresponding to it; The embedding the information to be embedded into the frequency domain coefficient of the target image block comprises: The bit subsequence to be embedded is embedded into the frequency domain coefficient of the target image block included in the corresponding image block group.
11. The method according to claim 10, characterized in that The step of embedding the bit subsequence to be embedded into the frequency domain coefficient of the target image block included in the corresponding image block group includes: Determining an embedding position of each bit of the bit subsequence to be embedded in the target image block; According to the embedding position, obtaining a frequency domain coefficient set of a target image block included in the image block group corresponding to each bit position; According to the number of positive coefficients, the number of negative coefficients and the embedding strength corresponding to the embedding position of the frequency domain coefficient set, the bit is embedded into the frequency domain coefficient set of the target image block included in the corresponding image block group.
12. The method according to claim 11, characterized in that The embedding of bits into the frequency domain coefficient set of the target image block included in the corresponding image block group according to the number of positive coefficients, the number of negative coefficients, and the embedding strength corresponding to the embedding position of the frequency domain coefficient set comprises: The signs of the coefficients of the frequency domain coefficient set are modified so that the relationship between the number of positive coefficients, the number of negative coefficients, and the embedding strengths corresponding to the embedding positions of the modified frequency domain coefficient set satisfies a preset relationship.
13. A data processing method, characterized in that: include: Obtaining a target carrier image; Performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel; Performing frequency domain transformation on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel; Determining a target image block in which information has been embedded according to whether the image block of the extraction channel is located in an edge area of the extraction channel, wherein the target image block is an image block that is not located in an edge area of the extraction channel; The original information is obtained according to the frequency domain coefficients of the target image block in which the information has been embedded.
14. The method according to claim 13, characterized in that The step of determining the target image block in which information has been embedded according to whether the image block of the extraction channel is located in the edge area of the extraction channel comprises: Determine whether the image block of the extraction channel is located in the edge area of the extraction channel; If not, determining that the image block of the extraction channel is the target image block in which the information has been embedded; If so, it is determined that the image block of the extracted channel is not a target image block in which information has been embedded.
15. The method according to claim 14, characterized in that The determining whether the image block of the extraction channel is located in the edge area of the extraction channel includes: Performing low-pass filtering on the target carrier image to obtain a filtered target carrier image; Performing edge detection on the filtered target carrier image to obtain an edge information map; The edge information map is processed by dividing the blocks to obtain image blocks of the edge information map; wherein the method of dividing the blocks of the edge information map is the same as the method of dividing the blocks of the to-be-embedded channels of the target carrier image; It is determined, according to the sum of the values of the elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge region of the extraction channel.
16. The method according to claim 15, characterized in that The step of determining, based on the sum of values of elements included in the image block of the edge information map, whether the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel comprises: If the sum of the values of the elements included in the image block of the edge information map is greater than a preset sum threshold, determining that the image block of the extraction channel corresponding to the image block of the edge information map is located in the edge area of the extraction channel; If the sum of the values of the elements contained in the image block of the edge information map is less than or equal to a preset sum threshold, it is determined that the image block of the extraction channel corresponding to the image block of the edge information map is not located in the edge area of the extraction channel.
17. The method according to claim 13, characterized in that The obtaining original information according to the frequency domain coefficient of the target image block in which the information has been embedded comprises: Obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded; Combining the multiple bit subsequences to generate a bit sequence; The original information is obtained according to the bit sequence.
18. The method according to claim 17, characterized in that The obtaining original information according to the bit sequence includes: Checking the bit sequence according to a check code; After the verification is passed, the scrambled original information is extracted from the bit sequence; The scrambled original information is subjected to descrambling processing to obtain the original information.
19. The method according to claim 17, characterized in that Also includes: Grouping the image blocks of the extraction channel to obtain image block groups with the same number as the bit subsequences; Each image block group is used to extract a bit subsequence corresponding thereto; The step of obtaining a plurality of bit subsequences according to the frequency domain coefficients of the target image block in which the information has been embedded comprises: A bit subsequence corresponding to the image block group is obtained from the frequency domain coefficients of the target image blocks included in each image block group.
20. A data processing device, characterized in that: include: An information obtaining unit, used for obtaining a carrier image and information to be embedded; An image block obtaining unit is used to perform block processing on the to-be-embedded channel of the carrier image to obtain image blocks of the to-be-embedded channel; A frequency domain transform unit, configured to perform frequency domain transform on the image block of the channel to be embedded, so as to obtain frequency domain coefficients of the image block of the channel to be embedded; a target image block determining unit, configured to determine a target image block to be embedded with information according to whether the image block of the channel to be embedded is located in an edge region of the channel to be embedded, wherein the target image block is an image block not located in an edge region of the channel to be embedded; The information embedding unit is used to embed the information to be embedded into the frequency domain coefficients of the target image block.
21. A data processing device, characterized in that: include: An image acquisition unit, used for acquiring an image of a target carrier; An image block obtaining unit, used for performing block processing on the extraction channel of the target carrier image to obtain image blocks of the extraction channel; A frequency domain transform unit, used to perform frequency domain transform on the image block of the extraction channel to obtain frequency domain coefficients of the image block of the extraction channel; a target image block determining unit, configured to determine a target image block in which information has been embedded, according to whether the image block of an extraction channel is located in an edge area of the extraction channel, wherein the target image block is an image block that is not located in an edge area of the extraction channel; The original information obtaining unit is used to obtain the original information according to the frequency domain coefficients of the target image block in which the information has been embedded.
Citation Information
Patent Citations
Image processing method, image processing apparatus, program, and storage medium
JP2007036652A
Image forming apparatus and method, and program
JP2010074387A