Image generation method and device based on double-layer watermark, equipment and storage medium
Patent Information
- Application Number
- CN202610993782.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-08-28
AI Technical Summary
然而,这种方法的鲁棒性较差,容易受到图像处理操作(如压缩、滤波、旋转等)的影响,导致水印信息丢失或难以提取
[0012] This application provides a zero-visual-distortion metadata identifier by embedding a header data identifier in the image coding layer, and embeds watermark text at the image pixel level to generate a target watermark image. This provides a highly robust identifier that resists lossy compression. Furthermore, the header data identifier and the target watermark image carry complementary information. If either target is destroyed during the image processing process, the other target can still provide traceability, thus improving the robustness of image watermark processing.
Smart Images

Figure CN122656840A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to an image generation method, apparatus, device, and storage medium based on dual-layer watermarking. Background Technology
[0002] With the rapid development of digital imaging technology and the widespread use of the internet, the dissemination and use of digital images have become increasingly convenient. However, the acquisition, storage, editing, and processing of digital images require significant human, material, and financial resources, making them susceptible to data theft, illegal copying, and other infringements.
[0003] To address this issue, image watermarking technology was developed. Image watermarking embeds invisible or visible watermark information into images to identify copyright ownership, source, and other information, thereby protecting the copyright of digital images.
[0004] Currently, common image watermarking techniques mainly include spatial domain watermarking and frequency domain watermarking. Spatial domain watermarking directly modifies the pixel values of an image to embed watermark information. For example, the most common spatial domain watermarking technique is the least significant bit substitution method, which embeds watermark information by modifying the least significant bits of the image pixel values. However, this method has poor robustness and is easily affected by image processing operations (such as compression, filtering, rotation, etc.), leading to the loss or difficulty in extracting the watermark information. Frequency domain watermarking converts the image to the frequency domain and modifies the frequency coefficients to embed watermark information. However, most existing frequency domain watermarking techniques only embed one layer of watermark information, making it difficult to recover when the watermark information is severely damaged, thus affecting the effectiveness of copyright protection.
[0005] Therefore, there is an urgent need for a robust and efficient image watermarking method. Summary of the Invention
[0006] This application provides an image generation method, apparatus, device, and storage medium based on dual-layer watermarking to improve the robustness and processing quality of image watermarking.
[0007] According to one aspect of this application, an image generation method based on a two-layer watermark is provided, the method comprising: During the image sensor's acquisition of image data, a header data identifier is added to the acquired image data frame to perform the first watermarking and generate the original acquired image; wherein, the header data identifier is structured watermark data, including a unique device identifier and an acquisition timestamp; The watermark text is formatted to generate a target watermark sequence; wherein, the target watermark sequence is a binary bit sequence. Based on the target watermark sequence, a second watermark is added to a single pixel dimension of the original acquired image to generate a target watermark image.
[0008] According to another aspect of this application, an image generation apparatus based on a dual-layer watermark is provided, the apparatus comprising: The first watermark module is used to add header data identifiers to the acquired image data frames during the image data acquisition process of the image sensor, and to generate the original acquired image by adding the first watermark; wherein, the header data identifier is structured watermark data, including a unique device identifier and an acquisition timestamp. The format conversion module is used to convert the format of the watermark text and generate a target watermark sequence; wherein, the target watermark sequence is a binary bit sequence; The second watermark module is used to add a second watermark to the pixel dimension of the original acquired image based on the target watermark sequence, thereby generating a target watermark image.
[0009] According to another aspect of this application, an electronic device is provided, the electronic device comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image generation methods based on dual-layer watermarking provided in the embodiments of this application.
[0010] According to another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements any of the image generation methods based on dual-layer watermarking provided in the embodiments of this application.
[0011] According to another aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the image generation methods based on dual-layer watermarking provided in the embodiments of this application.
[0012] This application provides a zero-visual-distortion metadata identifier by embedding a header data identifier in the image coding layer, and embeds watermark text at the image pixel level to generate a target watermark image. This provides a highly robust identifier that resists lossy compression. Furthermore, the header data identifier and the target watermark image carry complementary information. If either target is destroyed during the image processing process, the other target can still provide traceability, thus improving the robustness of image watermark processing. Attached Figure Description
[0013] Figure 1This is a flowchart of an image generation method based on a double-layer watermark, according to Embodiment 1 of this application; Figure 2 This is a flowchart of an image generation method based on a double-layer watermark, according to Embodiment 2 of this application; Figure 3 This is a schematic diagram of an image generation device based on a double-layer watermark, according to Embodiment 3 of this application; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the image generation method based on double-layer watermarking according to Embodiment 4 of this application. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1 This is a flowchart of an image generation method based on dual-layer watermarking according to Embodiment 1 of this application. This embodiment is applicable to situations where image data is watermarked, and can be executed by an image generation device based on dual-layer watermarking. This image generation device can be implemented in hardware and / or software, and can be configured in a computer device, such as a robot control device. Figure 1 As shown, the method includes: S110. During the process of image sensor acquiring image data, add header data identifier to the acquired image data frame and perform first watermark addition to generate the original acquired image.
[0017] The header data identifier is structured watermark data, which may include a unique device identifier and a collection timestamp. Optionally, the header data identifier can be a data structure that conforms to the SEI (Supplemental Enhancement Information) message mechanism.
[0018] The original acquired image can refer to the acquired image output by the image sensor.
[0019] It should be noted that, in this embodiment of the invention, the image sensor is a sensor deployed in the robot for image acquisition, and the image acquired by the image sensor is a fixed-size image, such as 848×480.
[0020] In one optional implementation, when the image sensor acquires each frame of image data, it assembles a metadata structure for the currently acquired image data frame, converts the metadata structure into a byte sequence, and attaches a hash check value corresponding to the byte sequence. The byte sequence is then encapsulated as a header data identifier in the output bitstream of the image sensor and inserted before the encoded data corresponding to the image data frame.
[0021] Optionally, the header data identifier serves only as auxiliary information and does not participate in the video data encoding and decoding process. It should be noted that the header data identifier is written to the image sensor only once. During subsequent image decoding and image extraction processes, if the header data identifier information is correctly carried in the data stream, the complete header data identifier information can be directly extracted from the data stream without decoding video frames. Even if the header data identifier information is lost during image decoding and image extraction processes, the identifier information can still be extracted based on the watermark information added during subsequent second watermarking processing.
[0022] S120. Convert the format of the watermark text to generate the target watermark sequence.
[0023] The target watermark sequence can be a binary bit sequence.
[0024] It should be noted that watermarked text can refer to text information that is to be embedded as a watermark in an image.
[0025] Optionally, the watermark text is formatted to generate a target watermark sequence, including: traversing the watermark text according to the text order in the watermark text, encoding the currently traversed characters in a preset format to generate character encoding objects; and combining at least one character encoding object according to the text order in the watermark text to generate a target watermark sequence.
[0026] Optionally, the preset format of the character encoding can be adapted to the needs of those skilled in the art, for example, by following the encoding rules of ASCII.
[0027] For example, if the watermark text is the unique identifier of the image sensor, such as "KUAVO-062", the character encoding corresponding to each character in the unique identifier can be an eight-bit binary number. These eight-bit binary numbers are used as character encoding objects, such as "K: 01001011, U: 01010101, A: 01000001, V: 01010110, O: 01001111, -: 00101101, 0: 00110000, 6: 00110110, 2: 00110010". By arranging and combining the above character encoding objects according to the text order in the watermark text, the target watermark sequence is generated.
[0028] S130. Based on the target watermark sequence, a second watermark is added to a single pixel dimension of the original acquired image to generate the target watermark image.
[0029] This application embodiment provides a zero-visual-distortion metadata identifier by embedding a header data identifier in the image coding layer, and embeds watermark text at the image pixel level to generate a target watermark image. This provides a highly robust identifier that resists lossy compression. Furthermore, the header data identifier and the target watermark image carry complementary information. If either target is destroyed in the image processing process, the other target can still provide traceability, thereby improving the robustness of image watermark processing.
[0030] Example 2 Figure 2 This is a flowchart of an image generation method based on a dual-layer watermark, according to Embodiment 2 of this application. This embodiment further refines the step of "adding a second watermark to a single pixel dimension of the original acquired image based on the target watermark sequence to generate a target watermark image" based on the technical solutions of the above embodiments. It should be noted that for parts not detailed in this embodiment, please refer to the relevant descriptions in other embodiments. Figure 2 As shown, the method includes: S210. During the process of image sensor acquiring image data, add header data identifier to the acquired image data frame and perform first watermark addition to generate the original acquired image.
[0031] S220. Convert the format of the watermark text to generate the target watermark sequence.
[0032] S230. Perform target pixel channel separation on the original acquired image to generate a target pixel channel image.
[0033] The target pixel channel can be the blue channel among the three pixel channels.
[0034] It should be noted that the target pixel channel image can refer to a slice image generated after separating the target pixel channels of the original acquired image.
[0035] Optionally, before performing target pixel channel separation on the original acquired image, the method further includes scaling the original acquired image. For example, performing a 50% bilinear scaling on the original acquired image reduces the total number of pixels in the scaled original acquired image by 75%, thereby reducing the computational load of subsequent positive discrete cosine transform on the original acquired image.
[0036] S240. Perform a positive discrete cosine transform on the target pixel channel image to generate the original frequency domain coefficient matrix corresponding to the target pixel channel image.
[0037] The original frequency domain coefficient matrix can be used to characterize the intensity of cosine wave components of different frequencies in the target pixel channel image.
[0038] It should be noted that, for the original acquired image of a fixed size in the embodiments of the present invention, the frequency level distribution area of the original frequency domain coefficient matrix corresponding to the target pixel channel image is also fixed. The original frequency domain coefficient matrix can be divided into three frequency distribution areas. The first is located in the upper left corner of the original frequency domain coefficient matrix, with the lowest frequency intensity level, which is used to characterize the overall brightness and color distribution information of the target pixel channel image. The second is located in the lower right corner of the original frequency domain coefficient matrix, with the highest frequency intensity level, which is used to characterize the details and noise information of the target pixel channel image. The frequency intensity level of the remaining area is in the middle of the three, which is used to characterize the edge information and texture information of the target pixel channel image.
[0039] S250. Based on the target watermark sequence, update the original frequency domain coefficient matrix to generate the target frequency domain coefficient matrix.
[0040] Optionally, based on the target watermark sequence, the original frequency domain coefficient matrix is updated to generate a target frequency domain coefficient matrix, including: determining the target matrix update region in the original frequency domain coefficient matrix according to the frequency level distribution in the original frequency domain coefficient matrix and the image scale information of the target pixel channel image; traversing the target matrix update region, and updating the target frequency domain coefficients according to the target watermark sequence, the currently traversed target frequency domain coefficients, and the quantization step size corresponding to the target frequency domain coefficients, to generate the target frequency domain coefficient matrix.
[0041] The target matrix update region can be used to represent the edge and texture information of the image.
[0042] The quantization step size can be used to characterize the compression level of the target frequency domain coefficients. It should be noted that a larger quantization step size results in a higher compression ratio but also greater loss of image quality; conversely, a smaller quantization step size results in a lower compression ratio but better image quality. Optionally, the quantization step size of the target frequency domain coefficients can be adaptively set by those skilled in the art, and can be a fixed value or a non-fixed value.
[0043] In a specific optional implementation, if the image scale information of the target pixel channel image is 424×240, it indicates that the width of the target pixel channel image is 424 pixel units. The determination of the target matrix update region needs to avoid the frequency region with the lowest frequency intensity level in the original frequency domain coefficient matrix (the size of this frequency region is 5×5) and the frequency region with the highest frequency intensity level in the original frequency domain coefficient matrix (the lower right corner region). The starting offset of the target matrix update region in the original frequency domain coefficient matrix can be set to 5, and the ending offset in the column direction and row direction can be set to 424 / 2-10. By reserving a redundancy of ten pixel units, the target matrix update region can be avoided as much as possible from covering the frequency region with the highest frequency intensity level in the original frequency domain coefficient matrix. In the embodiment of the invention, the byte length of the target watermark sequence is 72 bits, and the available column range of the target matrix update region is 5-201, totaling 197 bits. Therefore, embedding the 72-bit target watermark sequence only requires one row. It should be noted that modifying the frequency region with the lowest frequency intensity level in the original frequency domain coefficient matrix will cause obvious visual block effect, while modifying the frequency region with the highest frequency intensity level in the original frequency domain coefficient matrix will result in information loss during image compression. Therefore, the target matrix update region needs to avoid these two regions.
[0044] Furthermore, during the traversal of the target matrix update region, an insertion row is randomly determined within the available row range corresponding to the target matrix update region. Based on the target watermark sequence, the target frequency domain coefficients currently traversed in the insertion row, and the quantization step size corresponding to the target frequency domain coefficients, the target frequency domain coefficients are updated. For example, the quantization index (i.e., the result of dividing the two and rounding up) can be determined first based on the target frequency domain coefficients and the quantization step size corresponding to the target frequency domain coefficients. If the bit value of the currently traversed byte object in the target watermark sequence is 1, and the quantization index corresponding to the currently traversed byte object is even, then the quantization index is incremented to make it odd; if the bit value of the currently traversed byte object in the target watermark sequence is 0, and the quantization index corresponding to the currently traversed byte object is odd, then the quantization index is incremented to make it even.
[0045] By binding the bit values of direct objects in the watermark sequence with the parity of the quantization index, binary information is transformed into quantization features of the host data, thus achieving invisible encoding of information while ensuring the robustness of the watermark.
[0046] S260. Generate the target watermark image based on the target frequency domain coefficient matrix and the non-target pixel channel image.
[0047] Optionally, a target watermark image is generated based on the target frequency domain coefficient matrix and the non-target pixel channel image, including: performing an inverse discrete cosine transform on the target frequency domain coefficient matrix to generate a candidate watermark image; and merging the non-target pixel channel image and the candidate watermark image to generate the target watermark image.
[0048] Among them, the candidate watermark image can be a target pixel channel image carrying the target watermark sequence. Non-target pixel channel images can refer to pixel channel images corresponding to pixel channels other than the target pixel single channel in a pixel three-channel image.
[0049] It should be noted that only the target pixel in the target watermark image carries watermark information in a single channel.
[0050] It should be noted that, in the embodiments of the present invention, the process of extracting watermark text from the target watermark image is essentially the reverse reconstruction of the embedded encoded information from the frequency domain coefficient matrix of the target watermark image, which is completely symmetrical to the process of embedding watermark text into the original acquired image.
[0051] This application embodiment generates a target pixel channel image by slicing the original acquired image into target pixel channel images, and embeds the target watermark sequence into the target pixel channel image using discrete cosine transform, thereby improving the processing efficiency and quality of image watermarking.
[0052] Example 3 Figure 3 This is a schematic diagram of an image generation device based on a dual-layer watermark, provided according to Embodiment 3 of this application. It is applicable to situations where image data is watermarked. This dual-layer watermark image generation device can be implemented in hardware and / or software, and can be configured in a computer device, such as a server. Figure 3 As shown, the device includes: The first watermark module 310 is used to add a header data identifier to the acquired image data frame during the image data acquisition process of the image sensor, and perform the first watermark addition to generate the original acquired image; wherein, the header data identifier is structured watermark data, including a unique device identifier and an acquisition timestamp. The format conversion module 320 is used to convert the format of the watermark text and generate a target watermark sequence; wherein, the target watermark sequence is a binary bit sequence; The second watermark module 330 is used to add a second watermark to the pixel dimension of the original acquired image based on the target watermark sequence to generate a target watermark image.
[0053] This application embodiment provides a zero-visual-distortion metadata identifier by embedding a header data identifier in the image coding layer, and embeds watermark text at the image pixel level to generate a target watermark image. This provides a highly robust identifier that resists lossy compression. Furthermore, the header data identifier and the target watermark image carry complementary information. If either target is destroyed in the image processing process, the other target can still provide traceability, thereby improving the robustness of image watermark processing.
[0054] Optionally, the second watermark module 330 includes: A pixel separation unit is used to separate the target pixel channel of the original acquired image to generate a target pixel channel image; wherein, the target pixel channel is the blue channel in the three pixel channels; A discrete cosine transform unit is used to perform a positive discrete cosine transform on the target pixel channel image to generate the original frequency domain coefficient matrix corresponding to the target pixel channel image; wherein, the original frequency domain coefficient matrix is used to characterize the intensity of cosine wave components of different frequencies in the target pixel channel image; A matrix update unit is used to update the original frequency domain coefficient matrix based on the target watermark sequence to generate a target frequency domain coefficient matrix. The target image generation unit is used to generate a target watermark image based on the target frequency domain coefficient matrix and the non-target pixel channel image.
[0055] Optionally, the matrix update unit includes: The update region determination subunit is used to determine the target matrix update region in the original frequency domain coefficient matrix based on the frequency level distribution in the original frequency domain coefficient matrix and the image scale information of the target pixel channel image; wherein, the target matrix update region is used to characterize the edge information and texture information of the image; The matrix update subunit is used to traverse the target matrix update region, update the target frequency domain coefficients according to the target watermark sequence, the currently traversed target frequency domain coefficients and the quantization step size corresponding to the target frequency domain coefficients, and generate the target frequency domain coefficient matrix.
[0056] Optionally, the target image generation unit includes: The inverse discrete transform subunit is used to perform an inverse discrete cosine transform on the target frequency domain coefficient matrix to generate a candidate watermark image; wherein, the candidate watermark image is a target pixel channel image carrying the target watermark sequence. The merging subunit is used to merge the non-target pixel channel image and the candidate watermark image to generate the target watermark image; wherein, the non-target pixel channel image refers to the pixel channel image corresponding to the pixel channel other than the target pixel single channel in the three-channel pixel model.
[0057] Optionally, the format conversion module 320 can be specifically used for: The watermark text is traversed according to the text order in the watermark text, and the currently traversed character is encoded in a preset format to generate a character encoding object. Based on the text order in the watermark text, combine at least one character encoding object to generate the target watermark sequence.
[0058] Optionally, the header data identifier is only used as auxiliary information and does not participate in the video data encoding and decoding process.
[0059] The image generation apparatus based on dual-layer watermarking provided in this application can execute the image generation method based on dual-layer watermarking provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing each image generation method based on dual-layer watermarking.
[0060] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.
[0061] Example 4 Figure 4 This is a schematic diagram of the structure of an electronic device 410 implementing the image generation method based on dual-layer watermarking according to embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.
[0062] like Figure 4As shown, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory 412 or a random access memory 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 412 or loaded from storage unit 418 into the random access memory 413. The random access memory 413 can also store various programs and data required for the operation of the electronic device 410. The processor 411, read-only memory 412, and random access memory 413 are interconnected via a bus 414. An input / output interface 415 is also connected to the bus 414.
[0063] Multiple components in electronic device 410 are connected to input / output interface 415, including: input unit 416, such as keyboard, mouse, etc.; output unit 417, such as various types of monitors, speakers, etc.; storage unit 418, such as disk, optical disk, etc.; and communication unit 419, such as network card, modem, wireless transceiver, etc. Communication unit 419 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0064] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as image generation methods based on dual-layer watermarking.
[0065] In some embodiments, the image generation method based on dual watermarking can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 410 via read-only memory 412 and / or communication unit 419. When the computer program is loaded into random access memory 413 and executed by processor 411, one or more steps of the image generation method based on dual watermarking described above can be performed. Alternatively, in other embodiments, processor 411 can be configured for the image generation method based on dual watermarking by any other suitable means (e.g., by means of firmware).
[0066] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), payload programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0067] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable image generation apparatus based on dual-watermarking, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0068] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0069] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube or liquid crystal display monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0070] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0071] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0072] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0073] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An image generation method based on dual-layer watermarking, characterized in that, include: During the image sensor's acquisition of image data, a header data identifier is added to the acquired image data frame to perform the first watermarking and generate the original acquired image; wherein, the header data identifier is structured watermark data, including a unique device identifier and an acquisition timestamp; The watermark text is formatted to generate a target watermark sequence; wherein, the target watermark sequence is a binary bit sequence. Based on the target watermark sequence, a second watermark is added to a single pixel dimension of the original acquired image to generate a target watermark image.
2. The method according to claim 1, characterized in that, The step of adding a second watermark to a single pixel dimension of the original acquired image based on the target watermark sequence to generate a target watermark image includes: The original acquired image is subjected to target pixel channel separation to generate a target pixel channel image; wherein, the target pixel channel is the blue channel in the three-channel pixel model; A positive discrete cosine transform is performed on the target pixel channel image to generate the original frequency domain coefficient matrix corresponding to the target pixel channel image; wherein, the original frequency domain coefficient matrix is used to characterize the intensity of cosine wave components of different frequencies in the target pixel channel image; Based on the target watermark sequence, the original frequency domain coefficient matrix is updated to generate the target frequency domain coefficient matrix; A target watermark image is generated based on the target frequency domain coefficient matrix and the non-target pixel channel image.
3. The method according to claim 2, characterized in that, The step of updating the original frequency domain coefficient matrix based on the target watermark sequence to generate the target frequency domain coefficient matrix includes: Based on the frequency level distribution in the original frequency domain coefficient matrix and the image scale information of the target pixel channel image, the target matrix update region in the original frequency domain coefficient matrix is determined; wherein, the target matrix update region is used to characterize the edge information and texture information of the image; The target matrix update region is traversed, and the target frequency domain coefficients are updated according to the target watermark sequence, the currently traversed target frequency domain coefficients, and the quantization step size corresponding to the target frequency domain coefficients, to generate the target frequency domain coefficient matrix.
4. The method according to claim 2, characterized in that, The step of generating a target watermark image based on the target frequency domain coefficient matrix and the non-target pixel channel image includes: The target frequency domain coefficient matrix is subjected to inverse discrete cosine transform to generate a candidate watermark image; wherein, the candidate watermark image is a target pixel channel image carrying the target watermark sequence; The non-target pixel channel image and the candidate watermark image are merged to generate the target watermark image; wherein, the non-target pixel channel image refers to the pixel channel image corresponding to the pixel channel other than the target pixel single channel in the three-channel pixel model.
5. The method according to claim 1, characterized in that, The process of format conversion of the watermark text to generate the target watermark sequence includes: The watermark text is traversed according to the text order in the watermark text, and the currently traversed character is encoded in a preset format to generate a character encoding object. Based on the text order in the watermark text, combine at least one character encoding object to generate the target watermark sequence.
6. The method according to claim 1, characterized in that, The header data identifier is only used as auxiliary information and does not participate in the video data encoding and decoding process.
7. An image generation device based on dual-layer watermarking, characterized in that, include: The first watermark module is used to add header data identifiers to the acquired image data frames during the image data acquisition process of the image sensor, and to generate the original acquired image by adding the first watermark; wherein, the header data identifier is structured watermark data, including a unique device identifier and an acquisition timestamp. The format conversion module is used to convert the format of the watermark text and generate a target watermark sequence; wherein, the target watermark sequence is a binary bit sequence; The second watermark module is used to add a second watermark to the pixel dimension of the original acquired image based on the target watermark sequence, thereby generating a target watermark image.
8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image generation method based on double watermarking as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the image generation method based on double-layer watermarking as described in any one of claims 1-6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the image generation method based on a dual-layer watermark according to any one of claims 1-6.