Method and system for watermarking image and / or identifying watermarked image
The zero-bit watermarking method using key matrices and image features addresses the challenges of high capacity and robustness in watermarking, enhancing extraction accuracy and reducing storage needs by leveraging a database for watermark message storage.
Patent Information
- Application Number
- PCT/CN2024/110910
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2026-02-12
AI Technical Summary
Existing watermarking methods face challenges in achieving high capacity and robustness against attacks while minimizing noticeable distortions, and require access to original images for extraction, leading to increased storage and reduced retrieval speed.
A zero-bit watermarking method using key matrices and image features for watermarking and identification, which allows for high capacity and robustness against attacks without storing original images, and includes a database for watermark message storage to prevent distortion and enhance retrieval speed.
The method achieves high-capacity watermarking with robustness against attacks, reduces storage requirements, and improves watermark extraction accuracy for attacked images by utilizing key matrices and image features, enabling efficient and accurate watermark detection.
Smart Images

Figure CN2024110910_12022026_PF_FP_ABST
Abstract
Description
METHOD AND SYSTEM FOR WATERMARKING IMAGE AND / OR IDENTIFYING WATERMARKED IMAGE
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The instant application is the first application regarding the disclosed technology.FIELD
[0003] The present technology relates to the field of watermarking and more particularly to methods and systems for detecting a watermark in images and extracting watermark messages from images.BACKGROUND
[0004] Image watermarking refers to a technique where some information such as a logo or a text string is embedded into an image. The embedded information often serves as a signature that may be later used to retrieve information about the watermarked data.
[0005] Image watermarking methods are either visible or invisible. The embedded information in visible watermarking methods can be clearly seen by a human being. On the other hand, invisible watermarking methods embed hidden watermarks such that a change in the watermarked image caused by the embedded information is not noticeable. Since invisible watermarking methods affect the content of the image less compared to the visible watermarking methods, they are usually preferred, depending on the applications for which watermarking is used.
[0006] In some applications where the embedded message contains large amount of information, high-capacity image watermarking methods can be used to embed longer messages. Examples for such application are cases where an embedded message includes detailed metadata or copyright information. As known in the art, there is usually a trade-off between capacity, robustness against attacks and imperceptibility, which means that improving one factor often results in compromising on the others. Therefore, high-capacity watermarking methods usually suffer from low robustness and / or low quality for watermarked images.
[0007] For example, some watermarking-based methods implement a high-capacity image watermarking scheme using Discrete Cosine Transform (DCT) . Such methods involve partitioning the original image into blocks, decomposing each block using DCT, and then embedding the watermark by adaptively quantizing the selected representative DCT coefficients. However, such methods usually have a low robustness in the face of attacks and / or a compromised quality in the watermarked images.
[0008] Feature-based watermarking methods are used to reconstruct original images having been attacked. Some of such methods use image features such as Scale-Invariant Feature Transform (SIFT) to undo some of possible attacks applied to watermarked images. Specifically, during the extraction stage, the features corresponding to the given attacked image are first obtained. Then, feature matching is applied to the obtained features and features of the original image to estimate the parameters of the applied attack. Next, correction which undo the attack is applied to the attacked image using the estimated attack parameters. Finally, the corrected image is used to extract the embedded message. The applied correction improves the robustness of the watermarked image against such attacks. However, such methods require that the features of the original image, and therefore the identification of the original image itself, be known, which is usually not the case in real-world applications.
[0009] In other examples, image retrieval methods are used along with an image watermarking method. Specifically, original images or the watermarked images are stored in a database after the watermark embedding is done. Once a test image is given, the image retrieval method returns a set of candidates from the database. These candidates are then used in the watermark extraction stage to extract the embedded watermark from the given test image. However, such methods require access to the original image or its corresponding watermarked image to extract the watermark from given test image. Hence, such methods are non-blind methods, and they require storing the full-size original images in a database, which increases the required storage and slows down the retrieval process. In addition, if the query image has been attacked, the extraction accuracy using the corresponding retrieved image which is not attacked is usually low.
[0010] Therefore, there is a need for an improved method and system for watermarking images and identifying watermarked images.SUMMARY
[0011] It is an object of the present technology to ameliorate at least some of the inconveniences present in the prior art. One or more embodiments of the present technology may provide and / or broaden the scope of approaches to and / or methods of achieving the aims and objects of the present technology.
[0012] Developers of the present technology have appreciated that at least some of existing watermarking methods try to avoid causing noticeable distortions in samples of the watermarked dataset. Therefore, such watermarking methods suffer from low capacity which limits their application for embedding long messages. Furthermore, embedding long messages into images increases the chance of errors in the extracted watermark. In addition, when an embedded watermark is long, attacks on the watermarked data samples can increase the error rate in the extracted messages.
[0013] In at least some of non-limiting embodiments of the present technology, the goal is to develop an image retrieval based high-capacity watermarking solution that can achieve high capacity and high robustness against attacks.
[0014] In some non-limiting embodiments of the present technology, there is provided a zero-bit watermarking method that utilizes key matrices for watermarking an image, and a method for determining whether an image has been watermarked using this zero-bit watermarking method.
[0015] In some non-limiting embodiments, features are extracted from images to be watermarked and from a received image for which it is be determined whether it is watermarked (or contains a watermark) . As described in detail below, the use of features allows to avoid storing and searching original images which reduces storage requirements and improves the retrieval speed. Furthermore, in some non-limiting embodiments, the use of features allows to undo the effects of some attacks which can improve the watermark extraction accuracy for attacked images.
[0016] In some non-limiting embodiments, a database is used for storing watermark messages associated with original images to be watermarked, as described below. The use of the database allows not to embed watermark messages directly into images, which in turn prevents the distortion generated by the watermarking from increasing as the length of watermark messages increases.
[0017] In some non-limiting embodiments, a key-based zero-bit watermarking method utilizing a database in which watermark messages are stored allows to perform multi-bit watermarking while for performing watermarking of images using only the zero-bit watermarking method. Such a method allows for robustness not to drop when the watermark message length increases in addition to offering a robust solution against adversarial attacks while offering high capacity.
[0018] In accordance with a first broad aspect, there is provided a method for zero-bit watermarking an image, the method being executed by a processor, the method comprising: receiving an image to be watermarked, the received image having a given size defined by at least a height, a width and a number of image channels; generating a key matrix comprising matrix elements and having the given size, a first set of the matrix elements each having a first value and a second set of the matrix elements each having a second value opposite to the first value; generating a watermarked image by combining the key matrix with the received image.
[0019] In some embodiments, the image channels are color channels and the first value and the second value each correspond to a variation of a color value.
[0020] In some embodiments, when a total number of the matrix elements is an even number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements.
[0021] In other embodiments, when a total number of the matrix elements is an odd number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements minus one or to the number of the second set of the matrix elements plus one.
[0022] In some embodiments, the first value is +1 and the second value is -1.
[0023] In some embodiments, the step of generating a key matrix comprises randomly generating the key matrix, the first set of the matrix elements and the second set of the matrix elements being randomly distributed in the key matrix.
[0024] In some embodiments, the key matrix is unique.
[0025] In some embodiments, the step of generating the watermarked image comprises: obtaining a modified matrix by multiplying the key matrix by a strength factor, the strength factor being an integer number greater than zero; and adding the modified matrix to the received image to generate the watermarked image, the watermarked image comprising image elements.
[0026] In some embodiments, the method further comprises, if a given one of the image elements has a value being greater than a maximum threshold, setting the value of the given one of the image elements to the maximum threshold.
[0027] In some embodiments, the method further comprises, if a given one of the image elements has a value being less than a minimum threshold, setting the value of the given one of the image elements to the minimum threshold.
[0028] In accordance with a third broad aspect, there is provided a system for zero-bit watermarking an image, the system comprising: a processor; a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions; the processor, upon executing the instructions, being configured for: receiving an image to be watermarked, the received image having a given size defined by at least a height, a width and a number of image channels; generating a key matrix comprising matrix elements and having the given size, a first set of the matrix elements having a first value and a first set of the matrix elements having a second value opposite to the first value; and generating a watermarked image by combining the key matrix with the received image.
[0029] In some embodiments, the image channels are color channels and the first value and the second value each correspond to a variation of a color value.
[0030] In some embodiments, when a total number of the matrix elements is an even number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements.
[0031] In other embodiments, when a total number of the matrix elements is an odd number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements minus one or to the number of the second set of the matrix elements plus one.
[0032] In some embodiments, the first value is +1 and the second value is -1.
[0033] In some embodiments, the processor is configured for randomly generating the key matrix, the first set of the matrix elements and the second set of the matrix elements being randomly distributed in the key matrix.
[0034] In some embodiments, the key matrix is unique.
[0035] In some embodiments, the processor is configured for: obtaining a modified matrix by multiplying the key matrix by a strength factor, the strength factor being an integer number greater than zero; and adding the modified matrix to the received image to generate the watermarked image, the watermarked image comprising image elements.
[0036] In some embodiments, the processor is further configured for, if a given one of the image elements has a value being greater than a maximum threshold, setting the value of the given one of the image elements to the maximum threshold.
[0037] In some embodiments, the processor is further configured for, if a given one of the image elements has a value being less than a minimum threshold, setting the value of the given one of the image elements to the minimum threshold.
[0038] In accordance with another broad aspect, there is provided a method for determining whether an image has been watermarked using the method of claim 1, the method being executed by a processor, the method comprising: receiving a given image; extracting image features from the given image; accessing a database comprising respective reference features and a respective reference key matrix for each one of reference images; for at least a group of the reference features: determining matching features between the reference features and the image features; determining a value for an offset parameter based on the matching features; generating a modified key matrix by modifying the reference key matrix associated with the matching features based on the value of the offset parameter; calculating a first watermark parameter based on the modified key matrix, the given image and a size of the given image; comparing the first watermark parameter to a threshold; and indicating that the given image is watermarked when the first watermark parameter is at least equal to the threshold.
[0039] In some embodiments, the first watermark parameter is obtained using:
[0040] where H′. W′. C′is the size of the given image, is the modified key matrix and I’ is the given image.
[0041] In some embodiments, the threshold is obtained using:
[0042] where p is a false positive rate.
[0043] In some embodiments, the method further comprises for at least the group of reference images, when the first watermark parameter is less than the first predefined threshold: determining a value for a height scale parameter based on a height of the received image and a height of the reference key matrix; determining a value for a width scale parameter based on a width of the received image and a width of the reference key matrix; generating a modified image by modifying the given image based on the value for the value for the height scale parameter and the value for the width scale parameter; calculating a second watermark parameter based on the reference key matrix, the modified image and a size of the reference key matrix; comparing the second watermark parameter to the threshold; and indicating that the given image is watermarked when the second watermark parameter is at least equal to the threshold.
[0044] In some embodiments, the second watermark parameter is obtained using:
[0045] where H. W. C is the size of the reference key, Ki is the reference key matrix and is the modified image.
[0046] In some embodiments, the height scale parameter and the width scale parameter are respectively obtained using:
[0047] where αh is the height scale parameter, αw is the width scale parameter, respectively, H is a height of the reference key matrix, H’ is a height of the received image, W is a width of the reference key matrix, and W’ is a width of the received image.
[0048] In some embodiments, the group of reference images comprises all of the reference images.
[0049] In other embodiments, the group of reference features is obtained by determining, amongst the reference features, a given number of nearest neighbors based on the image features.
[0050] In some embodiments, Content Based Image Retrieval (CBIR) is used for determining the nearest neighbors.
[0051] In some embodiments, one of Triangle Area Representation (TAR) , Restricted Spatial Order Constraints (RSOC) and Random Sample Consensus (RANSAC) is used for determining the value for the offset parameter based on the matching features.
[0052] In accordance with another broad aspect, there is provided a system for determining whether an image has been watermarked using the method of claim 1, the system comprising: aprocessor; anon-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions; the processor, upon executing the instructions, being configured for: receiving a given image; extracting image features from the given image; accessing a database comprising respective reference features and a respective reference key matrix for each one of reference images; for at least a group of the reference features: determining matching features between the reference features and the image features; determining a value for an offset parameter based on the matching features; generating a modified key matrix by modifying the reference key matrix associated with the matching features based on the value of the offset parameter; calculating a first watermark parameter based on the modified key matrix, the given image and a size of the given image; comparing the first watermark parameter to a threshold; and indicating that the given image is watermarked when the first watermark parameter is at least equal to the threshold.
[0053] In some embodiments, the first watermark parameter is obtained using:
[0054] where H′. W′. C′is the size of the given image, is the modified key matrix and I’ is the given image.
[0055] In some embodiments, the threshold is obtained using:
[0056] where p is a false positive rate.
[0057] In some embodiments, the processor is further configured for, for at least the group of reference images, when the first watermark parameter is less than the first predefined threshold: determining a value for a height scale parameter based on a height of the received image and a height of the reference key matrix; determining a value for a width scale parameter based on a width of the received image and a width of the reference key matrix; generating a modified image by modifying the given image based on the value for the value for the height scale parameter and the value for the width scale parameter; calculating a second watermark parameter based on the reference key matrix, the modified image and a size of the reference key matrix; comparing the second watermark parameter to the threshold; and indicating that the given image is watermarked when the second watermark parameter is at least equal to the threshold.
[0058] In some embodiments, the second watermark parameter is obtained using:
[0059] where H. W. C is the size of the reference key, Ki is the reference key matrix and is the modified image.
[0060] In some embodiments, the height scale parameter and the width scale parameter are respectively obtained using:
[0061] where αh is the height scale parameter, αw is the width scale parameter, respectively, H is a height of the reference key matrix, H’ is a height of the received image, W is a width of the reference key matrix, and W’ is a width of the received image.
[0062] In some embodiments, the group of reference images comprises all of the reference images.
[0063] In some embodiments, the processor is configured for determining, amongst the reference features, a given number of nearest neighbors based on the image features, thereby obtaining the group of reference features.
[0064] In some embodiments, the processor is configured for using Content Based Image Retrieval (CBIR) to identify the nearest neighbors.
[0065] In some embodiments, the processor is configured for using one of Triangle Area Representation (TAR) , Restricted Spatial Order Constraints (RSOC) and Random Sample Consensus (RANSAC) to determine the value for the offset parameter based on the matching features.
[0066] In accordance with a further broad aspect, there is provided a method for extracting a watermark message from an image, the method being executed by a processor, the method comprising: receiving a given image; accessing a database containing reference keys and watermark messages, each being associated with a respective reference image, each one of the reference keys having been previously used to zero-bit watermark the respective reference image; identifying, amongst least a group of the reference keys, a given one of the reference keys that was used to zero-bit watermark the given image; retrieving a given one of the reference watermark messages that is associated with the given one of the reference keys; and providing the given one of the reference watermark messages.
[0067] In some embodiments, the database further comprises reference features each associated with the respective reference image.
[0068] In some embodiments, the method further comprises: extracting image features from the received given image; and determining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference keys corresponding to given ones of the reference keys that are associated with the nearest neighbor features.
[0069] In some embodiments, the step of determining the nearest neighbor features is performed using Content Based Image Retrieval (CBIR) .
[0070] In some embodiments, the group of the reference keys comprises all the reference keys.
[0071] In some embodiments, each one of the reference keys comprises a key matrix, the key matrix comprising matrix elements and having a given size equal to a size of the respective reference image, first ones of the matrix elements having a first value and second ones of the matrix elements having a second value opposite to the first value.
[0072] In some embodiments, a number of the first ones of the matrix elements being substantially equal to a number of the second ones of the matrix elements.
[0073] In some embodiments, the first value is +1 and the second value is -1.
[0074] In some embodiments, each one of the reference keys is generated using a zero-bit self supervised learning (SSL) watermarking method and said identifying the given one of the reference keys is performed using the zero-bit SSL watermarking method.
[0075] In some embodiments, each one of the reference keys is generated using ZoDiac and said identifying the given one of the reference keys is performed using ZoDiac.
[0076] In accordance with still another broad aspect, there is provided a system for extracting a watermark message from an image, the system comprising: a processor; a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions; the processor, upon executing the instructions, being configured for: receiving a given image; accessing a database containing reference keys and watermark messages, each being associated with a respective reference image, each one of the reference keys having been previously used to zero-bit watermark the respective reference image; identifying, amongst least a group of the reference keys, a given one of the reference keys that was used to zero-bit watermark the given image; retrieving a given one of the reference watermark messages that is associated with the given one of the reference keys; and providing the given one of the reference watermark messages.
[0077] In some embodiments, the database further comprises reference features each associated with the respective reference image.
[0078] In some embodiments, the processor is further configured for: extracting image features from the received given image; and determining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference keys corresponding to given ones of the reference keys that are associated with the nearest neighbor features.
[0079] In some embodiments, the processor is configured for determining the nearest neighbor features using Content Based Image Retrieval (CBIR) .
[0080] In some embodiments, the group of the reference keys comprises all the reference keys.
[0081] In some embodiments, each one of the reference keys comprises a key matrix, the key matrix comprising matrix elements and having a given size equal to a size of the respective reference image, first ones of the matrix elements having a first value and second ones of the matrix elements having a second value opposite to the first value.
[0082] In some embodiments, a number of the first ones of the matrix elements being substantially equal to a number of the second ones of the matrix elements.
[0083] In some embodiments, the first value is +1 and the second value is -1.
[0084] In some embodiments, each one of the reference keys is generated using a zero-bit self supervised learning (SSL) watermarking method and wherein the processor is configured for identifying the given one of the reference keys is performed using the zero-bit SSL watermarking method.
[0085] In some embodiments, each one of the reference keys is generated using ZoDiac and wherein the processor is configured for identifying the given one of the reference keys is performed using ZoDiac.
[0086] In accordance with still a further broad aspect, there is provided a method for extracting a watermark message from an image, the method being executed by a processor, the method comprising: receiving a given image; extracting an image hash from the given image; accessing a database containing reference hashes and reference watermark messages, each being associated with a respective reference image; for at least a group of the reference hashes, comparing the image hash to the reference hash; identifying a match between the image hash and a given one of the reference hashes to obtain a matching hash; retrieving a given one of the reference watermark messages associated with the matching hash; and outputting the given one of the reference watermark messages.
[0087] In some embodiments, the database further comprises reference features each associated with the respective reference image.
[0088] In some embodiments, the method further comprises: extracting image features from the received given image; and determining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference hashes corresponding to given ones of the reference hashes that are associated with the nearest neighbor features.
[0089] In some embodiments, the step of determining the nearest neighbor features is performed using Content Based Image Retrieval (CBIR) .
[0090] In some embodiments, the group of the reference hashes comprises all the reference keys.
[0091] In some embodiments, each one of the reference hashes is generated using one of Secure Hash Algorithms (SHA) and BLAKE.
[0092] In some embodiments, each one of the reference hashes is embedded in the respective reference image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.
[0093] In some embodiments, the step of extracting the image hash from the given image is performed using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.
[0094] In accordance with still another broad aspect, there is provided a system for extracting a watermark message from an image, the system comprising: a processor; a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions; the processor, upon executing the instructions, being configured for: receiving a given image; extracting an image hash from the given image; accessing a database containing reference hashes and reference watermark messages, each being associated with a respective reference image; for at least a group of the reference hashes, comparing the image hash to the reference hash; identifying a match between the image hash and a given one of the reference hashes to obtain a matching hash; retrieving a given one of the reference watermark messages associated with the matching hash; and outputting the given one of the reference watermark messages.
[0095] In some embodiments, the database further comprises reference features each associated with the respective reference image.
[0096] In some embodiments, the processor is further configured for: extracting image features from the received given image; and determining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference hashes corresponding to given ones of the reference hashes that are associated with the nearest neighbor features.
[0097] In some embodiments, the processor is further configured for determining the nearest neighbor features using Content Based Image Retrieval (CBIR) .
[0098] In some embodiments, the group of the reference hashes comprises all the reference keys.
[0099] In some embodiments, each one of the reference hashes is generated using one of Secure Hash Algorithms (SHA) and BLAKE.
[0100] In some embodiments, each one of the reference hashes is embedded in the respective reference image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.
[0101] In some embodiments, the processor is further configured for extracting the image hash from the given image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.
[0102] Terms and Definitions
[0103] In the context of the present specification, a “server” is a computer program that is running on appropriate hardware and is capable of receiving requests (e.g., from computing devices) over a network (e.g., a communication network) , and carrying out those requests, or causing those requests to be carried out. The hardware may be one physical computer or one physical computer system, but neither is required to be the case with respect to the present technology. In the present context, the use of the expression a “server” is not intended to mean that every task (e.g., received instructions or requests) or any particular task will have been received, carried out, or caused to be carried out, by the same server (i.e., the same software and / or hardware) ; it is intended to mean that any number of software elements or hardware devices may be involved in receiving / sending, carrying out or causing to be carried out any task or request, or the consequences of any task or request; and all of this software and hardware may be one server or multiple servers, both of which are included within the expressions “at least one server” and “a server” .
[0104] In the context of the present specification, “computing device” is any computing apparatus or computer hardware that is capable of running software appropriate to the relevant task at hand. Thus, some (non-limiting) examples of computing devices include servers, general purpose personal computers (desktops, laptops, netbooks, etc. ) , mobile computing devices, smartphones, and tablets, and network equipment such as routers, switches, and gateways. It should be noted that a computing device in the present context is not precluded from acting as a server to other computing devices. The use of the expression “a computing device” does not preclude multiple computing devices being used in receiving / sending, carrying out or causing to be carried out any task or request, or the consequences of any task or request, or steps of any method described herein. In the context of the present specification, a “client device” refers to any of a range of end-user client computing devices, associated with a user, such as personal computers, tablets, smartphones, and the like.
[0105] In the context of the present specification, the expression "computer readable storage medium" (also referred to as "storage medium” and “storage” ) is intended to include non-transitory media of any nature and kind whatsoever, including without limitation RAM, ROM, disks (CD-ROMs, DVDs, floppy disks, hard drivers, etc. ) , USB keys, solid state-drives, tape drives, etc. A plurality of components may be combined to form the computer information storage media, including two or more media components of a same type and / or two or more media components of different types.
[0106] In the context of the present specification, a "database" is any structured collection of data, irrespective of its particular structure, the database management software, or the computer hardware on which the data is stored, implemented or otherwise rendered available for use. A database may reside on the same hardware as the process that stores or makes use of the information stored in the database or it may reside on separate hardware, such as a dedicated server or plurality of servers.
[0107] In the context of the present specification, the expression “information” includes information of any nature or kind whatsoever capable of being stored in a database. Thus, information includes, but is not limited to audiovisual works (images, movies, sound records, presentations etc. ) , data (location data, numerical data, etc. ) , text (opinions, comments, questions, messages, etc. ) , documents, spreadsheets, lists of words, etc.
[0108] In the context of the present specification, unless expressly provided otherwise, an “indication” of an information element may be the information element itself or a pointer, reference, link, or other indirect mechanism enabling the recipient of the indication to locate a network, memory, database, or other computer-readable medium location from which the information element may be retrieved. For example, an indication of a document could include the document itself (i.e. its contents) , or it could be a unique document descriptor identifying a file with respect to a particular file system, or some other means of directing the recipient of the indication to a network location, memory address, database table, or other location where the file may be accessed. As one skilled in the art would recognize, the degree of precision required in such an indication depends on the extent of any prior understanding about the interpretation to be given to information being exchanged as between the sender and the recipient of the indication. For example, if it is understood prior to a communication between a sender and a recipient that an indication of an information element will take the form of a database key for an entry in a particular table of a predetermined database containing the information element, then the sending of the database key is all that is required to effectively convey the information element to the recipient, even though the information element itself was not transmitted as between the sender and the recipient of the indication.
[0109] In the context of the present specification, the expression “communication network” is intended to include a telecommunications network such as a computer network, the Internet, a telephone network, a Telex network, a TCP / IP data network (e.g., a WAN network, a LAN network, etc. ) , and the like. The term “communication network” includes a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF) , infrared and other wireless media, as well as combinations of any of the above.
[0110] In the context of the present specification, the words “first” , “second” , “third” , etc. have been used as adjectives only for the purpose of allowing for distinction between the nouns that they modify from one another, and not for the purpose of describing any particular relationship between those nouns. Thus, for example, it should be understood that the use of the terms “server” and “third server” is not intended to imply any particular order, type, chronology, hierarchy or ranking (for example) of / between the server, nor is their use (by itself) intended imply that any “second server” must necessarily exist in any given situation. Further, as is discussed herein in other contexts, reference to a “first” element and a “second” element does not preclude the two elements from being the same actual real-world element. Thus, for example, in some instances, a “first” server and a “second” server may be the same software and / or hardware, in other cases they may be different software and / or hardware.
[0111] In the context of the present specification, the expression “blind watermarking” refers to a technique used in digital signal processing to embed imperceptible and robust watermark data into a digital multimedia signal such as image, audio or video data, without requiring the original unmarked content during the extraction process.
[0112] In the context of the present specification, the expression “non-blind watermarking” refers to a technique used in digital signal processing where a watermark is embedded into a digital multimedia signal with knowledge of the original unmarked content during both embedding and extraction processes.
[0113] In the context of the present specification, the expression “zero-bit watermarking” refers to a watermarking method where the embedded message is conceptually zero-bit long. The primary purpose of a zero-bit watermarking is to identify whether a digital watermark exists or not in an object.
[0114] In the context of the present specification, the expression “multi-bit watermarking” refers to a technique used in digital watermarking where multiple bits of information are embedded into a digital multimedia signal.
[0115] In the context of the present specification, the expression “invisible watermarking” or “imperceptible watermarking” or “transparent watermarking” refers to a technique used to embed a digital watermark into digital multimedia signal in a manner that is imperceptible to human senses.
[0116] In the context of the present specification, the expression “visible watermarking” refers to a technique used to embed a digital watermark into digital multimedia signal in a manner that is perceptible to human senses.
[0117] In the context of the present specification, the term “features” refers to distinctive characteristics or patterns within an image that are relevant for analysis, interpretation, manipulation and / or the like.
[0118] In the context of the present specification, the expression “content-based image retrieval (CBIR) ” refers to a technique used to search and retrieve images from a database based on their visual content rather than relying on textual metadata or tags.
[0119] In the context of the present specification, the expression “scale-invariant feature transform (SIFT) ” refers to a computer vision technique configured for detecting and describing distinctive features in images. SIFT is usually robust to changes in scale, rotation, illumination, and / or viewpoint, making it suitable for various applications such as object recognition, image stitching, and image retrieval.
[0120] In the context of the present specification, the expression “approximate nearest neighbors (ANN) ” refers to a technique used in machine learning and data mining to find the nearest neighbors of a query point in a dataset.
[0121] In the context of the present specification, the expression “peak signal-to-noise ratio (PSNR) ” refers to a metric that quantifies the fidelity of a reconstructed or processed signal compared to the original signal. It measures the ratio between the maximum possible power of the original signal and the power of the noise or distortion introduced during processing, expressed in terms of decibels (dB) .
[0122] Embodiments of the present technology each have at least one of the above-mentioned objects and / or aspects, but do not necessarily have all of them. It should be understood that some aspects of the present technology that have resulted from attempting to attain the above-mentioned object may not satisfy this object and / or may satisfy other objects not specifically recited herein.
[0123] Additional and / or alternative features, aspects and advantages of embodiments of the present technology will become apparent from the following description, the accompanying drawings and the appended claims.BRIEF DESCRIPTION OF THE DRAWINGS
[0124] For a better understanding of the present technology, as well as other aspects and further features thereof, reference is made to the following description which is to be used in conjunction with the accompanying drawings, where:
[0125] Figure 1 depicts a schematic diagram of a computing device, in accordance with one or more non-limiting embodiments of the present technology.
[0126] Figure 2 depicts a schematic diagram of a communication system, in accordance with one or more non-limiting embodiments of the present technology.
[0127] Figure 3 depicts a flow chart illustrating a method for zero-bit watermarking an image using a key, in accordance with one or more non-limiting embodiments of the present technology.
[0128] Figures 4A and 4B depict a flow chart illustrating a method for determining whether an image has been watermarked using the method of Figure 3, in accordance with one or more non-limiting embodiments of the present technology.
[0129] Figure 5 depicts a flow chart illustrating a method for extracting a watermark message from an image that has been zero-bit watermarked, in accordance with one or more non-limiting embodiments of the present technology.
[0130] Figure 6 depicts a flow chart illustrating a method for watermarking an image using the hash of a watermark message associated with the image, in accordance with one or more non-limiting embodiments of the present technology.
[0131] Figure 7 depicts a flow chart illustrating a method for extracting a watermark message from an image that has been watermarked using the method of Figure 6, in accordance with one or more non-limiting embodiments of the present technology.DETAILED DESCRIPTION
[0132] The examples and conditional language recited herein are principally intended to aid the reader in understanding the principles of the present technology and not to limit its scope to such specifically recited examples and conditions. It will be appreciated that those skilled in the art may devise various arrangements which, although not explicitly described or shown herein, nonetheless embody the principles of the present technology and are included within its spirit and scope.
[0133] Furthermore, as an aid to understanding, the following description may describe relatively simplified embodiments of the present technology. As persons skilled in the art would understand, various embodiments of the present technology may be of a greater complexity.
[0134] In some cases, what are believed to be helpful examples of modifications to the present technology may also be set forth. This is done merely as an aid to understanding, and, again, not to define the scope or set forth the bounds of the present technology. These modifications are not an exhaustive list, and a person skilled in the art may make other modifications while nonetheless remaining within the scope of the present technology. Further, where no examples of modifications have been set forth, it should not be interpreted that no modifications are possible and / or that what is described is the sole manner of implementing that element of the present technology.
[0135] Moreover, all statements herein reciting principles, aspects, and embodiments of the present technology, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof, whether they are currently known or developed in the future. Thus, for example, it will be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the present technology. Similarly, it will be appreciated that any flowcharts, flow diagrams, state transition diagrams, pseudo-code, and the like represent various processes which may be substantially represented in computer-readable media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.
[0136] The functions of the various elements shown in the figures, including any functional block labeled as a "processor" or a “graphics processing unit” , may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. In one or more non-limiting embodiments of the present technology, the processor may be a general-purpose processor, such as a central processing unit (CPU) , a processor dedicated to a specific purpose, such as a graphics processing unit (GPU) , a neural network processor, or the like. Moreover, explicit use of the term "processor" or "controller" should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, network processor, application specific integrated circuit (ASIC) , field programmable gate array (FPGA) , read-only memory (ROM) for storing software, random access memory (RAM) , and non-volatile storage. Other hardware, conventional and / or custom, may also be included.
[0137] Software modules, or simply modules which are implied to be software, may be represented herein as any combination of flowchart elements or other elements indicating performance of process steps and / or textual description. Such modules may be executed by hardware that is expressly or implicitly shown.
[0138] With these fundamentals in place, we will now consider some non-limiting examples to illustrate various embodiments of aspects of the present technology.
[0139] Referring to Figure 1, there is shown a computing device 100 suitable for use with some embodiments of the present technology, the computing device 100 comprising various hardware components including one or more single or multi-core processors collectively represented by processor 110, a graphics processing unit (GPU) 111, a solid-state drive 120, a random-access memory 130, a display interface 140, and an input / output interface 150.
[0140] Communication between the various components of the computing device 100 may be enabled by one or more internal and / or external buses 160 (e.g., a PCI bus, universal serial bus, IEEE 1394 “Firewire” bus, SCSI bus, Serial-ATA bus, etc. ) , to which the various hardware components are electronically coupled.
[0141] The input / output interface 150 may be coupled to a touchscreen 190 and / or to the one or more internal and / or external buses 160. The touchscreen 190 may be part of the display. In one or more embodiments, the touchscreen 190 is the display. The touchscreen 190 may equally be referred to as a screen 190. In the embodiments illustrated in Figure 1, the touchscreen 190 comprises touch hardware 194 (e.g., pressure-sensitive cells embedded in a layer of a display allowing detection of a physical interaction between a user and the display) and a touch input / output controller 192 allowing communication with the display interface 140 and / or the one or more internal and / or external buses 160. In one or more embodiments, the input / output interface 150 may be connected to a keyboard (not shown) , a mouse (not shown) or a trackpad (not shown) allowing the user to interact with the computing device 100 in addition or in replacement of the touchscreen 190.
[0142] According to embodiments of the present technology, the solid-state drive 120 stores program instructions suitable for being loaded into the random-access memory 130 and executed by the processor 110 and / or the GPU 111. For example, the program instructions may be part of a library or an application.
[0143] The computing device 100 may be implemented as a server, a desktop computer, a laptop computer, a tablet, a smartphone, a personal digital assistant or any device that may be configured to implement the present technology, as it may be understood by a person skilled in the art.
[0144] Referring to Figure 2, there is shown a schematic diagram of a system 200, the system 200 being suitable for implementing one or more non-limiting embodiments of the present technology. It is to be expressly understood that the system 200 as shown is merely an illustrative implementation of the present technology. Thus, the description thereof that follows is intended to be only a description of illustrative examples of the present technology. This description is not intended to define the scope or set forth the bounds of the present technology. In some cases, what are believed to be helpful examples of modifications to the system 200 may also be set forth below. This is done merely as an aid to understanding, and, again, not to define the scope or set forth the bounds of the present technology. These modifications are not an exhaustive list, and, as a person skilled in the art would understand, other modifications are likely possible. Further, where this has not been done (i.e., where no examples of modifications have been set forth) , it should not be interpreted that no modifications are possible and / or that what is described is the sole manner of implementing that element of the present technology. As a person skilled in the art would understand, this is likely not the case. In addition, it is to be understood that the system 200 may provide in certain instances simple embodiments of the present technology, and that where such is the case they have been presented in this manner as an aid to understanding. As persons skilled in the art would understand, various embodiments of the present technology may be of a greater complexity.
[0145] The system 200 comprises among others a first computing device 210, a second computing device 220, and a database 230 communicatively coupled over a communications network 240.
[0146] The system 200 comprises a first computing device 210.
[0147] The first computing device 210 comprises one or more components of the computing device 100 such as one or more single or multi-core processors collectively represented by processor 110, the graphics processing unit (GPU) 111, the solid-state drive 120, the random-access memory 130, the display interface 140, and / or the input / output interface 150.
[0148] It will be appreciated that the first computing device 210 may be implemented as a server, a desktop computer, a laptop, a smartphone and the like.
[0149] In non-limiting embodiments in which the first computing device 210 is implemented as a server, the server may be implemented as a server running an operating system (OS) . Needless to say that the server may be implemented in any suitable hardware and / or software and / or firmware or a combination thereof. The server may be a single server. In one or more alternative non-limiting embodiments of the present technology, the functionality of the server may be distributed and may be implemented via multiple servers (not shown) . The implementation of the server is well known to the person skilled in the art. However, the server comprises a communication interface (not shown) configured to communicate with various entities (such as the database 230, for example and other devices potentially coupled to the communication network 240) via the communication network 240. The server further comprises at least one computer processor (e.g., the processing device of the computing device 100) operationally connected with the communication interface and structured and configured to execute various processes to be described herein.
[0150] The first computing device is configured to among others watermark an image, as described below.
[0151] In some non-limiting embodiments, the first computing device is configured to among others:
[0152] receive an image I to be watermarked, the image I having a given size and being defined by at least a height, a width and a number of image channels;
[0153] generate a key matrix K comprising matrix elements and having the given size, first ones of the matrix elements, i.e., a first set of the matrix elements, each having a first value and second ones of the matrix elements, i.e., a second set of the matrix elements, each having a second value opposite to the first value, a number of the first ones of the matrix elements being substantially equal to a number of the second ones of the matrix elements;
[0154] generate a watermarked image I’ by combining the key matrix K with the received image I; and
[0155] output the watermarked image I’.
[0156] In some non-limiting embodiments, the first computing device is configured to among others:
[0157] receive an image to be watermarked and a watermark message associated thereto;
[0158] generate a hash from the watermark message;
[0159] watermark the image using the hash, thereby obtaining a watermarked image;
[0160] storing the watermark and the hash in a database, the watermark message and the hash being associated together; and
[0161] output the watermarked image.
[0162] The system 200 comprises a second computing device 220.
[0163] The second computing device 220 comprises one or more components of the computing device 100 such as one or more single or multi-core processors collectively represented by processor 110, the graphics processing unit (GPU) 111, the solid-state drive 120, the random-access memory 130, the display interface 140, and / or the input / output interface 150.
[0164] It will be appreciated that the second computing device 220 may be implemented as a server, a desktop computer, a laptop, a smartphone and the like.
[0165] In non-limiting embodiments in which the second computing device 220 is implemented as a server, the server may be implemented as a server running an operating system (OS) . Needless to say that the server may be implemented in any suitable hardware and / or software and / or firmware or a combination thereof. The server may be a single server. In one or more alternative non-limiting embodiments of the present technology, the functionality of the server may be distributed and may be implemented via multiple servers (not shown) . The implementation of the server is well known to the person skilled in the art. However, the server comprises a communication interface (not shown) configured to communicate with various entities (such as the database 230, for example and other devices potentially coupled to the communication network 240) via the communication network 240. The server further comprises at least one computer processor (e.g., the processing device of the computing device 100) operationally connected with the communication interface and structured and configured to execute various processes to be described herein.
[0166] The second computing device 220 is configured to among others determine whether an image is watermarked and / or extract a message embedded into a watermarked image, as described below.
[0167] In some non-limiting embodiments, the second computing device 220 is configured to among others:
[0168] receive a given image;
[0169] extract image features from the given image;
[0170] access a database comprising respective reference features and a respective reference key matrix for each one of reference images;
[0171] for at least a group of the reference features:
[0172] determine matching features between the reference features and the image features;
[0173] determine a value for an offset parameter based on the matching features;
[0174] generate a modified key matrix by modifying the reference key matrix associated with the matching features based on the value of the offset parameter;
[0175] calculate a first watermark parameter based on the modified key matrix, the given image and a size of the given image;
[0176] compare the first watermark parameter to a threshold; and
[0177] indicate that the given image is watermarked when the first watermark parameter is at least equal to the threshold.
[0178] In some non-limiting embodiments, the second computing device 220 is configured to among others:
[0179] receive a given image;
[0180] access a database containing reference keys and watermark messages, each being associated with a respective reference image, each one of the reference keys having been previously used to zero-bit watermark the respective reference image;
[0181] identify, amongst least a group of the reference keys, a given one of the reference keys that was used to zero-bit watermark the given image;
[0182] retrieve a given one of the reference watermark messages that is associated with the given one of the reference keys; and
[0183] output or provide the given one of the reference watermark messages.
[0184] In some non-limiting embodiments, the second computing device 220 is configured to among others:
[0185] receive a given image;
[0186] extract an image hash from the given image;
[0187] access a database containing reference hashes and reference watermark messages, each being associated with a respective reference image;
[0188] for at least a group of the reference hashes, compare the image hash to the reference hash;
[0189] identify a match between the image hash and a given one of the reference hashes to obtain a matching hash;
[0190] retrieve a given one of the reference watermark messages associated with the matching hash; and
[0191] provide the given one of the reference watermark messages.
[0192] While in the above description, the first computing device 210 is configured for watermarking an image and the second computing device 220 is configured to determine whether an image is watermarked and / or extracting a watermark message from an image, it will be understood that both the watermarking and the watermark extraction could be performed by a same computing device such as the first computing device 210.
[0193] A database 230 is communicatively coupled to the first computing device 210 and the second computing device 220 via the communications network 240 but, in one or more alternative embodiments, the database 230 may be directly coupled to first computing device 210 or the second computing device 220 without departing from the teachings of the present technology. Although the database 230 is illustrated schematically herein as a single entity, it will be appreciated that the database 230 may be configured in a distributed manner, for example, the database 230 may have different components, each component being configured for a particular kind of retrieval therefrom or storage therein.
[0194] The database 230 may be a structured collection of data, irrespective of its particular structure or the computer hardware on which data is stored, implemented or otherwise rendered available for use. The database 230 may reside on the same hardware as a process that stores or makes use of the information stored in the database 230 or it may reside on separate hardware, such as on the first or second computing device 210, 220. The database 230 may receive data from the first or second computing device 210, 220 for storage thereof and may provide stored data to the first or second computing device 210, 220 for use thereof.
[0195] In one or more embodiments of the present technology, the database 230 is configured to store among others: (i) keys such as key matrices; (ii) features, (iii) hashes; (iv) messages and / or (v) additional information.
[0196] In one or more embodiments of the present technology, the communications network 240 is the Internet. In one or more alternative non-limiting embodiments, the communications network 240 may be implemented as any suitable local area network (LAN) , wide area network (WAN) , a private communication network or the like. It will be appreciated that embodiments for the communication network 240 are for illustration purposes only. How a communication link between the first computing device 210, the second computing device 220, the database 230, and / or another computing device (not shown) and the communications network 240 is implemented will depend among others on how each computing device is implemented.
[0197] Figure 3 depicts a flowchart of a zero-bit watermarking method 300, in accordance with one or more non-limiting embodiments of the present technology.
[0198] In one or more embodiments, the first computing device 210 comprises a processing device such as the processor 110 and / or the GPU 111 operatively connected to a non-transitory computer readable storage medium such as the solid-state drive 120 and / or the random-access memory 130 storing computer-readable instructions. The processing device upon executing the computer-readable instructions, is configured to or operable to execute the method 300.
[0199] The method 300 begins at processing step 302.
[0200] According to processing step 302, the processing device received an image I to be watermarked. It should be understood that the image I having a given size is defined as a matrix of elements having the given size. Each element of the matrix is defined by a position along each dimension of the matrix and a value is assigned to each element of the matrix.
[0201] In some non-limiting embodiments, the image I is a 2D image and comprises pixels. In this case, the size or dimension of the received image I is (H. W. C) , where H is the height of the received image I (i.e., the number of pixels along the height of the image I) , W is the width of the received image I (i.e., the number of pixels along the width of the image I) and C is a number of channels associated with the received image I. The image I may then be seen as a matrix having the size (H. W. C) and in which each element has a given value assigned thereto and is defined by a given height position, a given width position and a given channel position. In other words, each pixel of the received image I is associated with a respective value for each channel.
[0202] In some non-limiting embodiments, the image I is a 3D image and comprises voxels. In this case, the size of the received image I is (H. W. D. C) where H is the height of the received image I, W is the width of the received image I, D is the depth of the received image I (i.e., the number of voxels along the depth of the image I) and C is the number of channels associated with the received image I. The image I may then be seen as a matrix having the size (H. W. D. C) and in which each element has a given value assigned thereto and is defined by a given height position, a given width position, a given depth position and a given channel position. In other words, each voxel of the received image I is associated with a respective value for each channel.
[0203] In some non-limiting embodiments, the channels associated with the received image I comprise at least one color channel. For example, three color channels may be associated with the received image I. However, it will be understood that at least one channel other than a color channel may also be associated with the image I. For example, a given number of color channels may be associated with the image I and at least one non-color channel, such as an alpha channel for defining the transparency of the image I, may also be associated with the received image I.
[0204] In embodiments in which the received image I comprises at least one color channel, it should be understood that each element of the matrix representing the received image I is associated with a respective color value.
[0205] In some non-limiting embodiments, a single color channel is associated with the image I. If the received image I is a 2D image, a single color value is associated with each pixel (or each element of the 2D matrix representing the received image I) . In some non-limiting embodiments, the received image I is a black and white image and the possible value for the elements of the single color channel is either black or white. In some other non-limiting embodiments, the received image I is a grayscale image, and a grayscale value is assigned to each element of the color channel.
[0206] In some non-limiting embodiments, three color channels are associated with the image I. If the image is a 2D image, three color values are associated with each pixel of the image I. For example, the received image I may be defined in the red, green and blue (RGB) system. In this case, the three color channels comprise a red channel, a green channel a blue channel. A red value is associated with each element of the red channel, a green value is associated with each element of the green channel and a blue value is associated with each element of the blue channel. In another example, the received image I may be defined in the cyan, magenta and yellow (CMY) system. In this case, the three color channels comprise a cyan channel, a magenta channel a yellow channel. A cyan value is associated with each element of the cyan channel, a magenta value is associated with each element of the magenta channel and a yellow value is associated with each element of the yellow channel.
[0207] Referring back to Figure 3 and according to processing step 304, the processing device generates a key matrix K. The key matrix K has the same size as that of the received image I. For example, if the size of the received image is (H. W. C) , then the size of the key matrix K is also (H. W. C) . In another example, if the size of the received image I is (H. W. D. C) , then the size of the key matrix K is also (H. W. D. C) .
[0208] The key matrix K is generated so that the value of each of its element is equal to either a first value or a second value being the opposite of the first value. For example, the value of each element of the key matrix K may be either +1 or -1. In this case, if the size of the key matrix K is (H. W. C) , each element Ki, j, k of the key matrix K is equal to either +1 or -1, where 1 ≤ i ≤H, 1 ≤ j ≤ W and 1 ≤ k ≤ C. The value of each element of the key matrix K may be seen as a value variation for a respective element of the received image I. For example, if the received image I comprises a single grayscale color channel, then the value of each element of the key matrix K corresponds to a variation of the grayscale value associated with its respective element if the image I.
[0209] In some non-limiting embodiments, the number of elements of the key matrix having the first value is different from the number of elements of the key matrix having the second value.
[0210] In other non-limiting embodiments, the number of elements of the key matrix having the first value is substantially equal to the number of elements of the key matrix having the second value. As a result, substantially half of the elements of the key matrix K have the first value while substantially the other half of the elements of the key matrix K have the second value. In some embodiments in which the number of elements of the key matrix K is an even number, the number of elements of the key matrix K having the first value is equal to the number of elements of the key matrix K having the second value. In some embodiments in which the number of elements of the key matrix K is an odd number, the number of elements of the key matrix K having the first value is equal to the number of elements of the key matrix K having the second value plus or minus 1.
[0211] In some non-limiting embodiments, each vector along the dimension C of the key matrix K comprises a substantially identical number of elements having the first value and elements having the second value, while the total number of elements having the first value within the key matrix K is substantially identical to the number of elements having the second value within the key matrix K. In some non-limiting embodiments in which a vector comprises an even number of elements, the number of elements of the vector having the first value is equal to the number of elements of the vector having the second value. In some non-limiting embodiments in which a vector comprises an odd number of elements, the number of elements of the vector having the first value is equal to the number of elements of the vector having the second value plus or minus 1. For example, if the key matrix K has a size (H. W. C) , the key matrix comprises H. W channels or vectors Ki, j, k where a respective i and a respective j are fixed for each vector and k varies from 1 to C for each vector, and the size of each vector is equal to C. If C is an even number, then each vector comprises an even number of first value such as “+1” and second value such as -1. If C is an odd number, the number of the elements of the vector having the first value is equal to the number of the elements of the vector having the second value plus or minus 1.
[0212] In some non-limiting embodiments, the key matrix K is randomly generated.
[0213] In some non-limiting embodiments, the elements having the first value and the elements having the second value are randomly distributed within the key matrix K.
[0214] In the same or other non-limiting embodiments, the key matrix K is generated so as to be unique to the received image I, i.e., a same key matrix K cannot be generated for two different or distinct images.
[0215] According to processing step 306, the processing device combines together the received image I and the generated key matrix K to obtain a zero-bit watermarked image I’, i.e. the processing device combines the matrix representing the image and the key matrix K.
[0216] In some non-limiting embodiments, the processing device adds the key matrix K to the received image I to obtain the watermarked image I’, i.e., I’ = I + K.
[0217] In some non-limiting embodiments, the key matrix K is first multiplied by a predefined strength parameter ε before being added to the received image I to obtain the watermarked image I’, i.e., I + ε. K, where ε is a positive integer number greater than 0. In some non-limiting embodiments, the value of each element of the watermarked image I’ is comprised between a predefined minimal value and a predefined maximal value. In this case, if a given element of the watermarked image I’ (after adding ε. K to I) has a value that is less than the minimal value, then the value of this given element is set to the minimal value. Similarly, if a given element of the watermarked image I’ (after adding ε. K to I) has a value that is greater than the maximal value, then the value of this given element is set to the maximal value. Such a scenario may be implemented by using the following clip operator: I′=clip (I+εK)
[0218] where the clip operator is applied to each of matrix elements individually and defined as:
[0219] and where MIN corresponds to the predefined minimal value and MAX corresponds to the predefined maximal value.
[0220] In some non-limiting embodiments in which the channels are 8-bit RGB channels, the predefined minimal value is set to 0 while the predefined maximal value is set to 255. Therefore, the value of each element of the image I’ is then comprised between 0 and 255.
[0221] According to processing step 308, the processing device outputs the zero-bit watermarked image I’. For example, the processing device may store in a memory such as an internal memory or an external memory. In another example, the processing device may transmit the watermarked image I’ to another computing device such as to the computing device that transmitted the image I to be watermarked.
[0222] In some non-limiting embodiments, the method 300 further comprises the step of storing the key matrix K in the database 230.
[0223] In some non-limiting embodiments, the method 300 further comprises the step of extracting features from the received image I to be watermarked and storing both the generated key matrix K and the extracted features into the database 230, the generated key matrix K and the extracted features being associated together and with the received image I. As described in greater detail below, the stored key matrix K and the extracted features are to be used for determining whether an image has been zero-bit watermarked.
[0224] It will be understood that any adequate method for extracting features from an image may be used as long as the extracted features are unique for each image I and optionally provide the capability to undo attacks like cropping or rotating an image.
[0225] In some non-limiting embodiments, scale invariant feature transform (SIFT) is used for extracting the features of the received image I. SIFT provides a set of unique content-based features for the image I and can be used to correct geometric distortions applied to a watermarked image.
[0226] In other non-limiting embodiments, speeded-up robust features (SURF) is used for extracting the features of the received image I. In further non-limiting embodiments, histogram of oriented gradients (HOG) , Binary Robust Independent Elementary Features (BRIEF) , Oriented FAST and Rotated BRIEF (ORB) is used for extracting the features of the received image I.
[0227] In non-limiting embodiments such as embodiments in which the received image I corresponds to a frame of a video, Kanade Lucas Tomasi (KLT) is used for extracting the features of the received image I.
[0228] In some non-limiting embodiments in which the first computing device 210 receives a plurality of images l to the zero-bit watermarked, the processing unit generates a respective zero-bit watermarked image I’ by generating a respective key matrix K for each received image I using the method 300. The first computing device 210 optionally extracts the features of each received image I and stores the extracted features and the generated key matrix key associated with each received image I in the database 230. It should be understood that, for each received image I, only the extracted features and the generated key matrix K are stored in the database 230 and associated together while the original received image I and the zero-bit watermarked image I’ a re not stored into the database 230. For each received image I, only its extracted features and its generated key matrix are stored into the database 230.
[0229] Figures 4A and 4B depict a flowchart of a method 400 for determining whether an image has been zero-bit watermarked using the method 300, in accordance with one or more non-limiting embodiments of the present technology.
[0230] In one or more embodiments, the second computing device 220 comprises a processing device such as the processor 110 and / or the GPU 111 operatively connected to a non-transitory computer readable storage medium such as the solid-state drive 120 and / or the random-access memory 130 storing computer-readable instructions. The processing device upon executing the computer-readable instructions, is configured to or operable to execute the method 400.
[0231] It will be understood that for the execution of the method 400, some images l have been previously watermarked using the method 300 and the key matrices K used for watermarking the images l as well as the features of each image I have been previously stored into the database 230. These watermarked images of which the respective key matrix and features stored in the database 230 are hereinafter referred to as the reference images. The method 400 may then determine whether a received image has been watermarked or not using the method 300.
[0232] The method 400 starts at processing step 402.
[0233] According to processing step 402, the processing device or processor receives a given image I’ for which it has to be determined whether the received image I’ has been watermarked suing the method 300 or not. It should be understood that the image I’ having a given size is defined as a matrix of elements having the given size. Each element of the matrix is defined by a position along each dimension of the matrix and a value is assigned to each element of the matrix.
[0234] According to processing step 404, the processing device extracts features from the received image I’. It will be understood that the same method used for extracting features in method 300 is to be used at step 404 to extract the features of the received image I’ so that features extracted during the execution of the method 300 are comparable to those extracted during the execution of the method 400.
[0235] According to processing step 406, the processing device accesses the database 430 to have access to the features and the key matrix stored therein for reference images that have been watermarked using the method 300. It will be understood that for each reference image, respective features and a respective key matrix is stored on the database 230 so that each reference key matrix is associated with respective features. It will also be understood that the reference watermarked images are not stored in the database 230 and only their reference key matrix and respective features are stored in the database 230.
[0236] According to processing step 408, for at least a given group or subset of the reference features stored in the database 230, i.e., for at least a given group or subset of the reference images, the processing device compares the features extracted from the received image I’ to reference features belonging to the given group to identify matching features, i.e., given reference features that match or correspond to the features extracted from the received image I’.
[0237] In some non-limiting embodiments, if no matching features are found at processing step 408, the processing device determines that the received image I’ is not watermarked. The processing device may output an indication that the received image I’ is not watermarked. For example, the indication may be stored in memory. In the same or another example, the processing device may transmit the indication to the computing device from which the image I’ was received.
[0238] In some non-limiting embodiments, if no matching features are found at processing step 408, the processing device further compares the features extracted from the received image I’ to a second group or subset of reference features contained in the database 230 or the remaining reference features, i.e., all reference features not included in the given group. If no matching features are found, the processing device determines that the received image I’ is not watermarked. The processing device may then output an indication that the received image I’ is not watermarked. For example, the indication may be stored in memory. In the same or another example, the processing device may transmit the indication to the computing device from which the image I’ was received.
[0239] In some non-limiting embodiments, the given group of reference features comprises all reference features stored in the database 230 so that at processing 408, the processing device compares the features extracted from the received image I’ to all of the reference features stored in the database 230.
[0240] In other non-limiting embodiments, the given group of reference features comprises only some of the reference features stored in the database 230.
[0241] It will be understood that any adequate method for determining matching features may be used. For example, methods configured for determining matching key points between the features extracted from the received image I’ and the reference features may be used. In some non-limiting embodiments, Fast Library for Approximate Nearest Neighbors (FLANN) is used at step 408 to identify the matching features. In other non-limiting embodiments, Hierarchical Navigable Small World (HNSW) or Locality Sensitive Hashing (LSH) is used at step 408 to identify the matching features.
[0242] According to processing step 410, the processing device determines a value for an offset parameter based on the matching features. Offset is related to possible crop attacks and the offset parameter is indicative of the probability that the received image I’ has been previously cropped.
[0243] It will be understood that any adequate method for determining an offset parameter from features extracted from an image may be used. In some non-limiting embodiments, any adequate point-matching method may be used. For example, Random Sample Consensus (RANSAC) may be used by the processing device at step 410 to determine the value of the offset parameter based on the matching features. In another example, Triangle Area Representation (TAR) or Restricted Spatial Order Constraints (RSOC) may be used by the processing device at step 410 to determine the value of the offset parameter based on the matching features.
[0244] According to processing step 412, the processing device retrieves the reference key matrix that is associated with the matching features from the database 230. The retrieved key matrix is referred to as the matching key matrix hereinafter. The processing device further modifies the matching key matrix based on the determined value of the offset parameter, thereby obtaining a modified key matrix that is associated with the received image I’. In some non-limiting embodiments, the modified key matrix is obtained by cropping some rows and / or columns of the reference key matrix that is associated with the matching features based on the determined value of the offset parameter. The processing device use the offset parameter to determine which the portions of the original image I were cropped and then replicates this cropping attack on the matching key matrix to obtain the modified key matrix.
[0245] It will be understood that if the determined value for the offset parameter is zero, then the modified key matrix corresponds to the matching key matrix.
[0246] According to processing step 414, the processing device calculates a first watermark parameter S1 based on the received image I’, the modified key matrix and the dimension or size of the modified key matrix. It should be understood that the dimension of the modified key matrix is the same as that of the image received at step 402.
[0247] In some non-limiting embodiments, the first watermark parameter S1 is expressed as follows:
[0248] Where is the modified key matrix, (H’. W’. C’) is the dimension of the modified key matrix I’ is the received image, and corresponds to the summation of the values associated with the elements of the matrix resulting from the element-wise product of the modified key and the received image I’. As mentioned above, if the value of the parameter is zero, then the modified key matrix is replaced with the matching key matrix and the dimension (H’. W’. C’) is replaced with the dimension of the matching key matrix in the calculation of the first watermark parameter S1.
[0249] At processing step 416, the processing device compares the value for the first watermark parameter S1 determined at step 418 to a first threshold τ.
[0250] In some non-limiting embodiments, the threshold τ is determined using the following equation:
[0251] Where (H’. W’. C’) is the dimension of the received image I’, p is a false positive rate and ∑I′2 is the summation of the square values associated with the elements of the received image I’.
[0252] At processing step 418, the processing device 418 determines that the received image I’ has been watermarked using the method 300 if the value of the first watermark parameter S1 is at least equal to the threshold τ, i.e., if the value of the first watermark parameter S1 is equal to the threshold τ or greater than the threshold τ. In this case, the processing device is further configured for outputting an indication that the received image I’ is watermarked. For example, the processing device may store the indication in memory, optionally along with an indication or an identification of the received image I’, the matching features and / or the matching key matrix, such as in the database 230. In the same or another example, the processing device may send the indication to the computing device from which the image I’ has been received.
[0253] If at processing step 418, it determines that the value of the first watermark parameter S1 is less than the threshold τ, the processing device then executes processing step 420.
[0254] At processing step 420, the processing device determines the value of at least one scale parameter. In some non-limiting embodiments, the value of two scale parameters, i.e., the value of a height scale parameter and a width scale parameter, is determined at step 420. The height scale parameter is to be used to resize the height of the received image to the height of the matching key matrix while the width scale parameter is to be used to resize the width of the received image to the width of the matching key. The value of the height scale parameter is determined based on the height of the received image and the height of the matching key matrix while the value of the width scale parameter is determined based on the width of the received image and the width of the matching key matrix. Scales are related to geometric attacks other than cropping and the scale parameter is indicative of the probability that the received image I’ has suffered such a geometric attack.
[0255] In some non-limiting embodiments, the height scale parameter and the width scale parameter are determined as follows:
[0256] Where αh and αw are the height scale parameter and width scale parameter, respectively, H is the height of the matching key, H’ is the height of the received image, W is the width of the matching key, and W’ is the width of the received image.
[0257] At processing step 422, the processing device modifies the received image I’ based on the value of the height and width scale parameters to obtain a modified image The processing device uses the scale parameters to transform the received image I’ back to its original image before the geometrical attack represented by the determined value of the scale parameter. The value of the height scale parameter is used to rescale the height of the received image I’ back to the height of the original image and the value of the width scale parameter is used to rescale the width of the received image I’ back to the width of the original image. It will be understood that any adequate resizing method may be used to obtain a modified image
[0258] It will be understood that if the value of the scale parameter is equal to 1, then the modified image corresponds to the received image I’.
[0259] In some non-limiting embodiments, the processing device uses a nearest-neighbor interpolation method or a bilinear and bicubic interpolation method at step 422 to resize the received image I’ to obtain a modified image
[0260] At processing step 424, the processing device determines the value of a second watermark parameter S2 based on the matching key matrix, i.e. the reference key matrix associated with the matching features, and the dimension (H. W. C) of the original image I which is assumed to be equal to the dimension of the modified image
[0261] In some non-limiting embodiments, the second watermark parameter S2 can be expressed as:
[0262] Where Ki is the matching key, (H. W. C) is the size of the modified image and corresponds to the summation of the values associated with the elements of the matrix resulting from the element-wise product of the key Ki and the modified image
[0263] At processing step 426, the processing device compares the value of the second watermark parameter S2 determined at step 424 to the same threshold τ as the one used at step 416.
[0264] At processing step 428, the processing device 418 determines that the received image I’ has been watermarked using the method 300 if the value of the second watermark parameter S2 is at least equal to the threshold τ, i.e., if the value of the second watermark parameter S2 is equal to the threshold τ or greater than the threshold τ. In this case, the processing device is further configured for outputting an indication that the received image I’ is watermarked. For example, the processing device may store the indication in memory, optionally along with an indication or an identification of the received image I’, the matching features and / or the matching key matrix, such as in the database 230. In the same or another example, the processing device may send the indication to the computing device from which the image I’ has been received.
[0265] If at processing step 428, it determines that the value of the second watermark parameter S2 is less than the threshold τ, the processing device then determines that the received image I’ has not been watermarked using the method 300. In this case, the processing device may further be configured for generating and outputting an indication that the received image I’ is not watermarked. For example, the processing device may store the indication in memory. In the same or another example, the processing device may send the indication to the computing device from which the image I’ was received.
[0266] In some non-limiting embodiments, at processing step 408, the processing device stops comparing the features extracted from the received image I’ to the reference features as soon as matching features are found.
[0267] In other non-limiting embodiments, at processing step 408, the processing device compares the features extracted from the received image I’ to all the features of the given group even if matching features are found. In this case, more than one set of matching features can be found. When more than one set of matching features is identified, the processing device executes steps 410 to 418, and operationally steps 420 to 428 for each set of matching features.
[0268] In some non-limiting embodiment, the method 400 further comprises a step of determining the given group of reference features. In this case, the processing device is further configured for selecting given reference features stored in the database 230 to generate the given group of reference features. It will be understood that any adequate method for generating the given group of reference features may be used.
[0269] In some non-limiting embodiments, the processing device uses Content Based Image Retrieval (CBIR) to determine or identify the given number N of most relevant reference features stored in the database 230 based on the features extracted from the received image I’, i.e., it determines, amongst the refences features stored in the database 230, N sets of reference features which are the closest, the most relevant or the most similar to the features extracted from the received image I’, thereby obtaining the given group of reference features. As described above, the processing device then executes steps 408 to 418, and optionally steps 420 to 428, using only the sets of features considered are being the most relevant ones.
[0270] In some non-limiting embodiments, limiting the execution of steps 408 to 418, and optionally steps 420 to 428 to only a subset or group of reference features reduces the time required for determining whether the received image I’ watermarked or not, especially for large scale databases.
[0271] With reference to Figure 5, there is described a method 500 for extracting a watermark message from an image that has been watermarked using a zero-bit watermark method, in accordance with non-limiting embodiments.
[0272] In one or more embodiments, the first computing device 210 comprises a processing device such as the processor 110 and / or the GPU 111 operatively connected to a non-transitory computer readable storage medium such as the solid-state drive 120 and / or the random-access memory 130 storing computer-readable instructions. The processing device upon executing the computer-readable instructions, is configured to or operable to execute the method 500.
[0273] The method 500 stats at processing step 502.
[0274] According to processing step 502, the processing device receives, via a communication interface, an image I’. The method 500 is used to determine whether the received image I’ has been zero-bit watermarked using a key, and if yes, to retrieve the watermark message associated with the original image.
[0275] It will be understood that prior to the execution of the method 500 some original images have been previously watermarked using a given zero-bit watermark method that generates and embeds a key into the original images. A respective watermark message such as a multi-bit watermark message, metadata, a timestamp, or the like is associated with each original image. For each zero-bit watermarked image, the key used for watermarking its corresponding original image and the watermark message associated with its corresponding original image are stored in the database 230 so that the key and watermark message are associated together and to the original image. However, it will be understood that the original images are not stored into the database 230. The images for which a respective key and a respective watermark message are stored in the database 230 are hereinafter referred to as the reference images.
[0276] In some non-limiting embodiments, such as when the method 300 is used to watermarks the original images, the database 230 further comprises, for each reference image, respective features that were extracted from the original image. In this case, the database 230 comprises, for each reference image, a respective key (or key matrix) used for zero-bit watermarking the reference image (to obtain a zero-bit watermarked image) , a respective watermark message and respective features extracted from the original image.
[0277] According to processing step 504, the processing device accesses the database 230 which contains a respective key, a respective watermark message, and optionally respective features, for each one of the reference images.
[0278] According to processing step 506, the processing device determines that the received image I’ has been zero-bit watermarked and identifies, amongst at least a group of reference keys stored in the database 230, a given reference key that was used to zero-bit watermark an original image to obtain the received image I’, thereby identifying a matching key.
[0279] It will be understood that the method for determining whether an image has been zero-bit watermarked using a key based on a set of reference keys previously used for watermarking different images is known in the art. When a given reference key stored in the database 230 allows for determining that the received image I’ has been zero-bit watermarked, then the given reference key is identified as being the matching key.
[0280] For example, a zero-bit self supervised learning (SSL) watermarking method may be used for generating a key and identifying whether an image has been zero-bit watermarked. In this case, the keys used for watermarking images may be chosen from a set of orthonormal vectors.
[0281] In another example, ZoDiac may be used for generating a key and identifying whether an image has been zero-bit watermarked. In this case, the latent space of a pre-trained model is used to inject a watermark. The keys generated by the ZoDiac method may be randomly sampled from a complex Gaussian distribution.
[0282] In some non-limiting embodiments in which the method 300 was used to zero-bit watermarked images, the matching key corresponds to the key matrix stored in the database 230 of which the associated features correspond to the matching features for which the first watermark parameter S1 or the second watermark parameter S2 was found to be at least equal to the threshold τ.
[0283] According to processing step 508, the processing device retrieves from the database 230, the watermark message that is associated with the matching key.
[0284] According to processing step 510, the processing device outputs the retrieved watermark message. For example, the retrieved watermark message may be stored in memory. In the same or another example, the processing device may transmit the retrieved watermark message to another computing device, such as the computing device from which the image I’ was received.
[0285] It will be understood that if no matching key is found, the processing device determines that the received image I’ is not watermarked. The processing device may output an indication that the received image I’ is not watermarked. For example, the indication may be stored in memory. In the same or another example, the processing device may transmit the indication to the computing device from which the image I’ was received.
[0286] In some non-limiting embodiments, the group of reference keys comprises all of the reference keys stored in the database 230.
[0287] In some other non-limiting embodiments, the group of reference keys comprises only some of the reference keys stored in the database 230. In this case, the processing device may further be configured for identifying the reference keys that belong to the group of reference keys. In some non-limiting embodiments in which reference features are stored in the database 230 for each reference image, the method 500 further comprises a step of determining the group of reference features. In this case, the processing device is further configured for selecting given reference features stored in the database 230 to generate the group of reference features. It will be understood that any adequate method for generating the given group of reference features may be used.
[0288] In some non-limiting embodiments, the processing device is further configured for extracting features from the received image I’ and uses CBIR to determine or identify a given number N of most relevant reference features stored in the database 230 based on the features extracted from the received image I’, i.e., it determines, amongst the refences features stored in the database 230, N sets of reference features which are the closest, the most relevant or the most similar to the features extracted from the received image I’, thereby obtaining the group of reference features. The group of reference keys then includes all reference keys which are associated with the reference features contained in the identified group of reference features. It will be understood that any adequate method other than CIBR may be used.
[0289] In the following and with reference to Figures 6 and 7, there is described, respectively, a method 600 for watermarking an image using a given multi-bit watermarking method and a method 700 for extracting a watermark message from an image that has been watermarked using the method 600, in accordance with non-limiting embodiments. In some non-limiting embodiments, the method 600 can embed into images watermark messages having substantially any length while using a multi-bit watermark method which can only embed watermark messages having a maximum length. In other words, even if the used multi-bit watermark method cannot embed into images watermark messages having a length longer or greater than the maximum length, the method 600 can embed watermark messages being greater or longer than the maximum length and the method 700 can extract such watermark messages.
[0290] In one or more embodiments, the first computing device 210 comprises a processing device such as the processor 110 and / or the GPU 111 operatively connected to a non-transitory computer readable storage medium such as the solid-state drive 120 and / or the random-access memory 130 storing computer-readable instructions. The processing device upon executing the computer-readable instructions, is configured to or operable to execute the method 600.
[0291] The method 600 stats at processing step 602.
[0292] According to processing step 602, the processing device receives, via a communication interface, an image I to be watermarked and a corresponding watermark message. In some non-limiting embodiments, the length of the watermark message associated with the received image I to be watermarked can have substantially any length.
[0293] According to processing step 604, the processing device generates a hash from the watermark message associated with the received image I. It will be understood that any adequate method configured for generating a hash may be used. For example, Secure Hash Algorithms (SHA) may be used for generating the hash at step 604. In another example, BLAKE may be used for generating the hash at step 604.
[0294] According to processing step 606, the received image I is watermarked using the hash generated at step 604 and a multi-bit watermark method, i.e., the hash is embedded into the image I using the multi-bit watermark method, thereby obtaining a watermarked image. It will be understood that any adequate multi-bit watermark method configured for embedding a hash into an image may be used at step 606. For example, SSL can be used for embedding the hash generated at step 604 into the received image I. In another example, Robust Steganography using Autoencoder Latent Space (RoSteALS) can be used for embedding the hash generated at step 604 into the received image I. In a further example, ARWGAN can be used for embedding the hash generated at step 604 into the received image.
[0295] It will be understood that if the multi-bit watermark method presents a limit on the length of messages it can embed into images (i.e., the multi-bit watermark method can only embed messages having a length at most equal to a maximum length) , the length of the hash is chosen to be at most equal to the maximum length, i.e., equal to the maximum length or less than the maximum length.
[0296] At processing step 608, the processing device stores the watermark message associated with the received image I and its corresponding hash in the database 230. It will be understood that the watermark message and the hash are then associated together and also associated with the image I. It will also be understood that the original image I is not stored into the database 230.
[0297] At processing step 610, the processing device outputs the watermarked image. For example, the watermarked image message may be stored in memory. In the same or another example, the processing device may transmit the watermarked image to another computing device, such as the computing device from which the image I was received.
[0298] In some non-limiting embodiments, the method 600 further comprises a step of extracting features from the received image I. The extracted features are then stored in the database 230 along with the hash and the watermark message.
[0299] It will be understood that the method 600 may be repeated for watermarking different images each associated with a respective watermark message. For each image, the processing device stores in the database 230 the hash generated from the watermark message, the watermark message, and optionally the features extracted from the image. As a result, the database 230 comprises a plurality of entries each being associated with a respective image that has been watermarked, i.e. a respective reference image. Each entry comprises a watermark message, a hash, and optionally features.
[0300] Figure 7 depicts a flowchart of a method 700 for extracting a watermark message from an image, in accordance with one or more non-limiting embodiments of the present technology. The method 700 is used to determine whether an image has been watermarked using the method 600, and if yes, extract the watermark message associated with the original image.
[0301] In one or more embodiments, the server (e.g. computing device 220) comprises a processing device such as the processor 110 and / or the GPU 111 operatively connected to a non-transitory computer readable storage medium such as the solid-state drive 120 and / or the random-access memory 130 storing computer-readable instructions. The processing device, upon executing the computer-readable instructions, is configured to or operable to execute the method 700.
[0302] The method 700 begins at processing step 702.
[0303] According to processing step 702, the processing device receives, via a communication interface, an image I’ for which it is to be determined whether it has been watermarked using the method 600, and if yes, for which an associated watermark message is to be extracted / retrieved.
[0304] According to processing step 704, the processing device extracts a hash from the received image I’. It will be understood that the method used for extracting the hash from the received image I’ at step 704 is chosen according to the method that was used for embedding hashes into images at step 606. For example, ARWGAN may be used for extracting the hash from the received image I’. In another example, RoSteALS may be used for extracting the hash from the received image I’. In a further example, SSL can be used for extracting the hash from the received image I’.
[0305] According to processing step 706, the processing device accesses the database 230 in which a respective watermark message and a respective hash have been stored for a plurality of reference images.
[0306] According to processing step 708, the processing device compares the hash extracted from the received image I’ to at least a group of references hashes, i.e., at least a group of the hashes stored into the database 230.
[0307] According to processing step 710, the processing device identifies, amongst the group of reference hashes, a given reference hash that matches or corresponds to the hash extracted from the received image I’, thereby obtaining a matching hash. It will be understood that if a matching hash is found in the database 230, then the received image I’ is considered as being watermarked. More precisely, the received image I’ is considered to have been watermarked using the method 600. The processing device may then output an indication that the received image I’ is watermarked.
[0308] According to processing step 712, the processing device retrieves from the database 230 the reference watermark message associated with the matching hash, and outputs the retrieved watermark message. For example, the retrieved watermark message may be stored in memory. In the same or another example, the processing device may transmit the retrieved watermark message to another computing device, such as the computing device from which the image I’ was received.
[0309] It will be understood that if no matching hash is found, the processing device determines that the received image I’ is not watermarked, or at least not watermarked using the method 600. The processing device may output an indication that the received image I’ is not watermarked. For example, the indication may be stored in memory. In the same or another example, the processing device may transmit the indication to the computing device from which the image I’ was received.
[0310] In some non-limiting embodiments, the group of reference hashes comprises all of the reference hashes stored in the database 230.
[0311] In some other non-limiting embodiments, the group of reference hashes comprises only some of the reference hashes stored in the database 230. In this case, the processing device may further be configured for identifying the reference hashes that belong to the group of reference hashes. In some non-limiting embodiments in which reference features are stored in the database 230 for each reference image, the method 500 further comprises a step of selecting given reference hashes stored in the database 230 to generate the group of reference hashes. It will be understood that any adequate method for generating the group of reference hashes may be used.
[0312] In some non-limiting embodiments, the processing device is further configured for extracting features from the received image I’ and uses CBIR to determine or identify a given number N of most relevant reference features stored in the database 230 based on the features extracted from the received image I’, i.e., it determines, amongst the refences features stored in the database 230, N sets of reference features which are the closest, the most relevant or the most similar to the features extracted from the received image I’, thereby obtaining a group of reference features. The group of reference hashes then includes all reference hashes which are associated with the reference features contained in the identified group of reference features. It will be understood that any adequate method other than CIBR may be used.
[0313] While in the above description, the methods and systems are described with reference to image watermarking, it will be understood that the methods and system can be applied to videos. In this case, an image may be seen as a frame of a video. In some non-limiting embodiments of the present technology, the above-described methods can be applied to only a subset of the frames contained in a video, such as to one out of every 10 frames. For example, only the frames that belong to the subset of frames of a video to be watermarked may be watermarked, and the watermarked frames and the unwatermarked frames are subsequently concatenated (following the order in the original video) to form the watermarked video. Also, only the frames of a received video that belong to a subset of frames may be analyzed to determine whether the received video is watermarked. In another example, while only some frames of a video to be watermarked have been watermarked, all the frames of a received video may be analysed to determine whether the video has been watermarked. In some non-limiting embodiments, a video is considered to be watermarked if a watermark is detected in a single frame of the video. In other non-limiting embodiments, a video is considered to be watermarked if a watermark is detected in at least a given number of frames. For example, in the case of zero-bit watermarking, a video is considered to be watermarked if a watermark is detected in at least a given number of frames, e.g., in at least three frames. For example, in the case of multi-bit watermarking, a video is considered to be watermarked if a same watermark message is extracted at least a given number of frames, e.g., if the same watermark message is extracted from at least three frames.
[0314] It should be apparent to those skilled in the art that at least some embodiments of the present technology aim to expand a range of technical solutions for addressing a particular technical problem, namely watermarking an image, detecting a watermark in an image and / or extracting or decoding a watermark message from an image, which may reduce storage requirements, improve the extraction speed, prevent or reduce distortion in watermarked images, and / or maintain robustness with increasing length watermark messages.
[0315] It should be expressly understood that not all technical effects mentioned herein need to be enjoyed in each and every implementation of the present technology. For example, embodiments of the present technology may be implemented without the user enjoying some of these technical effects, while other non-limiting embodiments may be implemented with the user enjoying other technical effects or none at all.
[0316] Some of these steps and signal sending-receiving are well known in the art and, as such, have been omitted in certain portions of this description for the sake of simplicity. The signals can be sent-received using optical means (such as a fiber-optic connection) , electronic means (such as using wired or wireless connection) , and mechanical means (such as pressure-based, temperature-based or any other suitable physical parameter based) .
[0317] Modifications and improvements to the above-described embodiments of the present technology may become apparent to those skilled in the art. The foregoing description is intended to be exemplary rather than limiting.
Claims
1.A method for zero-bit watermarking an image, the method being executed by a processor, the method comprising:receiving an image to be watermarked, the received image having a given size defined by at least a height, a width and a number of image channels;generating a key matrix comprising matrix elements and having the given size, a first set of the matrix elements each having a first value and a second set of the matrix elements each having a second value opposite to the first value;generating a watermarked image by combining the key matrix with the received image.2.The method of claim 1, wherein the image channels are color channels and the first value and the second value each correspond to a variation of a color value.3.The method of claim 1 or 2, wherein, when a total number of the matrix elements is an even number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements.4.The method of claim 1 or 2, wherein, when a total number of the matrix elements is an odd number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements minus one or to the number of the second set of the matrix elements plus one.5.The method of any one of claims 1 to 4, wherein the first value is +1 and the second value is -1.6.The method of any one of claims 1 to 5, wherein said generating a key matrix comprises randomly generating the key matrix, the first set of the matrix elements and the second set of the matrix elements being randomly distributed in the key matrix.7.The method of any one of claims 1 to 6, wherein the key matrix is unique.8.The method of any one of claims 1 to 7, wherein said generating the watermarked image comprises:obtaining a modified matrix by multiplying the key matrix by a strength factor, the strength factor being an integer number greater than zero; andadding the modified matrix to the received image to generate the watermarked image, the watermarked image comprising image elements.9.The method of claim 8, further comprising if a given one of the image elements has a value being greater than a maximum threshold, setting the value of the given one of the image elements to the maximum threshold.10.The method of claim 8 or 9, further comprising if a given one of the image elements has a value being less than a minimum threshold, setting the value of the given one of the image elements to the minimum threshold.11.A system for zero-bit watermarking an image, the system comprising:a processor;a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions;the processor, upon executing the instructions, being configured for:receiving an image to be watermarked, the received image having a given size defined by at least a height, a width and a number of image channels;generating a key matrix comprising matrix elements and having the given size, a first set of the matrix elements having a first value and a first set of the matrix elements having a second value opposite to the first value; andgenerating a watermarked image by combining the key matrix with the received image.12.The system of claim 11, wherein the image channels are color channels and the first value and the second value each correspond to a variation of a color value.13.The system of claim 11 or 12, wherein, when a total number of the matrix elements is an even number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements.14.The system of claim 11 or 12, wherein, when a total number of the matrix elements is an odd number, a number of the first set of the matrix elements is equal to a number of the second set of the matrix elements minus one or to the number of the second set of the matrix elements plus one.15.The system of any one of claims 11 to 14, wherein the first value is +1 and the second value is -1.16.The system of any one of claims 11 to 15, wherein the processor is configured for randomly generating the key matrix, the first set of the matrix elements and the second set of the matrix elements being randomly distributed in the key matrix.17.The system of any one of claims 11 to 16, wherein the key matrix is unique.18.The system of any one of claims 11 to 17, wherein the processor is configured for:obtaining a modified matrix by multiplying the key matrix by a strength factor, the strength factor being an integer number greater than zero; andadding the modified matrix to the received image to generate the watermarked image, the watermarked image comprising image elements.19.The system of claim 18, wherein the processor is further configured for, if a given one of the image elements has a value being greater than a maximum threshold, setting the value of the given one of the image elements to the maximum threshold.20.The system of claim 18 or 19, wherein the processor is further configured for, if a given one of the image elements has a value being less than a minimum threshold, setting the value of the given one of the image elements to the minimum threshold.21.A method for determining whether an image has been watermarked using the method of claim 1, the method being executed by a processor, the method comprising:receiving a given image;extracting image features from the given image;accessing a database comprising respective reference features and a respective reference key matrix for each one of reference images;for at least a group of the reference features:determining matching features between the reference features and the image features;determining a value for an offset parameter based on the matching features;generating a modified key matrix by modifying the reference key matrix associated with the matching features based on the value of the offset parameter;calculating a first watermark parameter based on the modified key matrix, the given image and a size of the given image;comparing the first watermark parameter to a threshold; andindicating that the given image is watermarked when the first watermark parameter is at least equal to the threshold.22.The method of claim 21, wherein the first watermark parameter is obtained using: where H′. W′. C′ is the size of the given image, is the modified key matrix and I’ is the given image.23.The method of claim 22, wherein the threshold is obtained using: where p is a false positive rate.24.The method of any one of claims 21 to 23, further comprising for at least the group of reference images, when the first watermark parameter is less than the first predefined threshold:determining a value for a height scale parameter based on a height of the received image and a height of the reference key matrix;determining a value for a width scale parameter based on a width of the received image and a width of the reference key matrix;generating a modified image by modifying the given image based on the value for the value for the height scale parameter and the value for the width scale parameter;calculating a second watermark parameter based on the reference key matrix, the modified image and a size of the reference key matrix;comparing the second watermark parameter to the threshold; andindicating that the given image is watermarked when the second watermark parameter is at least equal to the threshold.25.The method of claim 24, wherein the second watermark parameter is obtained using: where H. W. C is the size of the reference key, Ki is the reference key matrix andis the modified image.26.The method of claim 24 or 25, wherein the height scale parameter and the width scale parameter are respectively obtained using: where αh is the height scale parameter, αw is the width scale parameter, respectively, H is a height of the reference key matrix, H’ is a height of the received image, W is a width of the reference key matrix, and W’ is a width of the received image.27.The method of any one of claims 21 to 26, wherein the group of reference images comprises all of the reference images.28.The method of any one of claims 21 to 26, wherein the group of reference features is obtained by determining, amongst the reference features, a given number of nearest neighbors based on the image features.29.The method of claim 28, wherein Content Based Image Retrieval (CBIR) is used for determining the nearest neighbors.30.The method of any one of claims 21 to 29, wherein one of Triangle Area Representation (TAR) , Restricted Spatial Order Constraints (RSOC) and Random Sample Consensus (RANSAC) is used for determining the value for the offset parameter based on the matching features.31.A system for determining whether an image has been watermarked using the method of claim 1, the system comprising:a processor;a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions;the processor, upon executing the instructions, being configured for:receiving a given image;extracting image features from the given image;accessing a database comprising respective reference features and a respective reference key matrix for each one of reference images;for at least a group of the reference features:determining matching features between the reference features and the image features;determining a value for an offset parameter based on the matching features;generating a modified key matrix by modifying the reference key matrix associated with the matching features based on the value of the offset parameter;calculating a first watermark parameter based on the modified key matrix, the given image and a size of the given image;comparing the first watermark parameter to a threshold; andindicating that the given image is watermarked when the first watermark parameter is at least equal to the threshold.32.The system of claim 31, wherein the first watermark parameter is obtained using: where H′. W′. C′ is the size of the given image, is the modified key matrix and I’ is the given image.33.The system of claim 32, wherein the threshold is obtained using: where p is a false positive rate.34.The system of any one of claims 31 to 33, wherein the processor is further configured for, for at least the group of reference images, when the first watermark parameter is less than the first predefined threshold:determining a value for a height scale parameter based on a height of the received image and a height of the reference key matrix;determining a value for a width scale parameter based on a width of the received image and a width of the reference key matrix;generating a modified image by modifying the given image based on the value for the value for the height scale parameter and the value for the width scale parameter;calculating a second watermark parameter based on the reference key matrix, the modified image and a size of the reference key matrix;comparing the second watermark parameter to the threshold; andindicating that the given image is watermarked when the second watermark parameter is at least equal to the threshold.35.The system of claim 34, wherein the second watermark parameter is obtained using: where H. W. C is the size of the reference key, Ki is the reference key matrix andis the modified image.36.The system of claim 24 or 25, wherein the height scale parameter and the width scale parameter are respectively obtained using: where αh is the height scale parameter, αw is the width scale parameter, respectively, H is a height of the reference key matrix, H’ is a height of the received image, W is a width of the reference key matrix, and W’ is a width of the received image.37.The system of any one of claims 31 to 36, wherein the group of reference images comprises all of the reference images.38.The system of any one of claims 31 to 36, wherein the processor is configured for determining, amongst the reference features, a given number of nearest neighbors based on the image features, thereby obtaining the group of reference features.39.The system of claim 38, wherein the processor is configured for using Content Based Image Retrieval (CBIR) to identify the nearest neighbors.40.The system of any one of claims 31 to 39, wherein the processor is configured for using one of Triangle Area Representation (TAR) , Restricted Spatial Order Constraints (RSOC) and Random Sample Consensus (RANSAC) to determine the value for the offset parameter based on the matching features.41.A method for extracting a watermark message from an image, the method being executed by a processor, the method comprising:receiving a given image;accessing a database containing reference keys and watermark messages, each being associated with a respective reference image, each one of the reference keys having been previously used to zero-bit watermark the respective reference image;identifying, amongst least a group of the reference keys, a given one of the reference keys that was used to zero-bit watermark the given image;retrieving a given one of the reference watermark messages that is associated with the given one of the reference keys; andproviding the given one of the reference watermark messages.42.The method of claim 41, wherein the database further comprises reference features each associated with the respective reference image.43.The method of claim 42, further comprising:extracting image features from the received given image; anddetermining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference keys corresponding to given ones of the reference keys that are associated with the nearest neighbor features.44.The method of claim 43, wherein said determining the nearest neighbor features is performed using Content Based Image Retrieval (CBIR) .45.The method of claim 41, wherein the group of the reference keys comprises all the reference keys.46.The method of any one of claims 41 to 45, wherein each one of the reference keys comprises a key matrix, the key matrix comprising matrix elements and having a given size equal to a size of the respective reference image, first ones of the matrix elements having a first value and second ones of the matrix elements having a second value opposite to the first value.47.The method of claim 46, wherein a number of the first ones of the matrix elements being substantially equal to a number of the second ones of the matrix elements.48.The method of claim 46 or 47, wherein the first value is +1 and the second value is -1.49.The method of any one of claims 41 to 45, wherein each one of the reference keys is generated using a zero-bit self supervised learning (SSL) watermarking method and said identifying the given one of the reference keys is performed using the zero-bit SSL watermarking method.50.The method of any one of claims 41 to 45, wherein each one of the reference keys is generated using ZoDiac and said identifying the given one of the reference keys is performed using ZoDiac.51.A system for extracting a watermark message from an image, the system comprising:a processor;a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions;the processor, upon executing the instructions, being configured for:receiving a given image;accessing a database containing reference keys and watermark messages, each being associated with a respective reference image, each one of the reference keys having been previously used to zero-bit watermark the respective reference image;identifying, amongst least a group of the reference keys, a given one of the reference keys that was used to zero-bit watermark the given image;retrieving a given one of the reference watermark messages that is associated with the given one of the reference keys; andproviding the given one of the reference watermark messages.52.The system of claim 51, wherein the database further comprises reference features each associated with the respective reference image.53.The system of claim 52, wherein the processor is further configured for:extracting image features from the received given image; anddetermining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference keys corresponding to given ones of the reference keys that are associated with the nearest neighbor features.54.The system of claim 53, wherein the processor is configured for determining the nearest neighbor features using Content Based Image Retrieval (CBIR) .55.The system of claim 51, wherein the group of the reference keys comprises all the reference keys.56.The system of any one of claims 51 to 55, wherein each one of the reference keys comprises a key matrix, the key matrix comprising matrix elements and having a given size equal to a size of the respective reference image, first ones of the matrix elements having a first value and second ones of the matrix elements having a second value opposite to the first value.57.The system of claim 56, wherein a number of the first ones of the matrix elements being substantially equal to a number of the second ones of the matrix elements.58.The system of claim 56 or 57, wherein the first value is +1 and the second value is -1.59.The system of any one of claims 51 to 55, wherein each one of the reference keys is generated using a zero-bit self supervised learning (SSL) watermarking method and wherein the processor is configured for identifying the given one of the reference keys is performed using the zero-bit SSL watermarking method.60.The system of any one of claims 51 to 55, wherein each one of the reference keys is generated using ZoDiac and wherein the processor is configured for identifying the given one of the reference keys is performed using ZoDiac.61.A method for extracting a watermark message from an image, the method being executed by a processor, the method comprising:receiving a given image;extracting an image hash from the given image;accessing a database containing reference hashes and reference watermark messages, each being associated with a respective reference image;for at least a group of the reference hashes, comparing the image hash to the reference hash;identifying a match between the image hash and a given one of the reference hashes to obtain a matching hash;retrieving a given one of the reference watermark messages associated with the matching hash; andoutputting the given one of the reference watermark messages.62.The method of claim 61, wherein the database further comprises reference features each associated with the respective reference image.63.The method of claim 62, further comprising:extracting image features from the received given image; anddetermining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference hashes corresponding to given ones of the reference hashes that are associated with the nearest neighbor features.64.The method of claim 63, wherein said determining the nearest neighbor features is performed using Content Based Image Retrieval (CBIR) .65.The method of claim 61, wherein the group of the reference hashes comprises all the reference keys.66.The method of any one of claims 61 to 65, wherein each one of the reference hashes is generated using one of Secure Hash Algorithms (SHA) and BLAKE.67.The method of any one of claims 61 to 65, wherein each one of the reference hashes is embedded in the respective reference image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.68.The method of any one of claims 61 to 65, wherein said extracting the image hash from the given image is performed using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.69.A system for extracting a watermark message from an image, the system comprising:a processor;a non-transitory storage medium operatively connected to the processor, the non-transitory storage medium comprising computer-readable instructions;the processor, upon executing the instructions, being configured for:receiving a given image;extracting an image hash from the given image;accessing a database containing reference hashes and reference watermark messages, each being associated with a respective reference image;for at least a group of the reference hashes, comparing the image hash to the reference hash;identifying a match between the image hash and a given one of the reference hashes to obtain a matching hash;retrieving a given one of the reference watermark messages associated with the matching hash; andoutputting the given one of the reference watermark messages.70.The system of claim 69, wherein the database further comprises reference features each associated with the respective reference image.71.The system of claim 70, wherein the processor is further configured for:extracting image features from the received given image; anddetermining, amongst the reference features, nearest neighbor features based on the image features, the group of the reference hashes corresponding to given ones of the reference hashes that are associated with the nearest neighbor features.72.The system of claim 71, wherein the processor is further configured for determining the nearest neighbor features using Content Based Image Retrieval (CBIR) .73.The system of claim 69, wherein the group of the reference hashes comprises all the reference keys.74.The system of any one of claims 69 to 73, wherein each one of the reference hashes is generated using one of Secure Hash Algorithms (SHA) and BLAKE.75.The system of any one of claims 69 to 73, wherein each one of the reference hashes is embedded in the respective reference image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.76.The system of any one of claims 69 to 73, wherein the processor is further configured for extracting the image hash from the given image using one of a self supervised learning (SSL) watermarking method, Robust Steganography using Autoencoder Latent Space (RoSteALS) and ARWGAN.
Citation Information
Patent Citations
Image zero-watermark embedding and extraction method based on proper fraction fourier transform
CN104331856A
Image encryption method and apparatus uniting zero watermark embedding
CN107770407A
Medical image zero-watermark embedding method based on NSCT combined transformation
CN110517182A
Protecting deep learning models using watermarking
US20190370440A1
Improved image watermarking
US20220092721A1