CN113284034A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN113284034A
CN113284034A CN202110583483.2A CN202110583483A CN113284034A CN 113284034 A CN113284034 A CN 113284034A CN 202110583483 A CN202110583483 A CN 202110583483A CN 113284034 A CN113284034 A CN 113284034A
Authority
CN
China
Prior art keywords
image
processed
watermark
frequency domain
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110583483.2A
Other languages
Chinese (zh)
Inventor
张晶龙
许万龙
高鹏
赵瑞航
王彦贺
张琪
付来权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202110583483.2A priority Critical patent/CN113284034A/en
Publication of CN113284034A publication Critical patent/CN113284034A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant

Landscapes

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

Abstract

The embodiment of the application provides an image processing method and device, when a watermark is added to an image, the image to be processed and the watermark to be processed are respectively obtained; superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image; replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein, the target image comprises a watermark to be processed; and outputting the target image. Therefore, the watermark in the generated target image can be quickly extracted, the watermark in the image can be prevented from being damaged to a certain extent, and the robustness of the watermark to be processed in the target image is effectively improved.

Description

Image processing method and device
Technical Field
The present application relates to the field of information security technologies, and in particular, to an image processing method and apparatus.
Background
Image watermarking technology is widely applied in many fields, such as image property protection, anti-counterfeiting and the like, and can improve the information security.
In the prior art, watermark information is usually added to an image by using a Least Significant Bit (LSB) method, so that the watermark information in the image can be accurately and quickly extracted, for example, when an image property right is protected, the watermark information in the image can be quickly extracted, and thus the property right affiliation of the image is determined.
However, when the least significant bit method is adopted to add watermark information to an image, the obtained watermark information in the image is easily damaged, so that the watermark information cannot be read, and the robustness of the watermark information is poor.
Disclosure of Invention
The embodiment of the application provides an image processing method and device, so that watermarks in subsequent images can be quickly extracted, and the watermarks in the images can be prevented from being damaged more easily to a certain extent, and the robustness of the watermarks in target images is effectively improved.
In a first aspect, an embodiment of the present application provides an image processing method, where the image processing method includes:
and respectively acquiring the image to be processed and the watermark to be processed.
And superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image.
Replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein the target image comprises the watermark to be processed.
And outputting the target image.
In a possible implementation manner, the superimposing the frequency domain image corresponding to the watermark to be processed on the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image includes:
and respectively carrying out transformation processing on the image to be processed and the watermark to be processed to obtain a frequency domain image corresponding to the image to be processed and a frequency domain image corresponding to the watermark to be processed.
And superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to generate the new frequency domain image.
In a possible implementation manner, the replacing binary data corresponding to the watermark to be processed with least significant bits of pixels in a new image corresponding to the new frequency domain image to generate a target image includes:
carrying out inverse transformation processing on the new frequency domain image to obtain the new image corresponding to the new frequency domain image; wherein the inverse transform process and the transform process are inverse transforms to each other.
And replacing the binary data corresponding to the watermark to be processed to the least significant bit of the pixel in the new image to obtain the target image.
In a possible implementation manner, the replacing binary data corresponding to the watermark to be processed with least significant bits of pixels in the new image to obtain the target image includes:
and carrying out binary conversion on the watermark to be processed to obtain the binary data.
A plurality of pixels are extracted from the new image and a least significant bit of each of the plurality of pixels is determined, respectively.
And respectively replacing the binary data to the least significant bit of each pixel to obtain the target image.
In a possible implementation manner, the separately transforming the image to be processed and the watermark to be processed includes:
respectively carrying out transformation processing on the image to be processed and the watermark to be processed by adopting a first transformation processing method; wherein the first transform processing method is any one of methods of two-dimensional fourier transform, discrete cosine transform, or wavelet transform.
In a possible implementation manner, the inverse transforming the new frequency domain image to obtain the new image corresponding to the new frequency domain image includes:
performing inverse transformation processing on the new frequency domain image by adopting a second transformation processing method; the second transformation processing method and the first transformation processing method are inverse transformation.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
and the acquisition unit is used for respectively acquiring the image to be processed and the watermark to be processed.
And the processing unit is used for superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image.
The processing unit is used for replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein the target image comprises the watermark to be processed.
An output unit for outputting the target image.
In a possible implementation manner, the processing unit is specifically configured to perform transform processing on the image to be processed and the watermark to be processed respectively to obtain a frequency domain image corresponding to the image to be processed and a frequency domain image corresponding to the watermark to be processed; and superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to generate the new frequency domain image.
In a possible implementation manner, the processing unit is specifically configured to perform inverse transformation processing on the new frequency domain image to obtain the new image corresponding to the new frequency domain image; wherein the inverse transform process and the transform process are inverse transforms to each other; and replacing the binary data corresponding to the watermark to be processed to the least significant bit of the pixel in the new image to obtain the target image.
In a possible implementation manner, the processing unit is specifically configured to perform binary conversion on the watermark to be processed to obtain the binary data; extracting a plurality of pixels from the new image and respectively determining the least significant bit of each of the plurality of pixels; and respectively replacing the binary data to the least significant bit of each pixel to obtain the target image.
In a possible implementation manner, the processing unit is specifically configured to apply a first transform processing method to respectively transform the image to be processed and the watermark to be processed; wherein the first transform processing method is any one of methods of two-dimensional fourier transform, discrete cosine transform, or wavelet transform.
In a possible implementation manner, the processing unit is specifically configured to perform inverse transform processing on the new frequency domain image by using a second transform processing method; the second transformation processing method and the first transformation processing method are inverse transformation.
In a third aspect, an embodiment of the present application further provides an image processing apparatus, which may include a memory and a processor; wherein the content of the first and second substances,
the memory is used for storing the computer program.
The processor is configured to read the computer program stored in the memory, and execute the image processing method in any one of the possible implementation manners of the first aspect according to the computer program in the memory.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer-executable instruction is stored in the computer-readable storage medium, and when a processor executes the computer-executable instruction, the image processing method described in any one of the foregoing possible implementation manners of the first aspect is implemented.
In a fifth aspect, this application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the image processing method described in any one of the possible implementation manners of the first aspect.
Therefore, the embodiment of the application provides an image processing method and device, when a watermark is added to an image, the image to be processed and the watermark to be processed are respectively obtained; superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image; replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein, the target image comprises a watermark to be processed; and outputting the target image. In this way, the watermark to be processed and the frequency domain image corresponding to the image to be processed are overlapped, and the binary data of the watermark to be processed is used for replacing the least significant bit of the pixel in the new image after the frequency domain overlapping, namely, the watermark is added in the image through two different overlapping modes, so that the watermark in the generated target image can be quickly extracted, the watermark in the image can be prevented from being damaged to a certain extent, and the robustness of the watermark in the target image is effectively improved.
Drawings
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another image processing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present application.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. In the description of the text of the present application, the character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The technical scheme provided by the embodiment of the application can be applied to image watermarking scenes. Image watermarking technology is widely applied in many fields, such as image property protection, anti-counterfeiting and the like, and can improve the information security.
In the prior art, watermark information is usually added to an image by using a Least Significant Bit (LSB) method, so that the watermark information in the image can be accurately and quickly extracted, for example, when an image property right is protected, the watermark information in the image can be quickly extracted, and thus the property right affiliation of the image is determined. However, when the least significant bit method is adopted to add watermark information to an image, the obtained watermark information in the image is easily damaged, so that the watermark information cannot be read, and the robustness of the watermark information is poor.
In order to solve the problem that the robustness of the watermark information is poor when the watermark information is added to the image by the least significant bit method, the watermark information is considered to be difficult to damage when the watermark information is added to the image by the domain transformation method. Therefore, the watermark information can be added to the image to be processed in the frequency domain; and the watermark information is added again by a least significant bit method, so that the watermark information in the image is difficult to damage, and the robustness of the watermark information in the image is improved.
Based on the above concept, the embodiment of the application provides an image processing method, when adding a watermark to an image, firstly, respectively obtaining an image to be processed and a watermark to be processed; superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image; replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein, the target image comprises a watermark to be processed; and outputting the target image.
Therefore, in the embodiment of the application, the target image containing the watermark to be processed is obtained by obtaining the new frequency domain image of the image to be processed containing the watermark to be processed and replacing the least significant bit of the new frequency domain image with the binary data of the watermark to be processed by using the method of the least significant bit, so that the watermark in the generated target image can be quickly extracted, and the watermark in the image can be prevented from being damaged to a certain extent, thereby effectively improving the robustness of the watermark in the target image.
Hereinafter, the image processing method provided by the present application will be described in detail by specific examples. It is to be understood that the following detailed description may be combined with other embodiments, and that the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present application. The image processing method may be performed by software and/or hardware means, for example, the hardware means may be an image processing means, which may be a terminal or a processing chip in the terminal. For example, referring to fig. 1, the image processing method may include:
s101, respectively obtaining an image to be processed and a watermark to be processed.
For example, the obtained to-be-processed watermark may be data in various forms, such as an image form, a text form, a numerical value form, and the like.
When the image to be processed and the watermark to be processed are respectively obtained, the image to be processed and the watermark to be processed can be automatically obtained by inputting the positions where the image to be processed and the watermark to be processed are respectively located, for example, the storage paths of the image to be processed and the watermark to be processed are respectively obtained, and the image to be processed and the watermark to be processed are obtained according to the storage paths. The embodiments of the present application are described by way of example only, and do not represent that the embodiments of the present application are limited thereto.
And S102, superposing the frequency domain image corresponding to the watermark to be processed to the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image.
When the frequency domain image corresponding to the watermark to be processed is superposed to the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image, the image to be processed and the watermark to be processed can be respectively subjected to transformation processing to obtain a frequency domain image corresponding to the image to be processed and a frequency domain image corresponding to the watermark to be processed; and superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to generate a new frequency domain image.
In the embodiment of the application, the image to be processed and the watermark to be processed are transformed, and the obtained corresponding frequency domain images are superposed to generate a new frequency domain image, so that the watermark to be processed in the generated frequency domain image is difficult to damage, and the robustness of the target image containing the watermark to be processed is improved.
For example, when the image to be processed and the watermark to be processed are respectively transformed, a first transformation processing method may be adopted to respectively transform the image to be processed and the watermark to be processed; wherein the first transform processing method is any one of methods of two-dimensional fourier transform, discrete cosine transform, or wavelet transform. For example, the image to be processed and the watermark to be processed may be transformed by a two-dimensional discrete cosine transform method, and the specific process is as follows: and transforming the image into an even function form by utilizing the symmetry of Fourier transform and adopting image boundary tucking operation, and performing two-dimensional discrete Fourier transform on the obtained image to ensure that the transformed result only contains a cosine term, thereby obtaining frequency domain images respectively corresponding to the image to be processed and the watermark to be processed.
In the embodiment of the application, the image to be processed and the watermark to be processed are subjected to transform processing by any one of methods of two-dimensional Fourier transform, discrete cosine transform and wavelet transform, and the watermark to be processed is added to the image to be processed by the method of transform domain, so that the method has stronger resistance to lossy compression and other signal processing, and the robustness of the target image added with the watermark to be processed can be effectively improved.
S103, replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate the target image.
Wherein, the target image comprises the watermark to be processed.
When the binary data corresponding to the watermark to be processed is replaced to the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate the target image, the new frequency domain image can be subjected to inverse transformation processing to obtain a new image corresponding to the new frequency domain image; the inverse transformation processing and the transformation processing are inverse transformation; and replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image to obtain the target image. Illustratively, the new image is a to-be-processed image containing a to-be-processed watermark.
In the embodiment of the application, the watermark to be processed in the target image can be quickly extracted by obtaining the new image corresponding to the new frequency domain image and replacing the least significant bit of the pixel in the new image with the binary data corresponding to the watermark to be processed, so that the extraction efficiency of the watermark to be processed is ensured.
Illustratively, when the new frequency domain image is subjected to inverse transformation processing to obtain a new image corresponding to the new frequency domain image, the new frequency domain image is subjected to inverse transformation processing by adopting a second transformation processing method; the second transformation processing method and the first transformation processing method are inverse transformation. For example, if the first transform processing method is two-dimensional fourier transform, the second transform processing method is two-dimensional inverse fourier transform.
In the embodiment of the application, the new frequency domain image is inversely transformed by the second transformation processing method corresponding to the first transformation processing method to obtain a new image, and the new image can be continuously processed, so that the image added with the watermark to be processed has a small difference with the image to be processed, is difficult to distinguish visually, and ensures the fidelity of the new image.
When the binary data corresponding to the watermark to be processed is replaced to the least significant bit of the pixel in the new image to generate the target image, binary conversion can be carried out on the watermark to be processed to obtain the binary data; extracting a plurality of pixels from the new image and respectively determining the least significant bit of each pixel in the plurality of pixels; and respectively replacing the binary data to the least significant bit of each pixel to obtain the target image. Wherein the least significant bit is the least significant bit of the binary data of each pixel.
When extracting pixels from a new image, information of the new image, for example, the height and width of the new image, may be acquired, and then the pixels may be extracted from the new image according to the information of the new image. There are various methods for extracting pixels from a new image, for example, the pixels can be obtained by writing an algorithm in matlab software, and the method for obtaining the pixels in the new image is not limited in this embodiment.
For example, when determining the least significant bit of each of the plurality of pixels, the least significant bit of each of the plurality of pixels may be determined by determining whether the pixel value is an odd number or an even number. If the pixel value is odd, the least significant bit corresponding to the pixel value is 1; if the pixel value is even, the least significant bit of the pixel value is 0. Or binary conversion can be performed on each of the obtained multiple pixels to obtain binary values corresponding to the pixels; the lowest bit of the binary values corresponding to the respective pixels is obtained and determined as the lowest significant bit of each of the plurality of pixels. The embodiment of the present application does not limit the method for determining the least significant bit of each of the plurality of pixels.
When the binary data is respectively replaced to the least significant bit of each pixel to obtain the target image, the binary data may be directly compared with the least significant bit of each pixel, if the binary data is the same as the least significant bit of each pixel, the least significant bit of each pixel is not changed, and if the binary data is different from the least significant bit of each pixel, the least significant bit of each pixel is replaced with the corresponding binary data.
In the embodiment of the application, because the damage of the watermark information added by the least significant bit method to the original image is small, the binary data corresponding to the watermark to be processed is used for replacing the least significant bit of the pixel in the new image corresponding to the obtained new frequency domain image to obtain the target image, so that the damage to the new image is small, the obtained target image contains the watermark information, and the efficiency of extracting the watermark to be processed in the target image is ensured.
And S104, outputting the target image.
Therefore, when the image is added with the watermark, the image processing method provided by the embodiment of the application firstly obtains the image to be processed and the watermark to be processed respectively; superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image; replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein, the target image comprises a watermark to be processed; and outputting the target image. In this way, the watermark to be processed and the frequency domain image corresponding to the image to be processed are overlapped, and the binary data of the watermark to be processed is used for replacing the least significant bit of the pixel in the new image after the frequency domain overlapping, namely, the watermark is added in the image through two different overlapping modes, so that the watermark in the generated target image can be quickly extracted, the watermark in the image can be prevented from being damaged to a certain extent, and the robustness of the watermark to be processed in the target image is effectively improved.
For facilitating understanding of the image processing method provided in the embodiment of the present application, in the following, a detailed description will be made on a technical solution provided in the embodiment of the present application by taking an example of an application of the image processing method in practice, and specifically, as shown in fig. 2, fig. 2 is a schematic flow chart of another image processing method provided in the embodiment of the present application.
For example, the image processing method shown in fig. 2 may process an image in a photo saving system, and according to fig. 2, it is necessary to perform two-dimensional fourier transform on an original image and watermark information to obtain a first frequency domain image corresponding to the original image and a second frequency domain image corresponding to the watermark information, respectively. The original image is an image which is not added with any watermark information in the photo retention system; the watermark information is used to identify the property right attribution of the original image or information of a device allowing the original image to be loaded, and the specific content of the watermark information is not limited in this embodiment of the application.
For example, OpenCV may be used to perform two-dimensional fourier transform on the original image and the watermark information. OpenCV is a BSD license (open source) -based cross-platform computer vision and machine learning software library, which can run in various operating systems, such as Windows and Android operating systems.
Further, the first frequency domain graph and the second frequency domain graph are superposed to generate a frequency domain graph containing watermark information; and performing two-dimensional inverse Fourier transform on the frequency domain graph containing the watermark information to generate a new image containing the watermark information. The generated new image containing the watermark information has small difference with the original image and cannot be distinguished by human eyes.
For example, in order to improve the extraction efficiency of the added watermark information, each pixel information in the generated new image containing the watermark information may be extracted, and the least significant bit of the binary information corresponding to each pixel information may be obtained. The original image may be an image in PNG format, that is, 8 of the original image may be obtained as binary information.
Further, the watermark information can be subjected to binarization processing to obtain binary information corresponding to the watermark information, and the binary information corresponding to the watermark information sequentially replaces the least significant bit of each pixel to obtain the target image.
For example, when the Image is watermarked by using the least significant bit method, the Image may be added by using PIL (Python Image Library, abbreviated as PIL) in a Python environment. The embodiments of the present application are described by way of example only, and do not represent that the embodiments of the present application are limited thereto.
After the watermark information is added to the original image by the method shown in fig. 2, the situation that the original image is used and stolen can be tracked, so that the safety of the original image is ensured.
In summary, the watermark information is added to the image by a two-bit fourier transform method, and then the watermark information is added to the image again by a least significant bit method, so that the added watermark information can be extracted quickly, and the watermark information in the image can be prevented from being damaged to a certain extent, thereby effectively improving the robustness of the watermark information added to the image.
Fig. 3 is a schematic structural diagram of an image processing apparatus 30 according to an embodiment of the present application, and for example, referring to fig. 3, the image processing apparatus 30 may include:
an obtaining unit 301, configured to obtain an image to be processed and a watermark to be processed respectively.
The processing unit 302 is configured to superimpose the frequency domain image corresponding to the watermark to be processed onto the frequency domain image corresponding to the image to be processed, so as to obtain a new frequency domain image.
A processing unit 302, configured to replace binary data corresponding to the watermark to be processed with a least significant bit of a pixel in a new image corresponding to the new frequency domain image, so as to generate a target image; wherein, the target image comprises the watermark to be processed.
An output unit 303 for outputting the target image.
Optionally, the processing unit 302 is specifically configured to perform transform processing on the image to be processed and the watermark to be processed respectively to obtain a frequency domain image corresponding to the image to be processed and a frequency domain image corresponding to the watermark to be processed; and superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to generate a new frequency domain image.
Optionally, the processing unit 302 is specifically configured to perform inverse transformation processing on the new frequency domain image to obtain a new image corresponding to the new frequency domain image; the inverse transformation processing and the transformation processing are inverse transformation; and replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image to obtain the target image.
Optionally, the processing unit 302 is specifically configured to perform binary conversion on the watermark to be processed to obtain binary data; extracting a plurality of pixels from the new image and respectively determining the least significant bit of each pixel in the plurality of pixels; and respectively replacing the binary data to the least significant bit of each pixel to obtain the target image.
Optionally, the processing unit is specifically configured to perform transform processing on the image to be processed and the watermark to be processed respectively by using a first transform processing method; wherein the first transform processing method is any one of methods of two-dimensional fourier transform, discrete cosine transform, or wavelet transform.
Optionally, the processing unit 302 is specifically configured to perform inverse transformation processing on the new frequency domain image by using a second transformation processing method; the second transformation processing method and the first transformation processing method are inverse transformation.
The image processing apparatus provided in the embodiment of the present application can execute the technical solution of the image processing method in any of the above embodiments, and the implementation principle and the beneficial effect of the image processing apparatus are similar to those of the image processing method, which can be referred to as the implementation principle and the beneficial effect of the image processing method, and are not described herein again.
Fig. 4 is a schematic structural diagram of another image processing apparatus 40 according to an embodiment of the present application, and for example, please refer to fig. 4, the image processing apparatus 40 may include a processor 401 and a memory 402; wherein the content of the first and second substances,
the memory 402 is used for storing computer programs.
The processor 401 is configured to read the computer program stored in the memory 402, and execute the technical solution of the image processing method in any of the embodiments according to the computer program in the memory 402.
Alternatively, the memory 402 may be separate or integrated with the processor 401. When the memory 402 is a device independent of the processor 401, the image processing apparatus 40 may further include: a bus for connecting the memory 402 and the processor 401.
Optionally, this embodiment further includes: a communication interface that may be connected to the processor 401 through a bus. The processor 401 may control the communication interface to implement the functions of reception and transmission of the image processing apparatus 40 described above.
The image processing apparatus 40 shown in the embodiment of the present application can execute the technical solution of the image processing method in any of the above embodiments, and the implementation principle and the beneficial effect thereof are similar to those of the image processing method, and reference may be made to the implementation principle and the beneficial effect of the image processing method, which is not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the technical solution of the image processing method in any of the above embodiments is implemented, and implementation principles and beneficial effects of the image processing method are similar to those of the image processing method, which can be referred to for implementation principles and beneficial effects of the image processing method, and are not described herein again.
The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the technical solution of the image processing method in any of the above embodiments is implemented, and the implementation principle and the beneficial effect of the computer program are similar to those of the image processing method, which can be referred to as the implementation principle and the beneficial effect of the image processing method, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts shown as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The computer-readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. An image processing method, comprising:
respectively acquiring an image to be processed and a watermark to be processed;
superposing the frequency domain image corresponding to the watermark to be processed to the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image;
replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein the target image comprises the watermark to be processed;
and outputting the target image.
2. The method according to claim 1, wherein the superimposing the frequency-domain image corresponding to the watermark to be processed on the frequency-domain image corresponding to the image to be processed to obtain a new frequency-domain image comprises:
respectively carrying out transformation processing on the image to be processed and the watermark to be processed to obtain a frequency domain image corresponding to the image to be processed and a frequency domain image corresponding to the watermark to be processed;
and superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to generate the new frequency domain image.
3. The method according to claim 2, wherein the replacing binary data corresponding to the watermark to be processed into the least significant bits of the pixels in the new image corresponding to the new frequency domain image to generate the target image comprises:
carrying out inverse transformation processing on the new frequency domain image to obtain the new image corresponding to the new frequency domain image; wherein the inverse transform process and the transform process are inverse transforms to each other;
and replacing the binary data corresponding to the watermark to be processed to the least significant bit of the pixel in the new image to obtain the target image.
4. The method according to claim 3, wherein the replacing binary data corresponding to the watermark to be processed into the least significant bits of the pixels in the new image to obtain the target image comprises:
performing binary conversion on the watermark to be processed to obtain the binary data;
extracting a plurality of pixels from the new image and respectively determining the least significant bit of each of the plurality of pixels;
and respectively replacing the binary data to the least significant bit of each pixel to obtain the target image.
5. The method according to any one of claims 2-4, wherein the separately transforming the image to be processed and the watermark to be processed comprises:
respectively carrying out transformation processing on the image to be processed and the watermark to be processed by adopting a first transformation processing method; wherein the first transform processing method is any one of methods of two-dimensional fourier transform, discrete cosine transform, or wavelet transform.
6. The method according to claim 3 or 4, wherein said inverse transforming said new frequency domain image to obtain said new image corresponding to said new frequency domain image comprises:
performing inverse transformation processing on the new frequency domain image by adopting a second transformation processing method; the second transformation processing method and the first transformation processing method are inverse transformation.
7. An image processing apparatus characterized by comprising:
the acquisition unit is used for respectively acquiring the image to be processed and the watermark to be processed;
the processing unit is used for superposing the frequency domain image corresponding to the watermark to be processed into the frequency domain image corresponding to the image to be processed to obtain a new frequency domain image;
the processing unit is used for replacing the binary data corresponding to the watermark to be processed with the least significant bit of the pixel in the new image corresponding to the new frequency domain image to generate a target image; wherein the target image comprises the watermark to be processed;
an output unit for outputting the target image.
8. An image processing apparatus, comprising a memory and a processor; wherein the content of the first and second substances,
the memory for storing a computer program;
the processor is used for reading the computer program stored in the memory and executing an image processing method according to any one of the claims 1-6 according to the computer program in the memory.
9. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement an image processing method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out an image processing method as claimed in any one of the preceding claims 1 to 6.
CN202110583483.2A 2021-05-27 2021-05-27 Image processing method and device Pending CN113284034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110583483.2A CN113284034A (en) 2021-05-27 2021-05-27 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110583483.2A CN113284034A (en) 2021-05-27 2021-05-27 Image processing method and device

Publications (1)

Publication Number Publication Date
CN113284034A true CN113284034A (en) 2021-08-20

Family

ID=77281959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110583483.2A Pending CN113284034A (en) 2021-05-27 2021-05-27 Image processing method and device

Country Status (1)

Country Link
CN (1) CN113284034A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781287A (en) * 2021-09-07 2021-12-10 北京达佳互联信息技术有限公司 Watermark image processing method, watermark image processing device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109829843A (en) * 2018-12-27 2019-05-31 北京奇安信科技有限公司 A kind of image blind watermarking processing method and processing device improving robustness and encoding amount
CN111105337A (en) * 2019-12-19 2020-05-05 腾讯科技(深圳)有限公司 Watermark processing method, information display method and related device
CN111340676A (en) * 2020-02-17 2020-06-26 北京北信源软件股份有限公司 Image watermark embedding method, image watermark identification method, image watermark embedding device, image watermark identification device and electronic equipment
CN111784556A (en) * 2020-06-23 2020-10-16 中国平安人寿保险股份有限公司 Method, device, terminal and storage medium for adding digital watermark in image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109829843A (en) * 2018-12-27 2019-05-31 北京奇安信科技有限公司 A kind of image blind watermarking processing method and processing device improving robustness and encoding amount
CN111105337A (en) * 2019-12-19 2020-05-05 腾讯科技(深圳)有限公司 Watermark processing method, information display method and related device
CN111340676A (en) * 2020-02-17 2020-06-26 北京北信源软件股份有限公司 Image watermark embedding method, image watermark identification method, image watermark embedding device, image watermark identification device and electronic equipment
CN111784556A (en) * 2020-06-23 2020-10-16 中国平安人寿保险股份有限公司 Method, device, terminal and storage medium for adding digital watermark in image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任馨: "关于多重水印的应用研究", 《计算机应用》, vol. 27, no. 1, pages 271 - 272 *
原文: "数字图像处理-数字水印的嵌入与提取", 《HTTPS://BLOG.CSDN.NET》, pages 1 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781287A (en) * 2021-09-07 2021-12-10 北京达佳互联信息技术有限公司 Watermark image processing method, watermark image processing device, electronic equipment and computer readable storage medium
CN113781287B (en) * 2021-09-07 2024-03-01 北京达佳互联信息技术有限公司 Watermark image processing method, watermark image processing device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
EP3308371B1 (en) System and method for digital watermarking
CN111340109B (en) Image matching method, device, equipment and storage medium
JP5654434B2 (en) Method and apparatus for embedding watermark image in host image
CN110781923B (en) Feature extraction method and device
US10354355B2 (en) Digital watermarking
CN110766594B (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
CN109840875A (en) A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium
He et al. A geometrical attack resistant image watermarking algorithm based on histogram modification
CN111047496A (en) Threshold determination method, watermark detection device and electronic equipment
CN113284034A (en) Image processing method and device
Keyvanpour et al. A secure method in digital video watermarking with transform domain algorithms
CN114022336A (en) Reversible image watermarking method and device based on inter-block prediction error histogram translation
CN113538197A (en) Watermark extraction method, device, storage medium and electronic equipment
Gani et al. A novel method for digital image copy-move forgery detection and localization using evolving cellular automata and local binary patterns
CN110969563B (en) Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting equipment and data processing method
CN113191189A (en) Face living body detection method, terminal device and computer readable storage medium
Nikolaidis Local distortion resistant image watermarking relying on salient feature extraction
CN113763224A (en) Image processing method and device
CN109309869B (en) Watermark embedding method, device and storage medium
CN113628091B (en) Safety information extraction method and device for electronic display screen content reproduction scene
Hu et al. Draw: Defending camera-shooted raw against image manipulation
CN104517259A (en) Digital watermark insertion method and device in color text files
CN113674130A (en) Image processing method and device, storage medium and terminal
US10832076B2 (en) Method and image processing entity for applying a convolutional neural network to an image
CN113744110B (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210820

WD01 Invention patent application deemed withdrawn after publication