This application claims the benefit of Indian Patent Application Filing No. 4299/CHE/2013, filed Sep. 23, 2013, which is hereby incorporated by reference in its entirety.
This technology generally relates to the field of watermarking technology and more particularly to a technique for embedding and extracting a watermark in a text document.
The advancement in technology especially innovations related to information dissemination and connectivity has led to the development of portable and web enabled devices. However, these advancements have increased the Intellectual Property Rights (IPR) violations. To distribute the digital document securely and protect the text document from IPR violations, watermarking of text documents is gaining interest. Watermarking has emerged as an eminent solution for the protection of digital media (text documents, videos, audio, and images). However, watermarking in text documents is very different than other digital media since text documents lack rich gray scale or color texture information which is abundantly available in digital images and videos.
Generally, text watermarking methods used are Character Feature method, Open Space method, Zero Watermarking method, Content Watermarking method, Syntax Watermarking method, and the like. In Character Feature method, features of characters such as shape, size, or position are manipulated. In Open space method the watermark is embedded by modulating either the inter-line distance or inter-word space or inter-character space. In Zero Watermarking method, instead of embedding a watermark inside the text document, watermark is generated using the features of the text document. In Content Watermarking method, words are replaced by their synonyms or sentences are transformed via suppression or inclusion of noun phrases. In Syntax Watermarking method, marking is achieved by changing the structure of the sentences. There are other watermarking methods wherein the watermark is embedded visually as an image. Majority of these methods carry very less amount of information which limits their applicability to document authentication, copyright protection, and tamper proofing. Additionally, some of these methods utilize the specific characteristics of a particular language which makes their application into other language documents very difficult. Thirdly, syntax and semantic methods are based on substitution. Sometimes substitution may change the meaning of the sentence. Hence, every watermarked document needs to be manually inspected. This is a tedious process and makes the method practically infeasible.
Watermarking of text documents is a less matured area in comparison to digital images and videos. Significant amount of work has been done for digital images and videos ranging from copyright protection to traitor tracing. Since text documents lacks rich gray scale or color texture information, watermarking in text documents is very different than other digital media.
Though techniques might exist to cater the problem of watermarking the text document, the existing techniques do not leverages application of digital image and video watermarking methods in a text documents.
Therefore, there is a general need to implement a technique which utilizes any digital image or video watermarking method to watermark text documents.
Accordingly, the present disclosure is directed to a system, a non-transitory computer readable medium and a method for embedding a watermark in a text document, comprising receiving a watermark and the text document containing one or more pages and transforming the pages of the text document into corresponding images. The margins on each image are detected and cropped to generate cropped image. The cropped image is segmented into plurality of blocks. One or more blocks are selected from the plurality of blocks using selection protocols and the watermark is embedded in each of the selected block. The watermark embedded blocks are superimposed onto the corresponding blocks of one or more images and these images are converted into pages of the text document with watermark embedded.
In one embodiment, the margins are detected by applying the discrete differentiation operator over the images and computing a distance of a first white pixel from the sides of the images. Further, the cropped images are generated by cropping the one or more images from the sides based on the computed distance of the first white pixel from the sides of the images. In another embodiment, one or more blocks are selected from the plurality of blocks by applying a discrete cosine transform (DCT) on each of the plurality of blocks to compute a DCT co-efficient of the block and classifying the plurality of blocks into texture blocks or non-texture blocks using the DCT co-efficient. The blocks are classified by comparing the DCT co-efficient of each of the one or more block with content thresholds. In yet another embodiment, the watermarking process is either an image or a video watermarking process.
Further, another example of this technology is directed to a system, a computer program product and a method for extracting a watermark from a watermarked text document, comprising receiving the watermarked text document comprising of one or more pages and block information, wherein the block information comprises segmentation process details such as block size, an original cropped image size, and content thresholds. The pages are converted into the corresponding images. The margins on each image are detected and cropped to generate cropped image. The cropped images are resized based on the received original cropped image size. Then, the cropped image is segmented into plurality of blocks based on the segmentation process details. One or more blocks are selected from the plurality of blocks based on the content thresholds and the watermark is extracted from the selected blocks. In one embodiment, resizing of the one or more cropped images is based on an interpolation process. However, other resizing methods can be used.
Further, in another example of this technology, the margins are detected by applying the discrete differentiation operator over the images and computing a distance of a first white pixel from the sides of the images. Further, the cropped images are generated by cropping the one or more images from the sides based on the computed distance of the first white pixel from the sides of the image. In another embodiment, one or more blocks are selected from the plurality of blocks by applying a Discrete Cosine Transform (DCT) on each of the plurality of blocks to compute a DCT co-efficient of the block and classifying the plurality of blocks into texture blocks or non-texture blocks using the DCT co-efficient. The blocks are classified by comparing the DCT co-efficient of each of the one or more blocks with content thresholds. In yet another embodiment, the watermarking process is either an image or a video watermarking process.
The following description is the full and informative description of the best method and system presently contemplated for carrying out the present invention which is known to the inventors at the time of filing the patent application. Of course, many modifications and adaptations will be apparent to those skilled in the relevant arts in view of the following description in view of the accompanying drawings. While the invention described herein is provided with a certain degree of specificity, the present technique may be implemented with either greater or lesser specificity, depending on the needs of the user. Further, some of the features of the present technique may be used to get an advantage without the corresponding use of other features described in the following paragraphs. As such, the present description should be considered as merely illustrative of the principles of the present technique and not in limitation thereof.
At step 120, the pages of the text document are transformed into image format such as TIFF, GIF, JPEG, and the like. For the purpose of illustration, the text document is converted into images/such that each page represents one image and dimension of each page is N×M. As appreciated by a person skilled in the art, the conversion of the text document into image format can be performed using any known technique or tool.
Typically, pages of text document contain margins. As used herein “margins” refers to blank space at the top, bottom, and sides of the page that frames the body of written, typed, or printed matter (which include text or graphics or the combination thereof). At step 130, the margins of each page of the text document are detected. As shown in
At step 150, the cropped image C is segmented into different blocks. Let's say the cropped image C is divided into b blocks of dimension b1×b2. At step 160, one or more blocks are selected from b blocks. For selecting the blocks, a discrete cosine transform (DCT) is applied on each of the blocks to compute a DCT co-efficient of each block. Let us represent the transformed block as bdct. Then, at step 160, the blocks are classified into texture blocks or non-texture blocks based on the value of DCT co-efficient of each block as explained below.
A block is considered as a non-texture block if:
bdct(0, 0)>T1, wherein bdct represent the transformed block after applying DCT on a block.
Texture block can be either completely text or completely graphics or partial text or partial graphics and partial text. Texture blocks are classified as:
T1, T2, T3, T4, and T5 are the content thresholds used to classify the blocks. The DCT co-efficient of each block is compared with content thresholds. Different types of block based on the content are illustrated and explained with respect to
At step 170, the watermark is embedded in the selected texture blocks. The watermark can be embedded using any image or video watermarking algorithm in blocks which are classified as texture blocks. The reason of embedding the watermark in texture block is due to imperceptibility of the watermark. Embedding the watermark in non-texture blocks has chances of being either perceptible or lost. For instance, completely white block, a non-texture block, has pixels having value 255. If we add watermark to such non-texture block using an image or video watermarking algorithm, the value of the pixels in that block will increase i.e. >255. Since pixels in a block can have a value between 0 and 255, the value will be truncated to 255 leading to automatic removal of watermark. The watermarked texture blocks are superimposed onto the corresponding blocks of the image to get watermarked image and then, watermarked image is converted back into the text document to get watermarked text document.
A block is considered a non-texture block if:
bdct(0,0)>T1, wherein bdct represent the transformed block after applying DCT on a block.
Texture block can be either completely text or completely graphics or partial text or partial graphics and partial text. Texture blocks are classified as:
The threshold value of T1, T2, T3, T4, and T5 may be predefined and provided manually or can be adaptive and computed automatically. Based on the above classification, blocks with partial text 330, complete text 320, partial text and partial graphics 340, and complete graphics may be classified as texture blocks and block with minimal or no text 310 may be classified as non-texture block. As appreciated by an ordinary person skilled in the art, the classification of blocks as texture block and non-texture may differ with content thresholds. In one embodiment, the partial text block 330 may be classified as non-texture block.
At step 430, the margins on the images are detected by applying discrete differentiation operator as explained in detail in
At step 450, the cropped images are resized based on the received original cropped image size. Since the dimensions of cropped page image C′ (during watermark extraction process) and cropped page image C (during watermark embedding process) might be different which may affect the position of blocks and hence, C′ is resized to C. Resizing of the cropped images may be based on the interpolation process or any other known resizing method.
At step 460, the cropped page image C′ is segmented in b′ block of dimension b1×b2 based on the received segmentation process details. At step 470, the blocks are selected from b′ blocks based on the received content thresholds using the same approach as used in watermark embedding process, explained in
Watermark processing unit 540 transform the pages of the text document into image format such as TIFF, GIF, JPEG, and the like. Further the watermark processing unit 540, detects the margins in each transformed page image and crop the margins to generate the cropped page image C. The method of cropping the margins from the image is explained in detail in
Watermark processing unit 540, further superimposes the watermarked texture blocks onto the corresponding blocks in images to obtain watermarked images and the watermarked images are then converted back into the text document to obtain watermarked text document. The watermarked text document embedded with the watermark is provided as output by output unit 560.
Watermark processing unit 640 converts the pages of the text document into the corresponding images. The watermark processing units 640 detects the margins in each transformed page image by applying discrete differentiation operator and crops the margins to generate the cropped page image as explained in detail in
Extracting unit 650 extracts the watermark from the selected blocks based on the same image or video watermarking algorithm which is used in watermark embedding process as explained in
One or more of the above-described techniques may be implemented in or involve one or more computer systems.
With reference to
A computing environment, such as watermark management computing device 600 which may comprise watermark embedding computing device 500 and/or watermark extracting computing device 600 may have additional types and/or numbers of features. For example, the watermark management computing device 700 may include storage 740, one or more input devices 750, one or more output devices 760, and one or more communication connections 770. An interconnection mechanism (not shown) such as a bus, controller, or network interconnects the components of the computing environment 700. Typically, operating system software (not shown) provides an operating environment for other software executing in the computing environment 700, and coordinates activities of the components of the computing environment 700.
The storage 740 may be removable or non-removable, and includes magnetic disks, magnetic tapes or cassettes, CD-ROMs, CD-RWs, DVDs, or any other medium which may be used to store information and which may be accessed within the computing environment 700. In some embodiments, the storage 740 stores instructions for the software 780.
The input device(s) 750 may be a touch input device such as a keyboard, mouse, pen, trackball, touch screen, or game controller, a voice input device, a scanning device, a digital camera, or another device that provides input to the watermark management computing device 700. The output device(s) 760 may be a display, printer, speaker, or another device that provides output from the watermark management computing device 700.
The communication connection(s) 770 enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions, audio or video information, or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired or wireless techniques implemented with an electrical, optical, RF, infrared, acoustic, or other carrier.
Implementations may also be described in the general context of non-transitory computer-readable media. Non-transitory computer-readable media are any available media that may be accessed within a computing environment. By way of example, and not limitation, within the watermark management computing device 700, non-transitory computer-readable media may by way of example only include memory 720, storage 740, communication media, and combinations of any of the above.
Having described and illustrated the principles of our invention with reference to described embodiments, it will be recognized that the described embodiments may be modified in arrangement and detail without departing from such principles. It should be understood that the programs, processes, or methods described herein are not related or limited to any particular type of computing environment, unless indicated otherwise. Various types of general purpose or specialized computing environments may be used with or perform operations in accordance with the teachings described herein. Elements of the described embodiments shown in software may be implemented in hardware and vice versa.
In view of the many possible embodiments to which the principles of our invention may be applied, we claim as our invention all such embodiments as may come within the scope and spirit of the following claims and equivalents thereto.
Number | Date | Country | Kind |
---|---|---|---|
4299/CHE/2013 | Sep 2013 | IN | national |