Hardcopy Watermarking for Document Authentication

Watermarking techniques have been extensively studied and applied to digital text and image documents for applications such as author and/or content authentication. However, most of these techniques are not designed or intended to be robust to the PS channel and associated distortions. General office/business documents and the associated flow of office information usually, for many different reasons, need to suffer a digital-to-analog conversion through printing and scanning processes, which brings to authentication methods the necessity of robustness to this process.


Introduction
Watermarking techniques have been extensively studied and applied to digital text and image documents for applications such as author and/or content authentication. However, most of these techniques are not designed or intended to be robust to the PS channel and associated distortions. General office/business documents and the associated flow of office information usually, for many different reasons, need to suffer a digital-to-analog conversion through printing and scanning processes, which brings to authentication methods the necessity of robustness to this process.
Many approaches in the literature deals with the document hardcopy authentication problem. Brassil et al. propose in Brassil et al. (1999) authentication methods based on shift coding (line, word, etc.). Those methods, in order to be robust to the PS channel, require uniformly spaced centroids, which are not easily achieved in practice. Wu et al. develop in Wu & Liu (2004) an authentication method where some pixels of the characters are flipped from black to white or vice versa, which requires a high quality printing and scanning process. More recently, the text luminance modulation (TLM) approach was investigated in Borges & Mayer (2006b); Víllan et al. (2006). In order to embed information, this approach modulates the luminance of the characters by changing the character color intensity or gray level. This approach provides a very low perceptual impact, high capacity, and robustness to the PS channel. Most of the works are intended for invisible watermark embedding. On the other hand, binary one-dimension (1D) or multi-level two-dimension (2D) barcodes are quite visible and yet can also be applied for document authentication Quintela & Pérez-González (2003); Víllan et al. (2005). Visible watermarking provides a way to certify legal copies and also a way to quick recognize that the document has been authenticated. This approach of using a logo/seal has been used for centuries for document authentication of authorship and information contents. These are very interesting properties to be considered in authentication applications. Still, visible watermarking has not received significant attention from researchers for applications like hardcopy document authentication. For image copyright protection, visible watermarking has been studied in Braudaway et al. (1996), M.S. Kankanhalli (1999), and Y. Hu (2003), for example, but none of the methods is able to survive the PS process. Also, they do not carry any information besides the visual logo inserted in the image.
In this work we present a document authentication technique which inserts visible logos to the document. In contrast to traditional invisible watermarking techniques, visible logos can Besides, we analyze the applicability of the developed method for the case where the authenticated document is printed on recycled paper. For this case, we characterize the noise imposed by the recycled paper, estimate the autocorrelation function of this noise, and a new detector is derived. Also, some new analyses are presented.
To achieve the development of the new binary document authentication method proposed here, this paper brings the following contributions: (i) the definition of a simple but effective analytical model to the PS channel; (ii) the derivation of optimal detectors and optimal detection threshold for cases of white or recycled paper documents; (iii) identification and characterization of the segmentation noise; (iv) characterization of the pattern noise for a recycled paper; and (v) the determination of the position error identification during logo detection. The remain of this paper is organized as follows. In Section 2 some of the main distortions found in the PS channel are discussed and a simple but effective channel model is proposed. Details on the logos insertion and detection processes, the development of an optimal detection threshold for the proposed method, an error probability analysis, the lower bound capacity of the method, and the analysis of the position error are all presented in Section 3. The analysis of the applicability of the method for recycled paper documents is presented in Section 4. Also in this section we characterize the recycled paper noise and a new detector is derived. The new detector depends on the autocorrelation matrix of the recycled paper noise and this matrix is deduced in Section 5. Some experiments to illustrate the discussions and performance of the method are in Section 6. Section 7 concludes this paper and present some future works.
Hardcopy Watermarking for Document Authentication 3 the scanning process. A misplacement of the paper over the flatbed scanner may rotate the document. Cropping appears both during manual placement and scanning region selection. Scaling is originated by employing different system resolutions.
Furthermore, both devices have non-linear gains. An offset gain is generated by the printing process due to the toner or ink black color offset. Another non-linear gain is generated by scanner non-linear filters and color adjustments.

PS channel model
Taking into account the distortions imposed by the PS channel, we investigate a simple model for those distortions in order to design and evaluate our method. In this way, we point out below some considerations and the final model proposed for tests.
As halftoning is device dependent, we propose to convert the grayscale logo to a bilevel representation employing our own halftoning technique. This approach prevents the halftoning noise generated by the printer's algorithm and allows us to choose a simplified analytical model for the PS channel when compared to the some existing models Borges & Mayer (2006b); Quintela & Pérez-González (2003). Moreover, we disregard the non-linear gain due to toner and consider the printing blurring effect as a low-pass filtering. Blurring due to the scanner is also modeled as a low-pass filtering.
Regarding geometric distortions, we assume that significant rotation can only occur if someone badly operates the scanner by mistake. For authentication applications, the user is interested in help the authentication process and does not attempt to remove or deteriorate the watermark by rotation. Thus, we are not concerned with rotation as a distortion to be modeled and assume that proper placement is done by the user. Regarding cropping, we are eliminating the margins of the document and preserving only its internal content. Moreover, internal cropping is not considered in our model because the user is assumed to avoid it in order to keep the document authentication. Scaling is a problem intrinsic to the scanning process but it can be reversed by many different methods already available in the literature Zitová & Flusser (2003). In our experiments we assume a controllable environment where all the resolutions employed on the system are known and rescaling can be achieved by a bicubic interpolation when necessary. We also disregard non-linear gains, since we are detecting the logos by a correlation based template matching (CBTM) method, which is quite robust to small non-linear disturbances.
Considering the assumptions above, our PS channel model is written as: where Yr is the watermarked document processed by the PS channel; Dw is the digital watermarked document; '*' represents the 2D convolution; the noise term η e represents the electronic noise of the devices and is assumed to be an uncorrelated Gaussian noise, η e ≈N(0, σ 2 η e ). Moreover, we assume that H p and H s model the blurring effect of the printing and scanning, respectively. Considering that the low-pass effect due to scanning prevails over that of printing, we can write H s * H p ≈ H s = H. We can model it as a Butterworth low-pass filter described by where n is the filter order, D 0 is the cutoff frequency, and D (u, v) is the Euclidean distance from point u, v to the origin (center) of the frequency spectrum. The parameters of the filter are estimated by comparing the frequency responses of an original digital document image and its PS version after several experiments. During the tests we found out that the order n and cutoff frequency D 0 are device dependent. Indeed, we could determine typical values for laser and for inkjet printers. The best approximation of the frequency response for the PS process in the case of laser printers are n = 3andD 0 = 0.4, and n = 1andD 0 = 0.12 for inkjet printer.

The insertion
Let us consider a binary text document D of size M ′ × N ′ and a grayscale logo L of size M × N, both with pixel amplitudes in the [0, 1] range. The insertion of the logos is an additive process which is not applied over the characters. The insertion position coding rule is derived from Borges & Mayer (2003).
Once the insertion position is defined according to the authentication bits, we compute Y = X +(L ht − 1) to effectively insert the logo. X is a document region to be marked, L ht represents the bilevel version of the original grayscale logo with adjusted energy, and Y is the watermarked document region. The subtraction by 1 is employed to guarantee the insertion of the logo only in the background of the document leaving the characters intact after negative saturation (quantization). The block diagram of the insertion process is shown in Fig. 2, where α controls the watermark strength. Considering that the logo is previously defined and does not convey any authentication bits and that the halftoning method employed is known, the L ht logo is a deterministic signal in the process. The chosen detector relies on these assumptions.

The detection
A correlation based template matching, which is equivalent to the matched filter (MF) detector, is employed for the detection of the logos. It is well known that this is the optimum detector for deterministic signal (logo filtered by H) corrupted by additive white Gaussian noise Kay (1998). This is the assumed scenario depicted in Fig. 1. The mathematical definition of the detector is given by where Yp is a region of the watermarked document already processed by the PS channel, and L ps = L ht * H is the halftoned logo (L ht ) pre-filtered by the low-pass filter (H) modeling our PS channel. Therefore, as L ht and H are deterministic variables, L ps will also be deterministic. Fig. 3 depicts the detection process. The CBTM operation needs to be performed to each pixel of the whole document and it is very time consuming. Taking advantage of the convolution theorem of the Fourier Transform, we speed up the detection by performing it on the frequency domain Gonzalez (1992). The received document is composed of the logos, the characters and noise. As the logo positions carry the authentication information, characters are considered as perturbing noise. Thus we segment the characters from the received document before performing the detection. The segmentation relies on a global threshold obtained by Otsu's method Otsu (1979). Due to the PS blurring effect, the borders of the characters are degraded, preventing from a perfect segmentation. We named this degradation as segmentation noise. For binary documents watermarked with low energy and more transparent logos, our experiments illustrate that this segmentation noise follows a uniform distribution with values varying from 0.560 to 0.996 (1 is the white background of the document). In Fig. 4 we show a histogram that characterize this noise. In this Figure the vertical axis represents the logarithm of the pixel occurrence and the horizontal axis represents the pixel value. Results illustrate that the segmentation of the characters brings a significant improvement on the detection error probability.

Optimal detection threshold
Having defined the detection metric (2) we need now to determine the detection threshold in order to indicate the presence of one or more logos in the document. In general,  the watermarking literature employs the Neyman-Pearson criterion Kay (1998) for the determination of the detection threshold. Considering the nature of our application we propose an optimal detection threshold based on the minimum error criterion as follows.
The total detection error probability (TDEP) Pe as a function of the threshold is defined as where P fa (τ) and P fn (τ) are, respectively, the probabilities of false alarm and false negative detection for a given threshold τ; P 0 and P 1 represent the a priori probabilities of the unmarked and marked regions, respectively.
By noting that our detection metric ρ (eq. (2)) is a sum of statistically independent terms and considering the Central Limit Theorem (CLT), we can assume that the probability density function (pdf) of P fa and P fn can be approximated by a normal pdf. This assumption is verified in practice. Hence, the TDEP can be written as where µ ρ 0 and µ ρ 1 are the mean values; σ ρ 0 and σ ρ 1 are the standard deviations about the means of the unmarked and marked regions respectively. To find the threshold τ that minimizes the TDEP given the constrain P 0 + P 1 = 1, we differentiate Pe(τ) with respect to τ and equate the result to zero. Thus, we get a quadratic equation in the form From equation (7), σ 2 ρ 1 = σ 2 ρ 0 , and consequently A = 0. Therefore, equation (5) is reduced to a first order equation, and the optimal detection threshold is given by

Error probability
Let us define two regions: H 0 the hypothesis of non-marked regions and H 1 the hypothesis of the marked regions, so that is a deterministic variable that represents the logo processed by the filter of the PS channel, η s is an i.i.d. uniformly distributed variable that represents the segmentation noise, and η e is an i.i.d. zero mean Gaussian distributed variable that represents the electronic noise. Also, considering that the segmentation noise η s prevails over the electronic noise η e , we assume η s + η e ∼ = η s .
To determine the error probability, the mean and variance of the hypotheses H 0 and H 1 are derived. The mean of H 0 hypothesis is Before the correlation process, the logo mean is removed so that E{L} = 0. Besides, its assumed that the sum of the PS filter coefficients equals to one, such that the filtering process does not alter the mean. Therefore, ∑ M,N i,j=1 W ij = 0, consequently, µ ρ 0 = 0. The variance of H 0 hypothesis is given by where µ η s and σ 2 η s are, respectively, the mean and variance of the segmentation noise and are given by where a represents the beginning of the uniform distribution, and b represents the end of the distribution as depicted in Fig. 5.
The mean of H 1 hypothesis is given by Now, recalling equation (4) we have where erfc() is the complementary error function. Pe is the error probability of one detection. The total error probability must take into account all the M ′ N ′ detections. If we miss one logo we could not decode the message. Thus, letting Q represents the amount of marked points and K = M ′ N ′ the total amount of pixels of the document, the probability of missing the message (Pe t ) carried by the logos is

Lower bound capacity
The capacity of our method is directly dependent on the document and logo size. Also, due to the statistical nature of the employed detectors, logo superposition is not allowed. Although we know that this restriction will compromise the capacity, error probability will not be affected, and we prefer this more conservative choice. Another important point to be considered is the necessity to define a region of insertion and not just a pixel of insertion for the logo. This fact will be properly discussed in section 3.6. For the capacity development we will consider an insertion region of size J × J pixels. Therefore, given a document with M × N pixels and a logo with U × V pixels, we can determine the available insertion area A i by In order to ensure logo superposition avoidance we are considering the logo with the triple of his original size. This is the worse case but the safest in terms of error probability. Nevertheless, we know from experiments that it is possible to insert closer logos without over compromise the detection. Anyway, we decided to opt for a more conservative choice. So, the amount of available insertion positions in the document is given by where Q represents the amount of logos to be inserted. Note that equation (10) can produce not allowed results. If p < Q we have more logos than available positions. This is not possible and one should change the size of the document or the size of the logo. The insertion is only possible if p ≥ Q.
The combination of the p available positions with the Q amount of logos to be inserted gives us Now, the capacity C in bits can be obtained by The equation (12) gives us the lower bound capacity C of our method in bits. To illustrate this equation, in Fig. 6 we present the capacity plot for a 7000 × 5000 pixels document considering that the insertion region has 7 × 7 pixels. The graphics are presented for logo size of 64 × 64, and 128 × 128 pixels. In Fig. 7 we show similar plots but now considering that the insertion region has 3 × 3pixels.

Position error
The logo detection is performed by a correlation process. The message conveyed is coded in the logo insertion positions. Therefore, when we process a detection we are interested in identify the presence or not of a logo, and his position in the document. In order to estimate the logo position after detection, we determine the correlation peaks above the threshold. This peak is considered to be the insertion position. In Fig. 8 we show a graph that exemplify a detection. To estimate the insertion positions we determine the peaks above the threshold (horizontal dashed line). In general, the logo is a correlated image and the whole authentication process is noisy. Due to the correlation of the logo and the noise of the entire process, there is a possibility that we make a mistake in the estimation of the logo position. We call this mistake as position error.I n the sequel of this section we present the mathematical development that models the position error.
The logo detection is performed by a correlation process that can be generalized by where x represents the test logo and therefore, is a deterministic variable. m represents the logo presented in the document and this is given by Taking into account the CLT, we assume that r is an i.i.d. noise with Gaussian distribution, r ≈N(0, σ 2 r ). Also, we assume that this noise models all the distortions generated by the PS channel associated with the segmentation noise. So that we have Analyzing the mean of equation (15) we have As x is a deterministic variable, The variance of equation (15) is given by From equation (16) E{C therefore, and equation (18) can be rewritten as, As can be seen in equation (21), the variance of the correlation process of the test logo with the document logo is dependent on the noise energy present in the document. For this reason, in some detections the correlation peak may not correspond to the exact insertion position of the logo but to a close adjacent position. This means that from the detection point of view the insertion point can not be a specific point but a small region of size J × J pixels. Which is called insertion region. In section 6.3 we present an experiment that illustrate how to define the size of the insertion region for a determined logo.

Applicability of the technique for recycled paper document
Considering that 90% of paper pulp is made of wood, recycling is a very important action that brings a good impact for the environment. Many companies have already decided to use just recycled paper for their whole bulk of office-like documents. For this reason we investigate the applicability of the Position Based Hardcopy Watermarking (PBHW) technique for the authentication of documents printed on recycled paper.
The very important point to be analyzed is the fact that a recycled paper is not white. It has a kind of noise imposed by the recycling process. We have analyzed this pattern of noise and concluded that it has an interesting characteristic. It can be easily modeled by a Gaussian distribution function with mean µ pn = 150 and variance σ 2 pn = 16.5, η pn ≈N(µ pn , σ 2 pn ).I n Fig. 9 it is depicted the histogram of a recycled paper page sample that illustrates the typical distribution of a recycled paper pattern noise.  The proposed PBHW technique makes use of a MF for logo detection. This detector is known to be optimum for deterministic signals corrupted by uncorrelated Gaussian noise Kay (1998). Taking into account the low-pass filtering characteristic of our PS channel, the Gaussian pattern noise η pn of a recycled paper will become a correlated noise. Thus, the MF will be not optimum anymore. Therefore, we investigate a new detector.

Optimum detector for recycled paper document
Given a received signal y, the detection problem we are dealing with can be characterized by the detection of a deterministic signal s corrupted by correlated Gaussian noise η. Consequently, we have two statistical hypothesis to be verified: where s = w * h,a n dη = η pn * h.H e r ew represents the logo, h represents the PS channel low-pass filter, and η pn represents the recycle paper noise.
The likelihood ratio is given by In this way, the optimum detector for the presented situation is given by the logarithm of the likelihood ratio as From equation (22) we can say that the detector decides H 1 if As the fraction 1 2 s T R −1 s is independent of the observations, we say that Letting log γ + 1 2 s T R −1 s = γ ′ we got Now, the test statistic for the detector is given by Comparing equation (23) with the literature of detection theory, we note that the developed detector corresponds to the generalized matched filter (GMF) Kay (1998). Also, taking into account the CLT, we assume that the test statistic of equation (23) has a Gaussian distribution. Consequently, the optimal detection threshold developed in Section 3.3 is still valid for this detector. So that, in the above development we can say that γ ′ = τ ′ . The statistics of the detection variable T pn (y) are equated in 9, and are summarized in (24). As the matrix R is toeplitz Manolakis et al. (2000), it is known that R T = R Strang (1988).
Now, from equations (23) and (25) we see that both depends on the autocorrelation matrix (R) of the correlated Gaussian noise that models the recycled paper background processed by the PS channel. In the next section we determine the values of that matrix and point out some considerations on the matrix.

Estimation of the R matrix
As shown in Section 4.1, the developed detector is dependent on the autocorrelation matrix of the correlated Gaussian noise that models the recycled paper background processed by the PS channel. For that reason we need to estimate the R matrix. As discussed in (Therrien, 1992, Chap. 6), the simplest but effective way of estimating a correlation matrix is by means of the autocorrelation method. Thus, we define this method to perform the estimation of the R matrix.
The estimation procedure using the autocorrelation method can be summarized as following.
First, we generate a Gaussian noise with mean 150 and variance 16.5 (in accordance with Section 4) and processed it by the PS channel. After, we obtained N s pixel values, . In order to estimate the autocorrelation matrix R of dimension P × P, we formed the data matrix X of dimension (N s + P − 1) × P.
The estimation of the autocorrelation matrix R is given by where X H means the conjugate transpose of the matrix X.
The R matrix defined in equation (27) is Toeplitz Therrien (1992) but it is not sparse. Considering the size of an A4 page document (≈ 7000 × 5000 pixels), the size of the logo could not be so small in order to be visually recognizable. This means the R matrix, which is proportional to the logo size, will be large. For instance, for a 128 × 128 pixels logo (which is relatively small), the R matrix will have 16384 × 16384 elements. In the detection process of equation (23) this matrix needs to be inverted, which means a very high computational cost for a large matrix. Therefore, we analyzed the values of the R matrix running simple experiments and we could realize that this matrix can be approximated by an sparse matrix keeping the first 50 values and zeroing the others. In Fig. 10 we illustrate the distribution of the values of matrix R with dimension 400 × 400 elements. Fig. 11 depicts the plot of a line of the R matrix. Fig. 10. Plot of the values of the R matrix with 400 × 400 elements.
As this matrix is Toeplitz, only a line is enough to characterize it at all Strang (1988).

Experiments
In this section we provide experiments to show the performance of the proposed method. It is important to comment that for the experiments presented in this paper we have used the multifunctional HP M1120, HP PSC1510, and the printers HP P1005, HP LJ-1100. For those devices, the typical values for parameter of equations (1) and (21)  • σ 2 r = 0.15

On characters segmentation
We have pointed out at Section 3.2 that characters segmentation brings a significant improvement on the detection error probability. To notice the improvement obtained by the detector after characters segmentation, we present in Fig. 12 a comparison of the correlation plots. In Fig. 12(a) we have a plot of the correlation values without characters segmentation, and in Fig. 12(b) the segmentation was performed before the detection process. In both plots the dashed line represents the optimal detection threshold obtained from equation (5) with appropriate values for the means and variances for each case. The error probability associated to each detection is Pe = 3.5 × 10 −39 in the case of characters segmentation before correlation, and Pe = 3.71 × 10 −30 when segmentation is not employed.

Experiments with real logos
In this part of the experiments we present results obtained from using a real logo. This logo is shown in Fig. 13.
In Fig. 14 we show part of a marked document after printing and scanning with an HP multifunctional LaserJet device model M1120. The logo has only 10% of his total energy which is very transparent and permits reading the text without any difficulty. This document has originally 300ppi. The printer resolution was set to 600dpi and the scanning resolution to 300ppi. The result of the detection process is presented in Fig. 15.
These experiments illustrate that the robustness of the method is not significantly compromised even for a logo with reduced energy.

Position error experiment
The proposed method suffers from some specific geometric distortions that occurs in the PS channel. These distortions are not properly modeled on the PS channel model described in section 2.2. Therefore, during the logo detection process in a document processed by the PS channel, some little distortions due to the printing and scanning processes will occur. Besides, as the logo image is, in general, correlated, our position estimation strategy may generate an error. This error was model in section 3.6. Here we demonstrate how to evaluate this error and determine the size of the insertion region to be considered both in the insertion and in the detection process. In Fig. 13 it is shown the digital logo used for this experiment. First we compute the logo autocorrelation C x [n]. This is presented in Fig. 16. As already explained in section 3.6, the peak of the correlation of the original logo with the document logo will suffer a disturbance from the total noise present in the document. Considering the CLT, we assume that the total noise present in the document has a Gaussian pdf. Thus r ≈N(0, σ 2 r ),w h e r e r represents the total noise of the document. This noise includes the electronic noise, small imperfections in the paper, dirt particles present on the paper, small geometric distortions like small rotations inherent to the PS process, among others. This noise was evaluated during some experiments and we assume that, typically, it has σ 2 r = 0.15. The next step is to evaluate the variation of the value of the n correlations taking into account the action of the total noise over the correlations. After, determine until which point there is a possibility of a correlation value be greater than the value em n = 0. In the case of the logo of    Table 1 the correlation values and the variation of them for the logo are presented.
Analyzing the values of Table 1, we note that for the first tree correlations (n = 3) there is a possibility of the values be greater than the central value (n = 0). Therefore, for this logo it is necessary to consider an insertion region of 7 × 7 pixels in order to correctly decode the message. This means that we have to create a mapping table known by the transmitter and the  receiver, for instance, in order to map all the 7 × 7 pixels of the insertion region to the specific insertion point.

Experiment using recycled paper
Here we present an experiment to illustrate the applicability of the method for documents printed on recycled paper as described in section 4. In Fig. 17(a) it is shown part of a document printed on a recycled paper. This document was authenticated with one logo in position (51, 51). The authenticated version is presented in Fig. 17(b). For this case, the logo has 50% of his total energy. This amount of energy is necessary in order to keep the logo visible and still detectable. The detection plot shown in Fig. 18 was obtained after detection using equation (23). The optimal threshold was calculated from equation (6) and is represented in 0 4.082E+08 3.470E+08 4.695E+08 1 3.762E+08 3.198E+08 4.327E+08 2 3.424E+08 2.910E+08 3.937E+08 3 3.181E+08 2.704E+08 3.659E+08 4 2.962E+08 2.518E+08 3.406E+08 5 2.774E+08 2.358E+08 3.190E+08 6 2.594E+08 2.205E+08 2.983E+08 7 2.432E+08 2.068E+08 2.797E+08 Table 1. Correlation values, their minimum and maximum in accordance with the total noise variance σ 2 r for the logo of Fig. 13.  the graphics as a horizontal dashed line. Analyzing the detection data, we determined the correlation peak on (51, 51). This corresponds to the exact insertion position of the logo. So that, we can correctly decode the message conveyed.

Performance of the detector for documents printed on recycled paper
In the detection theory the way to compare detectors performance is by the receiver operating characteristics (ROC) curves Kay (1998). The ROC curves are basically the plot of the detection probability (P d ) versus the false alarm probability (P fa )ofthedetector .
To support the development of the optimal detector presented in section 4.1, and to show the better performance of the GMF against the MF for the case where the authenticated document has been printed on recycle paper we present here a comparison of both detectors by means of the ROC curves. For this experiment we simulate the detection of a logo inserted in a document printed on a recycled paper. This document was processed by the PS channel in accordance of the model presented in Fig. 1. We have performed tens of thousands of realizations of the detection process. At the end, we were able to determine the detection probability and the false alarm probability of the whole process for a specific range of detection threshold values. In Fig. 19 it is presented the ROC curves of the experiment. It is important to note that this is not a theoretical curve. It was obtained by a real detection process. Fig. 19. ROC curves comparing the GMF against the MF for detection of logos inserted in recycled paper.
As expected, analyzing Fig. 19, we note that the MF has a very poor performance compared to the GMF in the case of document printed on recycled paper. This proves us the applicability of the developed detector.

A complete example
Now let us present a complete example to characterize the usage of the proposed method. Given we need to authenticate an identification card (ID) as that shown in Fig. 20 (this example ID has 1243 × 717 pixels) with a binary string computed from a hashing function Stinson (1995) using important parts of the card text plus a private key. Let us consider that after this hashing process we got a string of 39 bits, b = 100000010101000101101111110110100101000. Following the coding scheme presented in Borges & Mayer (2006a) we first convert the bit string into his decimal representation, which is Z = 277708533032. Now, suppose we are interesting in inserting two logos on that card. So, we have K = 2. For our example, the mapping function will be Z = c 1 a 1 + c 2 a 2 . As suggested in Borges & Mayer (2006a) we define the coefficients c i = N i−1 , i = 1,...,N,w h e r eN is the total amount of pixels of the document. So that, c 1 = 1andc 2 = 1243 × 717 = 891231. The positions a 1 and a 2 that represent the message b can be calculated by Fig. 20. Example of a card to be authenticated by our method.
It is important to notice that a 1 and a 2 are positions of the 1D vector representation of the document image. In the 2D image, a conversion is needed and it gives us the pixels (51, 51) for a 1 ,a n d(251, 851) for a 2 . To assure good transparency of the logos, their energy will be reduced to only 20%. In Fig. 21 we can see the ID card authenticated with two logos conveying 39 bits of information. This figure represents the ID card already processed by the PS channel.
For this case, the optimal threshold calculated is τ = 90.8. The detection values are depicted in Fig. 22. In Fig. 23 we show with black points the estimated positions found by the detector. More specifically, the insertion points estimated from the correlation peaks correspond to the points (52, 52) and (253, 852). In accordance with the experiment in section 6.3, for the logo used we need to consider an insertion region of 7 × 7 pixels. In this experiment both points were identified inside of the 7 × 7 region. This guarantee we can correctly decode the message.

Conclusion
We have presented a novel hardcopy watermarking technique to authenticate text documents.
The proposed method provides two forms of application: (i) authentication of documents encoding relevant information of the document itself, or (ii) use of a document just to convey a hidden message that do not have any relation to the document. We proposed a simple and effective PS channel model for our problem. Experiments illustrated the robustness of the method to the PS channel interferences. The proposed character segmentation allows the detection of very low energy logos inserted into text documents and also allows it to cooperatively work with other techniques, such as barcodes, without significantly interfering on the performance of each other. Also we have investigated the applicability of the method for documents printed on recycled paper. A new detector was derived for this application and the better performance of this one was presented.
Future work will involve the improvement of the character segmentation, and the development of a more realistic capacity equation for the method. Also, we believe the detection process could be improved by the knowledge of the whole authentication process and noise involved in the process.

Acknowledgments
The author would like to thanks to Prof. Joceli Mayer and the Electrical Engineering Graduate Program from Federal University of Santa Catarina, Brazil, for the support.

Appendix: Detector statistics
This appendix derives the results presented in equation (24).