Image processing methods, apparatus, devices and storage media
By embedding watermark images into the high-frequency and low-frequency components of the image respectively, and performing inverse discrete wavelet transform fusion processing, the problems of unclear watermark extraction and insufficient robustness are solved, and effective resistance to filtering attacks is achieved.
Patent Information
- Application Number
- CN202211035412.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-08-26
AI Technical Summary
In existing technologies, the watermark image extracted after watermark embedding is unclear, lacks robustness, and is difficult to cope with image filtering attacks.
The image is decomposed into high-frequency and low-frequency images using discrete wavelet transform, and watermark images are embedded in the high-frequency and low-frequency images respectively. The watermark image is then fused using the inverse transform of discrete wavelet transform to improve its robustness.
The robustness of the watermark image has been enhanced, enabling it to better withstand image filtering attacks and improving the clarity of watermark extraction.
Smart Images

Figure CN115375527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to an image processing method, apparatus, device, and storage medium. Background Technology
[0002] With the development of science and technology and the internet, digital images have been widely used, and the copying and transmission of images have become increasingly convenient. Consequently, copyright and privacy protection issues have received increasing attention. Adding blind watermark information to images can achieve the purpose of protecting copyright and privacy.
[0003] There are many methods for blind watermark embedding, such as Least Significant Bit (LSB), Discrete Cosine Transform (DCT), and Discrete Wavelet Transform (DWT). Among existing schemes, Discrete Wavelet Transform is commonly used. DWT, as a frequency domain watermarking steganography technique, has a certain degree of anti-interference capability. Current DWT-based watermark embedding methods reduce the watermark to a one-dimensional matrix and embed it in the high-frequency part of the image, thereby achieving watermark embedding.
[0004] However, in the actual process of watermark extraction, it was found that after the watermark image of this watermark embedding method is subjected to attacks such as cropping, the extracted watermark image is not clear and has insufficient robustness, making it difficult to cope with image filtering attacks. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing an image processing method, apparatus, device, and storage medium to solve the problems of unclear watermark images extracted after watermark embedding, insufficient robustness, and difficulty in dealing with image filtering attacks.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, one embodiment of this application provides an image processing method, the method comprising:
[0008] Perform discrete wavelet transform on the image to be processed to obtain the high-frequency image and the low-frequency image of the image to be processed;
[0009] Watermarking is performed on the preset watermark information to generate a watermark image;
[0010] The watermark image is embedded into the high-frequency image and the low-frequency image respectively to obtain a high-frequency watermark image and a low-frequency watermark image;
[0011] Based on the inverse transform of the discrete wavelet transform, the high-frequency watermark image and the low-frequency watermark image are processed to obtain the first watermark image corresponding to the image to be processed.
[0012] Optionally, the method further includes:
[0013] Determine the binary data corresponding to the watermark image;
[0014] The binary data is embedded into the target pixels of the first watermark image to obtain the target watermark image corresponding to the image to be processed.
[0015] Optionally, embedding the binary data into the target pixels of the image to be processed includes:
[0016] Based on the BCH error correction code, the binary data is embedded into the target pixels of the image to be processed.
[0017] Optionally, embedding the binary data into the target pixels of the image to be processed includes:
[0018] Based on the data length of the binary data, at least one target pixel is determined in the image to be processed;
[0019] The binary data is embedded into each of the target pixels.
[0020] Optionally, embedding the watermark image into the high-frequency image and the low-frequency image respectively to obtain a high-frequency watermark image and a low-frequency watermark image includes:
[0021] Based on two preset embedding coefficients, the watermark image is embedded into the high-frequency image and the low-frequency image respectively to obtain the high-frequency watermark image and the low-frequency watermark image.
[0022] Secondly, another embodiment of this application provides an image processing method, the method comprising:
[0023] Perform discrete wavelet transform on the target watermark image to obtain the high-frequency watermark image and the low-frequency watermark image corresponding to the target watermark image;
[0024] Perform discrete wavelet transform on the original image corresponding to the target watermark image to obtain the high-frequency image and low-frequency image corresponding to the original image;
[0025] Based on the high-frequency watermark image, the low-frequency watermark image, the high-frequency image, and the low-frequency image, determine the watermark image in the target watermark image;
[0026] The watermark image is subjected to image recognition to obtain watermark information.
[0027] Optionally, before performing discrete wavelet transform on the target watermark image to obtain the high-frequency watermark image and low-frequency watermark image corresponding to the target watermark image, the method further includes:
[0028] Color image components are extracted from the target watermark image to determine the binary data corresponding to the watermark image in the target watermark image;
[0029] The binary data is verified to determine whether it is complete.
[0030] Optionally, after verifying the binary data to determine whether the binary data is complete, the method further includes:
[0031] If the binary data is complete, the watermark information corresponding to the target watermark image is determined based on the binary data.
[0032] Thirdly, another embodiment of this application provides an image processing apparatus, the apparatus comprising: a transformation module, an encoding module, an embedding module, and a processing module, wherein:
[0033] The transformation module is used to perform discrete wavelet transform on the image to be processed to obtain the high-frequency image and the low-frequency image of the image to be processed.
[0034] The encoding module is used to encode the preset watermark information and generate a watermark image;
[0035] The embedding module is used to embed the watermark image into the high-frequency image and the low-frequency image respectively, to obtain a high-frequency watermark image and a low-frequency watermark image;
[0036] The processing module is used to process the high-frequency watermark image and the low-frequency watermark image based on the inverse transform of the discrete wavelet transform to obtain the first watermark image corresponding to the image to be processed.
[0037] Optionally, the apparatus further includes: a determining module, wherein:
[0038] The determining module is used to determine the binary data corresponding to the watermark image;
[0039] The embedding module is used to embed the binary data into the target pixels of the first watermark image to obtain the target watermark image corresponding to the image to be processed.
[0040] Optionally, the embedding module is specifically used to embed the binary data into the target pixels of the image to be processed based on the BCH error correction code.
[0041] Optionally, the determining module is specifically used to determine at least one target pixel in the image to be processed based on the data length of the binary data;
[0042] The embedding module is specifically used to embed the binary data into each of the target pixels.
[0043] Optionally, the embedding module is specifically used to embed the watermark image into the high-frequency image and the low-frequency image respectively according to two preset embedding coefficients, so as to obtain the high-frequency watermark image and the low-frequency watermark image.
[0044] Fourthly, another embodiment of this application provides an image processing apparatus, the apparatus comprising: a transformation module, a determination module, and a recognition module, wherein:
[0045] The transformation module is used to perform discrete wavelet transform on the target watermark image to obtain a high-frequency watermark image and a low-frequency watermark image corresponding to the target watermark image; and to perform discrete wavelet transform on the original image corresponding to the target watermark image to obtain a high-frequency image and a low-frequency image corresponding to the original image.
[0046] The determining module is used to determine the watermark image in the target watermark image based on the high-frequency watermark image, the low-frequency watermark image, the high-frequency image, and the low-frequency image.
[0047] The recognition module is used to perform image recognition on the watermark image to obtain watermark information.
[0048] Optionally, the determining module is specifically used to extract color image components from the target watermark image, determine the binary data corresponding to the watermark image in the target watermark image, and verify the binary data to determine whether the binary data is complete.
[0049] Optionally, the determining module is specifically used to determine the watermark information corresponding to the target watermark image based on the binary data if the binary data is complete.
[0050] Fifthly, another embodiment of this application provides an image processing device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the image processing device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method as described in either the first or second aspect above.
[0051] In a sixth aspect, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the method as described in either the first or second aspect above.
[0052] The beneficial effects of this application are as follows: Using the image processing method provided in this application, during the watermark embedding process, a discrete wavelet transform is performed on the image to be processed, simultaneously obtaining high-frequency and low-frequency images of the image to be processed. The encoded watermark image is then embedded into the high-frequency and low-frequency images respectively, resulting in high-frequency and low-frequency watermark images. Subsequently, based on the inverse discrete wavelet transform, the high-frequency and low-frequency watermark images are fused to obtain the first watermark image corresponding to the image to be processed. This method of adding watermarks to the image to be processed not only adds a watermark image to the high-frequency image but also to the low-frequency image, thereby improving the robustness of the watermark image. This allows the watermark image to better cope with image filtering attacks, improving the clarity of the extracted watermark image during subsequent watermark extraction. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A schematic flowchart of an image processing method provided in an embodiment of this application;
[0055] Figure 2 A schematic flowchart illustrating an image processing method provided in another embodiment of this application;
[0056] Figure 3 A schematic flowchart illustrating an image processing method provided in another embodiment of this application;
[0057] Figure 4 A schematic flowchart illustrating an image processing method provided in another embodiment of this application;
[0058] Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;
[0059] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in another embodiment of this application;
[0060] Figure 7 This is a schematic diagram of the structure of an image processing apparatus provided in another embodiment of this application;
[0061] Figure 8 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0063] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0064] Furthermore, the flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed in order or performed simultaneously. Moreover, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0065] To facilitate understanding of this application, the following explanations are provided for some of the terms used in this application:
[0066] Discrete wavelet transform (DWT): The DWT discretizes the scaling and translation of a basic wavelet. In image processing, binary wavelets are often used as the wavelet transform function, meaning that the division is done using integer powers of 2.
[0067] Frequency domain: A coordinate system used to describe the frequency characteristics of a signal. In electronics, control systems engineering, and statistics, a frequency domain plot displays the signal quantity within each given frequency band over a given frequency range. Frequency domain representations can also include information about the phase shift of each sine wave, allowing for the recombination of frequency components to reconstruct the original time signal.
[0068] RGB color image components: The RGB color mode is an industry color standard that obtains various colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them. RGB represents the colors of the three channels of red, green, and blue. This standard includes almost all colors that human vision can perceive and is one of the most widely used color systems.
[0069] BCH codes, an abbreviation of Bose, Ray-Chaudhuri, and Hocquenghem, are a widely studied coding method, particularly in error-correcting codes. In technical terms, BCH codes are multilevel, cyclic, error-correcting, variable-length digital codes used to correct multiple random error patterns.
[0070] The following explanation, using several specific application examples, illustrates an image processing method provided in the embodiments of this application. Figure 1 This is a schematic flowchart of an image processing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:
[0071] S101: Perform discrete wavelet transform on the image to be processed to obtain the high-frequency and low-frequency images of the image to be processed.
[0072] In the embodiments of this application, in the frequency domain: this application uses discrete wavelet transform to convert the image to be processed to the frequency domain, thereby obtaining the high-frequency image and the low-frequency image of the image to be processed.
[0073] S102: Encode the preset watermark information with watermark and generate a watermark image.
[0074] The watermark encoding method can be, for example, based on 64 printable characters to represent binary data (base64). The specific watermark encoding method can be flexibly adjusted according to user needs, and this application does not impose any restrictions.
[0075] S103: Embed the watermark image into the high-frequency image and the low-frequency image respectively to obtain the high-frequency watermark image and the low-frequency watermark image.
[0076] In this application, the watermark image is repeatedly embedded into the high-frequency and low-frequency parts of the image to be processed to achieve multi-level watermark embedding. This can, to some extent, prevent the watermark image from being damaged by attacks in scenarios where attacks on the watermark are possible, and improve the watermark image's anti-interference ability.
[0077] In some possible embodiments, the watermark image can be embedded into the high-frequency image and the low-frequency image respectively, for example, by embedding the watermark image into the high-frequency image and the low-frequency image respectively according to two preset embedding coefficients, to obtain the high-frequency watermark image and the low-frequency watermark image.
[0078] In other words, the technique of image processing using discrete wavelet transform involves decomposing the digital watermark image into multi-resolution layers, expanding it into specific levels to form layered watermark images of different frequencies, and then performing calculations and processing on each layer of sub-images. Specifically, after undergoing one two-dimensional discrete wavelet transform, the image to be processed can be decomposed into sub-images of the following four components: a sub-image of the approximation component A, a sub-image of the vertical detail component H, a sub-image of the horizontal detail component V, and a sub-image of the diagonal detail component D. Here, A represents the low-frequency approximation component, and H, V, and D represent the high-frequency detail components, respectively.
[0079] In the embodiments of this application, two preset embedding coefficients k1 and k2 are introduced. First, the component matrix information Cw of the watermark image is embedded into the low-frequency information Ca of the image component to be processed. The embedding code is: Ca = Ca + k1 * Cw (where a is the A representing the low-frequency approximation component mentioned above), which means the watermark component matrix Cw * embedding coefficient k1 is added to the image component matrix Ca to be processed. Similarly, the watermark is repeatedly embedded into the sub-images at the horizontal, vertical, and diagonal positions of the high-frequency component according to the preset embedding coefficient k2.
[0080] In the embodiments of this application, since the low-frequency component of the watermark image contains most of the information of the watermark image, while the high-frequency component contains the details or differences of the watermark image, the coefficient of the low-frequency component can be appropriately increased to increase the proportion of the low-frequency watermark. This allows the watermark image to be enhanced by fusing the low-frequency watermark image with the high-frequency watermark image, even in scenarios where the watermark image is subjected to attacks such as cropping, due to the relatively high integrity of the low-frequency watermark image. This enhances the robustness of the watermark image.
[0081] S104: Based on the inverse transform of discrete wavelet transform, the high-frequency watermark image and the low-frequency watermark image are processed to obtain the first watermark image corresponding to the image to be processed.
[0082] In other words, based on the inverse transform of discrete wavelet transform, the high-frequency watermark image and the low-frequency watermark image are fused to obtain a watermark image that combines the high-frequency and low-frequency watermark images as the first watermark image corresponding to the image to be processed. Because this watermark image embedding method combines the low-frequency and high-frequency watermark images, when extracting watermark information in the subsequent process, the high-frequency watermark image information and the low-frequency watermark image information can be extracted separately and then fused together, making the extracted watermark image clearer and thus enhancing the robustness of the watermark image.
[0083] The image processing method provided in this application performs discrete wavelet transform on the image to be processed during the watermark embedding process, obtaining both high-frequency and low-frequency images of the image to be processed. The encoded watermark image is then embedded into the high-frequency and low-frequency images respectively, resulting in high-frequency and low-frequency watermark images. Subsequently, based on the inverse discrete wavelet transform, the high-frequency and low-frequency watermark images are fused to obtain the first watermark image corresponding to the image to be processed. This method of adding watermarks to the image to be processed not only adds watermark images to the high-frequency images of the image to be processed, but also adds watermark images to the low-frequency images, thereby improving the robustness of the watermark image and enabling it to better cope with image filtering attacks. This also improves the clarity of the extracted watermark image during subsequent watermark extraction.
[0084] Optionally, based on the above embodiments, this application embodiment may also provide an image processing method, the implementation process of which will be illustrated below with reference to the accompanying drawings. Figure 2 A flowchart illustrating an image processing method provided in another embodiment of this application is shown below. Figure 2 As shown, the method may further include:
[0085] S105: Determine the binary data corresponding to the watermark image.
[0086] For ease of processing, before embedding the watermark, the watermark string information corresponding to the image to be embedded needs to be processed into binary data, and then the watermark image is embedded based on the binary data. Because watermarks... Figure 1 Watermarks are typically grayscale binary images. Therefore, the watermark string information can be thresholded first to convert it into binary binary watermark information. This allows for direct embedding of the watermark into the grayscale binary image. In a grayscale binary image, pixel values have only two types: 0 and 255, representing black and white respectively. Converting 255 to 1 yields a binary binary image. In a binary binary image, only one bit represents a pixel value, with only two possible values: 0 and 1. This processing facilitates watermark embedding more easily.
[0087] S106: Embed binary data into the target pixels of the first watermark image to obtain the target watermark image corresponding to the image to be processed.
[0088] In some possible embodiments, at least one target pixel can be determined in the first watermark image based on the data length of the binary data; then the binary data can be embedded into each target pixel.
[0089] In the embodiments of this application, the method of embedding binary data into the target pixel of the first watermark image can be, for example, by embedding binary data through RGB steganography, wherein RGB steganography is based on the RGB three channels of the image, the steganographic information can be converted into binary data, and then the binary data is embedded into the RGB channels respectively, thereby realizing the steganography of the watermark image.
[0090] In most use cases, the watermark character data length is generally tens of bytes. When embedding, one byte of data can be mapped to the RGB channel of one pixel. Therefore, the number of target pixels for embedding is generally tens.
[0091] In some possible embodiments, since each channel of each pixel is 8 bits, modifying the lower four bits of a channel has little disturbance to the channel, and the human eye cannot see any difference after modification. Therefore, in order to reduce the impact of RGB steganography on the overall first watermark image, binary data can be embedded into the lower four bits of each RGB channel of each target pixel, thereby achieving steganography of the watermark image while reducing the impact on the overall first watermark image.
[0092] In other possible embodiments, in order to verify and correct the watermark information, in the embodiments of this application, the binary data after verification and correction can also be embedded into the target pixel of the first watermark image based on the BCH error correction code.
[0093] Optionally, in some possible embodiments, the method of embedding binary data into the target pixels of the first watermark image based on BCH error correction code can be replaced by embedding binary data into the target pixels of the first watermark image based on Hamming code. It should be understood that the above embodiments are only illustrative examples, and the specific method of embedding binary data into the first watermark image can be flexibly adjusted according to user needs. This application does not impose any restrictions here.
[0094] Using the method provided in this application, in the frequency domain of the image to be processed, the discrete wavelet transform can decompose the image to be processed into a multi-frequency image. The watermark image is simultaneously embedded in the high-frequency and low-frequency image parts with different preset embedding coefficients to achieve multi-level watermark image embedding. In the subsequent extraction of the watermark image, the watermark images of multiple frequencies can be fused together to make the extracted watermark image clearer, thereby enhancing the robustness of the watermark image.
[0095] Furthermore, RGB steganography and BCH encoding are also used to embed the watermark image in the spatial domain, enabling rapid extraction and verification of the watermark content and effectively improving the extraction efficiency. Therefore, the combination of frequency and spatial domain methods provided in this application can, to a certain extent, avoid the destruction of the watermark image and improve its anti-interference ability and extraction efficiency.
[0096] The following explanation, using several specific application examples, illustrates an image processing method provided in the embodiments of this application. Figure 3 This is a schematic flowchart of an image processing method provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes:
[0097] S201: Perform discrete wavelet transform on the target watermark image to obtain the high-frequency watermark image and low-frequency watermark image corresponding to the target watermark image.
[0098] Among them, the high-frequency watermark image is the high-frequency watermark image including the watermark image corresponding to the high-frequency part of the target watermark image, and the low-frequency watermark image is the low-frequency watermark image including the watermark image corresponding to the low-frequency part of the target watermark image.
[0099] S202: Perform discrete wavelet transform on the original image corresponding to the target watermark image to obtain the high-frequency image and low-frequency image corresponding to the original image.
[0100] The original image is the image without the watermark corresponding to the target watermark image. By performing discrete wavelet transform on the original image, we can obtain the high-frequency image without the watermark corresponding to the high-frequency part of the original image, and the low-frequency image without the watermark corresponding to the low-frequency part of the original image.
[0101] S203: Determine the watermark image in the target watermark image based on the high-frequency watermark image, low-frequency watermark image, high-frequency image, and low-frequency image.
[0102] The target watermark image is transformed into multiple frequency images using discrete wavelet transform, and watermark information is extracted simultaneously from the high-frequency and low-frequency components to obtain frequency domain watermark image data: high-frequency watermark image and low-frequency watermark image. The original image is then transformed into multiple frequency images using discrete wavelet transform to obtain its frequency domain data: high-frequency image and low-frequency image. The extracted target watermark image frequency domain watermark image data is then compared one-to-one with the corresponding original image frequency domain data in the high-frequency and low-frequency components to obtain the low-frequency and high-frequency information of the watermark image. Finally, the low-frequency and high-frequency information of the watermark image is fused to obtain a relatively complete watermark image. The original image is acquired beforehand prior to the comparison.
[0103] Specifically, during watermark extraction, the component matrix information of the target watermark image is compared with the component matrix information of the original image to obtain the low-frequency component A and high-frequency component (H, V, D) of the watermark image. These components are then divided by the preset embedding coefficients k1 and k2 corresponding to the low-frequency and high-frequency components, respectively, to obtain the low-frequency and high-frequency information of the watermark image. These are then fused using the following method to obtain the watermark image matrix, and the watermark information is obtained from the watermark image matrix. That is: Watermark image matrix information = Low-frequency information of the watermark image * Low-frequency component coefficient k1 + High-frequency information of the watermark image * High-frequency component coefficient k2.
[0104] The two preset embedding coefficients k1 and k2 can be flexibly set according to the user's needs, and the ratio between k1 and k2 can be flexibly set. In the embodiments of this application, since the low-frequency part of the image contains most of the information of the image, while the high-frequency part is the detail or difference of the image, the preset embedding coefficient k1 corresponding to the low-frequency component can be appropriately increased during the setting process to increase the proportion of the low-frequency watermark. This ensures that a low-frequency watermark image with relatively high completion can be obtained in the subsequent decoding process. Then, the low-frequency watermark image is fused with the high-frequency part to enhance the watermark, thereby improving the robustness of the watermark.
[0105] S204: Perform image recognition on the watermark image to obtain watermark information.
[0106] Optionally, based on the above embodiments, this application embodiment may also provide an image processing method, the implementation process of which will be illustrated below with reference to the accompanying drawings. Figure 4 A flowchart illustrating an image processing method provided in another embodiment of this application is shown below. Figure 4 As shown, prior to S201, this may include:
[0107] S211: Extract the color image components from the target watermark image to determine the binary data corresponding to the watermark image in the target watermark image.
[0108] S212: Verify the binary data to determine if it is complete.
[0109] In the embodiments of this application, when extracting watermarks, the target watermark image can first be RGB extracted to extract the binary data of the watermark. Then, it can be segmented according to the set effective information length and the number of bits of the BCH code, and the binary data corresponding to the watermark image can be verified to determine whether the binary data is complete. If it is incomplete, it means that the current target watermark image is an attacked watermark image, and S201 is executed at this time.
[0110] If the binary data is complete, it means that the current target watermark image is an unattacked watermark image. At this time, the watermark content can be directly extracted and output, that is, S213 is executed directly: determine the watermark information corresponding to the target watermark image based on the binary data.
[0111] The image processing method described above proposes a discrete wavelet transform-based approach, creatively combining discrete wavelet transform with RGB steganography watermarking technology to further improve the robustness and extraction efficiency of image watermarks. The above image processing method is... Figures 1-2 The inverse method of image processing, i.e. Figures 1-2 The image processing method is an image watermarking method, the above Figures 3-4 The image processing method described above is a watermark extraction method, and its beneficial effects are the same as those mentioned above. Figures 1-2 The beneficial effects of the image processing methods are the same, and will not be elaborated further in this application.
[0112] The image processing apparatus provided in this application will be explained and described below with reference to the accompanying drawings. This image processing apparatus can perform the above-described... Figures 1-4 The specific implementation and beneficial effects of any image processing method are described above and will not be repeated below.
[0113] Figure 5 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes: a transformation module 301, an encoding module 302, an embedding module 303, and a processing module 304, wherein:
[0114] Transformation module 301 is used to perform discrete wavelet transform on the image to be processed to obtain the high-frequency image and low-frequency image of the image to be processed;
[0115] Encoding module 302 is used to encode the preset watermark information and generate a watermark image;
[0116] Embedding module 303 is used to embed the watermark image into the high-frequency image and the low-frequency image respectively to obtain the high-frequency watermark image and the low-frequency watermark image;
[0117] The processing module 304 is used to process the high-frequency watermark image and the low-frequency watermark image based on the inverse transform of the discrete wavelet transform to obtain the first watermark image corresponding to the image to be processed.
[0118] Optionally, based on the above embodiments, this application may also provide an image processing apparatus, as described below with reference to the accompanying drawings. Figure 5 The implementation process of the given device is illustrated with examples. Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in another embodiment of this application, as shown below. Figure 6As shown, the device further includes: a determining module 305, wherein:
[0119] The determination module 305 is used to determine the binary data corresponding to the watermark image;
[0120] The embedding module 303 is used to embed binary data into the target pixels of the first watermark image to obtain the target watermark image corresponding to the image to be processed.
[0121] Optionally, the embedding module 303 is specifically used to embed binary data into target pixels of the image to be processed based on BCH error correction codes.
[0122] Optionally, the determining module 305 is specifically used to determine at least one target pixel in the image to be processed based on the data length of the binary data;
[0123] The embedding module 303 is specifically used to embed binary data into each target pixel.
[0124] Optionally, the embedding module 303 is specifically used to embed the watermark image into the high-frequency image and the low-frequency image respectively according to two preset embedding coefficients, so as to obtain the high-frequency watermark image and the low-frequency watermark image.
[0125] Figure 7 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application, as shown below. Figure 5 As shown, the device includes: a transformation module 401, a determination module 402, and an identification module 403, wherein:
[0126] The transformation module 401 is used to perform discrete wavelet transform on the target watermark image to obtain the high-frequency watermark image and the low-frequency watermark image corresponding to the target watermark image; and to perform discrete wavelet transform on the original image corresponding to the target watermark image to obtain the high-frequency image and the low-frequency image corresponding to the original image.
[0127] The determining module 402 is used to determine the watermark image in the target watermark image based on the high-frequency watermark image, the low-frequency watermark image, the high-frequency image, and the low-frequency image.
[0128] The recognition module 403 is used to perform image recognition on the watermark image to obtain watermark information.
[0129] Optionally, the determining module 402 is specifically used to extract color image components from the target watermark image, determine the binary data corresponding to the watermark image in the target watermark image, and verify the binary data to determine whether the binary data is complete.
[0130] Optionally, the determining module 402 is specifically used to determine the watermark information corresponding to the target watermark image based on the binary data if the binary data is complete.
[0131] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0132] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0133] Figure 8 This is a schematic diagram of the structure of an image processing device provided in an embodiment of this application. The image processing device can be integrated into a terminal device or a chip of a terminal device.
[0134] like Figure 8 As shown, the image processing device includes a processor 501, a storage medium 503, and a bus 502.
[0135] Processor 501 is used to store programs, and processor 501 calls the programs stored in storage medium 503 to execute the above-mentioned programs. Figures 1-4 The corresponding method implementation is similar in both implementation and technical effect, and will not be described in detail here.
[0136] Optionally, this application also provides a program product, such as a storage medium storing a computer program, including a program that executes the embodiments corresponding to the above-described methods when run by a processor.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0139] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0140] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An image processing method, characterized in that, The method includes: Perform discrete wavelet transform on the image to be processed to obtain the high-frequency image and the low-frequency image of the image to be processed; Watermarking is performed on the preset watermark information and a watermark image is generated. The watermark image is embedded into the high-frequency image and the low-frequency image respectively to obtain a high-frequency watermark image and a low-frequency watermark image; Based on the inverse transform of the discrete wavelet transform, the high-frequency watermark image and the low-frequency watermark image are processed to obtain the first watermark image corresponding to the image to be processed; The method further includes: Determine the binary data corresponding to the watermark image; The binary data is embedded into the target pixels of the first watermark image to obtain the target watermark image corresponding to the image to be processed. The method further includes: Color image components are extracted from the target watermark image to determine the binary data corresponding to the watermark image in the target watermark image; The binary data is verified to determine whether it is complete. If the binary data is complete, the watermark information corresponding to the target watermark image is determined based on the binary data; If the binary data is incomplete, perform discrete wavelet transform on the target watermark image to obtain the high-frequency watermark image and low-frequency watermark image corresponding to the target watermark image; Perform discrete wavelet transform on the original image corresponding to the target watermark image to obtain the high-frequency image and low-frequency image corresponding to the original image; Based on the high-frequency watermark image, the low-frequency watermark image, the high-frequency image, and the low-frequency image, determine the watermark image in the target watermark image; The watermark image is subjected to image recognition to obtain watermark information.
2. The method as described in claim 1, characterized in that, The step of embedding the binary data into the target pixels of the image to be processed includes: Based on the BCH error correction code, the binary data is embedded into the target pixels of the image to be processed.
3. The method as described in claim 1, characterized in that, The step of embedding the binary data into the target pixels of the image to be processed includes: Based on the data length of the binary data, at least one target pixel is determined in the image to be processed; The binary data is embedded into each of the target pixels.
4. The method as described in claim 1, characterized in that, The step of embedding the watermark image into the high-frequency image and the low-frequency image respectively to obtain the high-frequency watermark image and the low-frequency watermark image includes: Based on two preset embedding coefficients, the watermark image is embedded into the high-frequency image and the low-frequency image respectively to obtain the high-frequency watermark image and the low-frequency watermark image.
5. An image processing device, characterized in that, The device includes a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the image processing device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1-4.
6. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the method described in any one of claims 1-4.
Citation Information
Patent Citations
Self-adaptive image watermark embedding method based on wavelet transformation and visual characteristics
CN103559677A
Watermark template generation method and device for embedding hidden digital watermark into image
CN111445374A