Visible Digital Image Watermarking by Compound Mapping Algorithm
EVA TUBA University of Belgrade Faculty of Mathematics Studentski trg 16, Belgrade
SERBIA [email protected]
MARKO BEKO
Univ. Lus`ofona de Humanidades e Tecnologias Computer Eng. Dept.
Campo Grande 376, Lisbon PORTUGAL [email protected]
MILAN TUBA John Naisbitt University Graduate School of Comp. Sci.
Bulevar umetnosti 29, Belgrade SERBIA
Abstract: Digital images are used in almost every area of the life. The advent of digital images has brought a lot of progress to various scientific areas, but also many new threads have been opened. One of the main problems with digital data and images is unauthorized replication and use. Digital watermarking is one of the techniques for protecting copyrights of digital images by embedding the additional data to indicate the owners of the copyright. In this paper a method for visible digital image watermarking based on compound mapping algorithm is proposed. Compound mapping was used for lossless digital watermarking embedding and removing while security was improved by defining parameters of the compound mapping.
Key–Words:Visible image watermarking, compound mapping, security, digital images
1 Introduction
Internet and multimedia technologies have become part of everyday life as well as creating and using different digital data such as texts, images, videos or audio formats. Massive use of digital data enabled great benefits in different areas such as biology [23], medicine [28], [24], astronomy [10], etc. Nowadays, numerous algorithms of image processing and appli- cations based on it can be found. Some of the exam- ples are handwritten digit recognition [30], face detec- tion [11], lip detection [4], leaf recognition [21], im- age segmentation [33], [2], JPEG compression [34], retinal image registration [31], etc.
One of the main issue is unauthorized replica- tion of the digital images. As a result of the problem of unauthorized replication of materials, stenography contributed to the development of watermarking, a way to protect them and preserve their authenticity [14]. Both of them rely on the concept of incorporat- ing information into cover data media. Digital water- mark protects the image from unauthorized copying and reproduction by embedding the original with ad- ditional data to indicate the owners of the copyright [1].
The three main factors that impact the overall quality of the copyright pattern are robustness, imper- ceptibility and capacity.
• Robustness: The removal or destruction of a watermark should be challenging, for robust is a method of watermark immunity that is de- signed to safeguard images against alteration and manipulation such as filtering, rotation, sailing, cropping, resizing etc.
• Imperceptibility: Implies that the quality of the original image should not be consumed by the existence of a watermark.
• Capacity: Incorporates procedures that help fa- cilitate the embodiment of information. [8]
In addition, there are two main kinds of water- marks, visible and invisible. Visible watermarks [12], like those on company logos, are noticeable, that is, they are the first line of defense whose task is to clearly indicate that the material is copyrighted and prevent further violation while invisible watermarks cannot be easily noticed and they are situated in the periphery of the content and they can be used to vali- date ones copyright.
Image watermarking can be done in spatial or fre- quency domain. In the spatial domain an image is rep- resented in form of a pixelated matrix [26]. Embed- ding of a watermark is done by directly changing the value of pixels, which implies a change of the corre-
sponding color and other parameters of the pixel ex- actly in the area intended for the insertion of the wa- termark. These algorithms are simple to understand and use as well as less time consuming and can be further used on any type of image.
On the other hand, in the frequency domain the image is represented in the form of frequency [19].
Initially the original image is converted by a prede- fined transformation and then the watermark is em- bedded into the transformed image or into the trans- formation coefficients and finally, the inverse trans- form is performed to obtain the watermarked im- age. Most commonly used transformations are dis- crete cosine transform (DCT), discrete wavelet trans- form (DWT) and discrete Fourier transform (DFT).
It is important to highlight that the significant part of the well watermarking process is extracting the wa- termark from the watermarked image. The extraction process implies the removal of watermark from an al- ready watermarked image. This is a critical part of the entire process and that is exactly why security is always a question of the highest importance. [17]
Thanks to the freedom that internet provides, we are more vulnerable then ever from numerous of dif- ferent kinds of attacks. One of the problems of these attacks is that by removing a watermark the attacker is able to facilitate distribution, commercialization, and other kinds of malversation. Therefore, it is essential that security should entail the protection against data alteration from various unauthorized users and attack- ers [9].
In order to stop data modification and to help to protect data from unapproved hackers and end-users, data security is mandatory. As a result of the ex- panding rise in data distribution rate over the inter- net, data security has acquired higher awareness over the years. Therefore, the development of internet se- curity was necessary which would not only provide security against illegal use but safeguard against the attacks that would jeopardize the security as well. To prevent these kinds of attacks some methods and tech- niques were developed such as cryptography, stenog- raphy and digital image watermarking [27].
In this paper a method for digital image water- marking by securing compound-mapping algorithm is presented. This eas tested on various images differ- ent in sizes and quality. Quality and security of pro- posed algorithm was measured with several standard metrics.
The rest of the paper is organized as follows. In Section 2 literature review of algorithms for embed- ding and extracting watermark is presented. In Sec-
tion 3 our proposed algorithm for security improve- ment of algorithms for spatial domain is proposed.
Section 4 contains the results obtained by our pro- posed algorithm. And finally Section 5 delivers a con- clusion.
2 Literature Review
Nowadays many different algorithms were proposed for digital image forgery detection [32]. One of the methods for image protection is embedding digital watermark. Today there is a numerous of techniques for image watermarking [3]. A great number of these techniques is widely used and some of them will be discussed in this section. However, a number of se- curity attacks and vulnerabilities are on the rise and therefore there is a lot of space for improvement when it comes to watermarking. Digital watermarking is al- ready widely used all over the world and many differ- ent approaches have been successfully used, but grow- ing security attacks and the growing need for the use of this system on the increasing number of roads make this problem still popular for researchers.
In the [13] a simple method for digital image watermarking was presented. This method relies on EXIF metadata (camera model, date taken, copyright, etc.) which works as a watermark [16]. Even when the marked image has been intentionally modified, the original EXIF with selected information can mostly be recovered from the channel decoding process. Be- cause it is easy to manipulate and modify EXIF data, this type of algorithm is less secure than others.
A more sophisticated and secure method for dig- ital image watermarking, that relies on frequency do- main was shown in [15]. It was based on joint DWT- DCT [7]. Against frequent signal processing attacks a more advanced robustness, along with imperceptibly, was maintained. Initially, in certain sub-bands of a 3-level DWT transformed of a host image, a binary watermarked image was embedded. Next, the PN- sequences of the watermark bits and the DCT trans- form of each selected DWT sub-band, were inserted in the coefficients of the matching DCT middle fre- quencies. During extraction stages, which maybe at- tacked, the watermarked image was first preprocessed through the use of sharpening and various kinds of filters. The similar approach, to the embedding pro- cess, was used to obtain the DCT middle frequen- cies of each sub-band. Ultimately, an interaction was computed between PN-sequences and mid-band co- efficients in order to determine watermarked bits. In
conclusion, the results showed that the recommended method enhanced the performance of the watermark- ing algorithm which rely on the joint of DWT-DCT.
Two lossless visible watermarking algorithms were proposed in [35], pixel value matching algorithm (PVMA) and pixel position shift algorithm (PPSA).
Since the embedding distortion of noticeable water- marking was generally greater than that invisible wa- termarking, lossless property was highlighted so as to preserve the fidelity of the signal following the wa- termark extraction. In PVMA, the objective intensity mapping function was used in order to watermark a visible logo. PPSA, on the other hand, made use of circular pixel shift so as to improve the visibility of the watermark in regions with high variance.
In addition to the PVMA and PPSA, there is an older and easier method of embedding the watermark known as least significant bit (LSB) [5]. The im- plementation of a watermark in the LSB pixels does not only allow easier implementation but it does not severely distort the image as well, although when it comes to attacks it lacks robustness against them.
Through the selection of a subset of image pixels and the substitution of the least important bit of each of the selected pixels with the watermark bits, the em- bedding of a watermark is achieved. Furthermore, the watermark can be expanded all over the image or it may be located in the preferred positions of the im- age. However, as a result of these primitive techniques being not only vulnerable to attacks but highly sensi- tive to noise and common signal processing, the wa- termark can be easily destroyed.
A security improvement to the mentioned LSB technique is the use of a random key which is ob- tained by a pseudo-randomized number generation [25]. Random key is not a final security measure. It makes the removal of a watermark more difficult but not impossible.
In [20] a method which provides visible wa- termarking that does not impact the image quality, named compound mapping method. The proposed method used deterministic one-to-one mappings of image pixel values where f converts a set of numer- ical values of pixels P = p1, p2, . . . ,pm to another set W = w1, w2, . . ., wm that represents pixels with wa- termark on themselves. The original image can be re- covered from previously watermarked image by using the corresponding reverse method. In order to main- tain solid security level, set W was randomized there- fore the extraction of a watermark without a key was impossible.
An innovative use of compound capping method
for images in PNG format was presented in [18]. Ad- vantage of the PNG format is that it has the additional A-alpha channel. In the A-alpha channel plane, those pixels which underly the ones that have been water- marked in the color channel plane will be appointed a unique alpha value. An additional advantage of this method was the fact that during the recovery process, the original watermark image was not required. In addition to all this, random generated numbers were used as a security measure to prevent the removal of the watermark without a key.
The most common types of attacks, in the dig- ital image watermarking, are known as removal at- tacks. Extraction attackers endeavor to isolate the wa- termarked data from the data of the original image and remove only the watermark image, via the anal- ysis and estimation of the watermark. Some examples of these kinds of attacks may include: collision at- tacks, compression attacks, certain filter operation or denoising [29].
One way to maintain security is through the use of secret keys, not only for detection but embedding processes as well. The three types of these keys are:
private-key, detection-key and public-key. The pur- pose of these keys is to prevent the security attacks covered above, and provide the removal of the water- mark only to the authorized personal that are in pos- session of the keys [6].
In [22] literature review of reversible digital wa- termarking techniques is given.
As mentioned above, there are very successful methods of image watermarking, but there is a lot of space for improvement. In the next section we pro- pose our method for better security protection in the process of embedding and extracting watermark.
3 Our Proposed Method
One to one compound mapping represents rather new method for visible watermarking with a capability of lossless image recovery. The method is based on the use of one to one compound mapping of image pix- els value and obtains value close to pixels of the de- sired visible watermarks. Compound mapping meth- ods usually use randomized keys in the process of wa- termark embedding. There is no precise explanation for the exact algorithm used to generate random num- bers. In this paper, we propose using some concrete algorithm for generating pseudo-randomized numbers which will add more complexity to the numbers and keys which will disable the removal of the watermark
due to the mentioned complexity.
An algorithm based on compound mapping for embedding different types of watermarks will be pre- sented. The original image can be recovered from protected image without any loss by using reverse mapping. This approach can be used to embed monochrome and color watermark into color images.
In general, one to one compound mapping can be defined as follows. Assume a set of values A = {a1, a2, a3, . . . , am} is converted into another set B = {b1, b2, b3, . . . , bn} and that the mapping from aito bi is reversible where aiand bi stand for the im- age pixel values. The compound mapping f is defined by a one-to-one function Fxwith one parameter x = p or q:
b = f (a) = Fq−1(Fp(a)) (1) where Fx−1 is the inverse Fx. Based on one-to-one property, if Fp(a0) = a then Fp−1(a) = a0 for all val- ues of a and p. On the other hand, Fp(a) and Fq(a) are set to be unequal if p 6= q.
In our proposed algorithm one to one compound mapping is used for embedding and extracting the wa- termark to an image. If color watermark is used, the mappings can be applied to each of the color channels and obtain multiple independent results. The result- ing visible watermark is represented by the composite result.
Usage of the compound mapping for embedding or extracting the watermark to an image will be ex- plained by using pseudo code.
Algorithm 1: Process of watermark embed- ding
Input: Color original (host) image I, a watermark L.
Output: Watermarked Image W.
1. Select a set P of pixels from I where W is to be embedded. The set of pixel P depicts the val- ues of pixels prior the watermark embedding pro- cess.
2. Designate the set of pixels equivalent to P in W by Q, where Q is being the set of pixels which includes the values of the watermark pixels.
3. For each pixel X within p in P, designate the equivalent pixel in Q as Z, the value of the equiv- alent pixel y in L as l, and conduct the following steps:
(a) Obtain value a to be a value close to p, via the utilization of the values of the neighbor- ing pixels of X (excluding X itself).
(b) Appoint b to be the value l (c) Map p to a new value
q = Fb−1(Fa(p)) (d) Set the value of Z to be q.
4. Set the value of each remaining pixel in W, which is outside the region P, to be equal to that of the corresponding pixel in l.
Our proposed method includes pseudo- randomized numbers into Algorithm 1 in order to improve a security. The goal is to get more complex key on the part when pseudo-randomized numbers are generated so that can not be easily broken, which would lead to watermark removing.
Algorithm 2: Process of watermark extraction Input: Watermarked image W, and a Water- mark L
Output: Original (hosted) image R, recovered from W
1. Select the exact watermarking are Q in W as that which was selected in Algorithm 1 (Indicates the area where the watermark is located).
2. Appoint the value of each pixel in
R, which is outside the region Q, to be identical to that of the corresponding pixel in W. Pixels outside the watermarked area are not changed, and thus retain the same values.
3. For each pixel Z with the value q in Q, designate the equivalent pixel in the recovered image R as xand the value of corresponding pixel Y in L as l, and conduct the following steps:
(a) Attain the same value a as that derived in step 3a of Algorithm 1 by administering the same estimation technique that was used there.
(b) Set b to be the value l.
(c) Restore p from q by setting p = Fa−1(Fb(q))
(d) Set the value of x to be p.
In our proposed algorithm for value b was used watermark pixel value. For value of parameter a which should be close to the value of the pixel value p that should be mapped was used average value of the neighbor pixels. Function Fa(p) was define as:
Fa(p) = (p − a) mod 256 (2) while
Fa−1(p) = (p + a) mod 256. (3)
4 Experimental results
The proposed algorithm was implemented using Mat- lab R2016a and all experiments were performed on the platform Intel CoreR TMi7-3770K CPU at 4GHz, 8GB RAM, Windows 10 Professional OS.
Our proposed algorithm for digital image water- marking based on compound mapping algorithm was tested on a standard test image widely used in a field of image processing. Results are pre- sented for two different test images: Lena, Man- drill and Cameraman. Both images can be found at https://homepages.cae.wisc.edu/∼ece533/images/.
The first example is when gray scale watermark is embedded into gray scale image (Cameraman). Orig- inal image is shown in Fig. 1. In Fig. 2 digital water- mark was embedded into the image. Watermark was removed and the result image showed in 3 is identical to the original image. This is the simplest examples since no combination of color component is neces- sary. Following examples has color host image, thus the mappings was applied to each of the color chan- nels (RGB color model) and multiple independent re- sults were obtained. The resulting visible watermark is represented by the composite result.
Compound mapping method with our proposed method for security improvement proved to be effi- cient for image watermarking; simultaneously for em- bedding and extracting watermarks. In Fig. 4 is the previously mentioned standard color test image. This image is used as a host image for embedding water- mark.
In Fig. 5, the same image is presented with an embedded watermark using the formerly mentioned compound mapping algorithm with our proposed im- proved security. The process of watermark embedding was explained in Algorithm 1, which is further defined via the pseudo-code.
Figure 1: Original image
Figure 2: Image with watermark embedded
Figure 3: Image with watermark removed
Figure 4: Original image
Figure 5: Image with watermark embedded
Figure 6: Image with watermark removed
Figure 7: Original image
Figure 8: Image with watermark embedded
Figure 9: Image with watermark removed
Figure 6 represents a watermarked image after the watermark extraction process, which can be like- wise explained via the pseudo-code. As we can see, the quality of the image, which had gone through the processes of embedding and extraction, is almost the same as the original image showed in Fig. 1. Hav- ing tested our proposed algorithm on fifteen images, a conclusion was reached that the algorithm not only had good performances but it also preserved the orig- inal quality.
Similar to the previous example, the same water- mark was embedded to the Mandrill image. As it can be seen image quality remains the same. Resulting images for this example are shown in Fig. 7, 8 and 9.
5 Conclusion
Security improvement of the compound mapping al- gorithm used both for embedding and extraction, was proposed in this paper. Security improvement is re- lated to the parts of embedding as means of generat- ing a secret key to prevent watermark removal via the various attacks. Thus, the watermark extraction pro- cess can only be successful with the use of the correct secret key. Compound mapping algorithm with our improvements was tested on standard benchmark im- ages and the predicted results were met. Having in mind that we have discussed about the algorithm that works with the spatial domain, future research may include improvement of security in frequency domain and invisible watermarking method.
Acknowledgments: This research is supported by Ministry of Education, Science and Technological De- velopment of Republic of Serbia, Grant No. III- 44006.
References:
[1] M. Abdullatif, A. M. Zeki, J. Chebil, and T. S.
Gunawan, “Properties of digital image water- marking,” in Signal Processing and its Applica- tions (CSPA), 2013 IEEE 9th International Col- loquium on. IEEE, 2013, pp. 235–240.
[2] A. Alihodzic and M. Tuba, “Bat algorithm (BA) for image thresholding,” Recent Researches in Telecommunications, Informatics, Electronics and Signal Processing, pp. 364–369, 2013.
[3] T. K. Araghi, A. B. A. Manaf, M. Zamani, and S. K. Araghi, “A survey on digital image wa- termarking techniques in spatial and transform domains,” International Journal of Advances in Image Processing Techniques, vol. 3, no. 1, pp.
6–10, 2016.
[4] A. Arsic, M. Jordanski, and M. Tuba, “Improved lip detection algorithm based on region segmen- tation and edge detection,” in 23rd Telecommu- nications Forum (TELFOR). IEEE, 2015, pp.
472–475.
[5] A. Bamatraf, R. Ibrahim, M. Salleh, and N. Mohd, “A new digital watermarking al- gorithm using combination of least signifi- cant bit (LSB) and inverse bit,” arXiv preprint arXiv:1111.6727, 2011.
[6] M. M. U. Bhaisare and V. R. Raut, “Generic lossless visible watermarking,” International Journal of scientific research and management (IJSRM), vol. 3, no. 4, pp. 2571–2581, 2015.
[7] K. Deb, M. S. Al-Seraj, M. M. S. Kowsar, and I. H. Sarkar, “A joint DWT-DCT based watermarking technique for avoiding unautho- rized replication,” in 7th International Forum on Strategic Technology (IFOST). IEEE, 2012, pp.
1–5.
[8] B. L. Gunjal and R. Manthalkar, “An overview of transform domain robust digital image wa- termarking algorithms,” Journal of Emerging Trends in Computing and Information Sciences, vol. 2, no. 1, pp. 37–42, 2010.
[9] P. Gupta, “Cryptography based digital image watermarking algorithm to increase security of watermark data,” International Journal of Scien- tific & Engineering Research, vol. 3, no. 9, pp.
1–4, 2012.
[10] Y.-Q. Han, Y.-Q. Bai, and F.-k. Jia, “Extracting the centroid from the sun-moon image in astron- omy orientation,” in 33rd Chinese Control Con- ference (CCC). IEEE, 2014, pp. 4721–4726.
[11] R. C. Hrosik, M. Tuba, and M. Vukovic, “Face detection algorithm based on skin detection and invariant moments,” in Recent Advances in Knowledge Engineering and Systems Science, 2013, vol. 10, pp. 110–115.
[12] F.-H. Hsu, M.-H. Wu, C.-H. Yang, and S.-J.
Wang, “Visible watermarking with reversibil- ity of multimedia images for ownership declara- tions,” The Journal of Supercomputing, vol. 70, no. 1, pp. 247–268, 2014.
[13] H.-C. Huang and W.-C. Fang, “Metadata-based image watermarking for copyright protection,”
Simulation Modelling Practice and Theory, vol. 18, no. 4, pp. 436–445, 2010.
[14] M. Hussain and M. Hussain, “A survey of image steganography techniques,” International Journal of Advanced Science and Technology, vol. 54, pp. 113–124, 2013.
[15] S. A. Kasmani and A. Naghsh-Nilchi, “A new robust digital image watermarking technique based on joint dwt-dct transformation,” in hird International Conference on Convergence and Hybrid Information Technology (ICCIT), vol. 2.
IEEE, 2008, pp. 539–544.
[16] E. Kee, M. K. Johnson, and H. Farid, “Digital image authentication from jpeg headers,” IEEE Transactions on Information Forensics and Se- curity, vol. 6, no. 3, pp. 1066–1075, 2011.
[17] A. Khan, A. Siddiqa, S. Munib, and S. A. Ma- lik, “A recent survey of reversible watermarking techniques,” Information sciences, vol. 279, pp.
251–272, 2014.
[18] C.-W. Lee and W.-H. Tsai, “A new lossless visi- ble watermarking method via the use of the PNG image,” 2012.
[19] G. D. Leena, S. S. Dhayanithy, and M. Hwang,
“Robust image watermarking in frequency do- main,” International Journal of Innovation and Applied Studies, pp. 2028–9324, 2013.
[20] T.-Y. Liu and W.-H. Tsai, “Generic lossless vis- ible watermarkinga new approach,” IEEE trans- actions on image processing, vol. 19, no. 5, pp.
1224–1235, 2010.
[21] M. Lukic, E. Tuba, and M. Tuba, “Leaf recog- nition algorithm using support vector machine with Hu moments and local binary patterns,”
in 15th International Symposium on Applied Machine Intelligence and Informatics (SAMI).
IEEE, 2017, pp. 000 485–000 490.
[22] N. Narawade and R. Kanphade, “Reversible wa- termarking: a complete review,” International Journal of Computer Science and Telecommuni- cations, vol. 2, no. 3, pp. 46–50, 2011.
[23] K. S. P. S. Nellore and P. M. SWAMY, “Generic lossless visible watermarking,” International Journal of Engineering Science & Management, vol. 3, no. 2, pp. 1–5, 2013.
[24] M. Nikolic, E. Tuba, and M. Tuba, “Edge de- tection in medical ultrasound images using ad- justed Canny edge detection algorithm,” in 24th Telecommunications Forum (TELFOR). IEEE, 2016, pp. 691–694.
[25] P. K. Sharma, “Rajni: Analysis of image wa- termarking using least significant bit algorithm,”
International Journal of Information Sciences and Techniques (IJIST) Vol, vol. 2, 2012.
[26] A. K. Singh, N. Sharma, M. Dave, and A. Mo- han, “A novel technique for digital image wa- termarking in spatial domain,” in 2nd IEEE In- ternational Conference on Parallel Distributed and Grid Computing (PDGC). IEEE, 2012, pp.
497–501.
[27] P. Singh and R. Chadha, “A survey of digital watermarking techniques, applications and at- tacks,” International Journal of Engineering and Innovative Technology (IJEIT), vol. 2, no. 9, pp.
165–175, 2013.
[28] A. Stojak, E. Tuba, and M. Tuba, “Framework for abnormality detection in magnetic resonance brain images,” in 24th Telecommunications Fo- rum (TELFOR). IEEE, 2016, pp. 687–690.
[29] H. K. Sunesh, “Watermark attacks and applica- tions in watermarking,” in National Workshop- Cum-Conference on Recent Trends in Mathe- matics and Computing (RTMC), 2011.
[30] E. Tuba and N. Bacanin, “An algorithm for hand- written digit recognition using projection his- tograms and SVM classifier,” in 23rd Telecom- munications Forum Telfor (TELFOR). IEEE, 2015, pp. 464–467.
[31] E. Tuba, M. Tuba, and E. Dolicanin, “Adjusted fireworks algorithm applied to retinal image reg- istration,” Studies in Informatics and Control, vol. 26, no. 1, pp. 33–42, 2017.
[32] I. Tuba, E. Tuba, and M. Beko, “Digital im- age forgery detection based on shadow texture features,” in 24th Telecommunications Forum (TELFOR). IEEE, 2016, pp. 679–682.
[33] M. Tuba, “Multilevel image thresholding by nature-inspired algorithms-a short review,” The Computer Science Journal of Moldova, vol. 22, no. 3, pp. 318–338, 2014.
[34] M. Tuba and N. Bacanin, “JPEG quantization ta-
bles selection by the firefly algorithm,” in Inter- national Conference on Multimedia Computing and Systems (ICMCS). IEEE, 2014, pp. 153–
158.
[35] S.-K. Yip, O. C. Au, C.-W. Ho, and H.-M.
Wong, “Lossless visible watermarking,” in 2006 IEEE International Conference on Multimedia and Expo. IEEE, 2006, pp. 853–856.