You are on page 1of 6

2012 Sixth International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing

Copyright Protection for Images on Mobile Devices


Raffaele Pizzolante, Bruno Carpentieri
Dipartimento di Informatica Universit degli Studi di Salerno I-84084 Fisciano (SA), Italy raffaelepizz@hotmail.it, bc@dia.unisa.it

AbstractThe rapid diffusion of mobile devices (telephones, smart phones, tablets, etc.) has brought new advanced features developed specifically for these devices. For example it is now possible to publish directly the pictures obtained by the integrated camera of a smart phone to our social network accounts, or to image hosting services, etc.. It is therefore important to have tools on the mobile devices that can prove the ownership of the pictures and to use them before publishing the images. A common approach to guarantee ownership of digital images or videos is to use Digital Watermarking techniques. We have developed a tool for portable devices based on Android OS, that permits to add a visible or invisible watermark to images. In this paper we discuss this tool, and we experimentally prove its robustness. Keyword: Mobile Device Security; Digital Watermarking; Copyright Protection

I.

INTRODUCTION

During the last few years mobile devices, such as tablets, smart phones, etc., have increased their potentialities in terms of hardware (i.e. display resolution, processor speed, etc.) and software. The built-in operating systems are specifically designed for these devices (for example Android, iOS, Symbian, etc.) and implement many advanced features. Moreover, there are a large number of third-party applications (also called Apps) that can be installed on these devices. These mobile devices are currently used for a wide range of purposes: for example for internet browsing, for sending and receiving email, Multimedia Message Service (MMS) message, and many others. It is also possible to directly publish the photos, obtained by the integrated camera of the portable device, to social networks, image hosting services, and so on. These possibilities introduced by the advanced features of the portable devices have prompted us to focalize our attention to the security problem. An important aspect related to mobile devices security is to guarantee the ownership of an image, before publishing or sending the image to another party. The classical solution is to embed in the image watermarking information related to the producer. This technique is usually referred to as Digital Watermarking.

There are, substantially, two types of digital watermarking approaches: visible or invisible watermarking. In the first case, the information is visible in the picture. Generally the watermark is a text (as in Figure 1) or a logo (as in Figure 2). Invisible watermark instead modifies a few small features of the multimedia data and it is not directly visible to the end user. In order to verify the property, the owner has an algorithm that can extract the invisible watermark to prove ownership. For this latter type of watermarking there are many methods for embedding the information: for example the spread-spectrum methods, the amplitude methods, etc.. In this work we propose a tool for portable devices that embeds a visible or an invisible digital watermarking into an image. The proposed tool is for Google Android OS ([1]). It takes as input a picture and a string and it gives as output the image with visible or invisible digital watermarking.

Figure 1. An example of an image affected by visible watermarking (watermark is the string SEA).

Figure 2. An example of an image affected by visible watermark (watermark is the logo of the University of Salerno).

The remainder of this work is organized as follows: in Section II we discuss the backgrounds of Digital Watermarking.
585

978-0-7695-4684-1/12 $26.00 2012 IEEE DOI 10.1109/IMIS.2012.73

In Section III we present our tool, based on Android OS, and focus on the visible and invisible watermarking capabilities of this tool. In Section IV we report the experimental results achieved by the tool, In Section V we present our conclusions and highlight future work directions. II. DIGITAL WATERMARKING

Digital Watermarking is a technique that is used to insert hidden data into digital content, such as images, videos, etc. If a digital file is affected by one or more watermarks, then the hidden information will be also carried in its copies. An important application of digital watermarking is for copyright protection. In this case, the digital watermarking is used to prevent unauthorized copy of the digital media. There are substantially two types of digital watermarking: Invisible watermarking Visible watermarking In the first case the information are embedded into digital media by modifying some features of the data. These modifications are not perceptible by the end user. There are different methods for embedding a digital invisible watermarking: spread-spectrum quantization amplitude modulation The method based on spread-spectrum [8-9] consists in an additive modification on the image spectral signal. The quantization [10] embedding methods obtains the marked signal by quantizing the original spectral signal. The amplitude modulation method embeds the watermark into the spatial domain. In digital visible watermarking the watermarking information in the digital picture or video is visible to the end user. Usually the watermarking is a text or a simple logo, which identifies the owner of the multimedia data. For example the logo which identifies a TV channel can be considered as visible watermark. This type of digital watermark is often used also for the pictures and videos on the Web, when the owner wants immediately inform the end user of the property information regarding the digital object. III. AN ANDROID OS WATERMARKING TOOL

Our tool permits to configure a few options: the size of the font, the typeface (Serif, Sans Serif or Random) of the font, the number of repetitions and the color. The implemented algorithm converts the string of the watermark in a bitmap image and then it merges the bitmap obtained with the input image in a random positions. The number of positions selected depends on the repetitions given by the user. Figure 3 shows the User Interface (UI) of the tool for the configuration of the options on the SDK emulator ([2-4]) with screen resolution of 320x640.

Figure 3. Configuration panel of the tool for digital visible watermarking on the Android SDK Emulator.

Figure 4 shows a preview of the image Lena affected by a visible watermark by the tool on the Android SDK Emulator with HVGA screen resolution (320x480), in portrait mode.

We have developed a tool, for Google Android OS (2.2 or later), that reads an image (on the internal storage or on the external data storage, such as SD card, an USB pen drive and so on), and affects the image with a digital invisible watermark or with a digital visible watermark. The supported image formats are JPG, PNG, BMP, etc. A. Digital Visible Watermarking If the user chooses to embed a digital visible watermarking, the tool takes as input a string that will be inserted as the watermark, and it produces as output the visible watermarked image.

Figure 4. Preview of the Lena image affected by a digital visible watermark on Android SDK emulator, in portrait mode.

586

Figure 5 shows another preview of the watermarked image, obtained by the tool, on Android SDK emulator with HVGA screen resolution, in landscape mode.

Figure 5. Preview of the Lena image affected by a digital visible watermark on Android SDK emulator, in landscape mode.

As we can see in the Fig. 4 and Fig. 5, the tool permits a preview of the watermarked image on the smartphone display. Moreover, the tool permits to save the result in user defined position on the device.

Figure 6. The resulting image with the visible watermark produced by the tool.

Figure 6 shows the resulting image. B. Digital Invisible Watermarking The tool allows to produce a digital invisible watermarking too. The implemented algorithm is based on a modified version of the algorithm proposed by Langelaar et al. [7] and it takes as input the source image, a seed, a threshold T, the watermark string, and the path of the output image. The seed means an ID (such as numeric PIN) that is used to embed the watermark, and in second instance for extract it from the watermarked image. The threshold (a real number) indicates the robustness of the watermark that will be embedded. Algorithm 1 reports the pseudo-code of the algorithm for embedding the digital visible watermark.

The image in RGB domain is converted to the YUV domain. 2. The watermark string is converted to a matrix of bits. Each character is converted in a 5x8 matrix of bits (see the example in Fig. 7). The resulting matrix will be embedded in the original image line-by-line from left-top corner. 3. A block B of 8x8 pixels is pseudo-randomly selected from the image to embed one bit of the watermark string. 4. A fixed binary pseudo-random pattern of the same size of B is generated. 5. I0, I1 and D are calculated. I0 and I1 are the obtained by calculating the averages of the luminance values in B, respectively where the random pattern is 0 and where the random pattern is 1. D is the difference I1 I0. 6. B is a reduced quality block obtained by applying the quantization (Fig. 8 shows the quantization coefficients matrix used) and the 8x8 DCT transform. 7. I0, I1 and D are calculated. I0 and I1 are the obtained by calculating the averages of the luminance values in B, respectively where the random pattern is 0 and where the random pattern is 1. D is the difference I1 I0. 8. If the bit to embed has value 1 the go to step 11. 9. In order to embed the bit with value 0, the binary pseudo-random pattern is subtracted from the block B, if D and D are greater than the threshold -T. The steps 6-8, and 10 are repeated iteratively until both differences are less or equal -T. Go to step 12. 10. In order to embed the bit with value 1, the binary pseudo-random pattern is added from the block B, if D and D are less or equal than the threshold T. The steps 6-8, and 11 are repeated iteratively until both differences are greater than T. 11. The steps from 4 to 11 are applied to all pseudorandomly selected blocks until all bits of the watermark string are embedded. 12. The image in YUV domain is converted to the RGB domain.
Algorithm 1. The pseudo-code of the algorithm for embedding the digital invisible watermark based on the algorithm proposed by Langelaar et al.[5]

1.

Figure 7. Example of conversion from the character e to the matrix of bits composed by 5 x 8 bits (40 bits). The white cells are represented by the value 0 and the black cells are represented by 1.

587

Figure 8. The 8x8 matrix of coefficients used for the quantization by the implemented algorithm.

Algorithm 2 reports the algorithm for the extraction of the digital invisible watermarking. 1. 2. The image in RGB domain is converted to the YUV domain. A block B of 8x8 pixels is pseudo-randomly selected from the image to read one bit of the watermark string. A fixed binary pseudo-random pattern of the same size of B is generated. I0, I1 and D are calculated. I0 and I1 are the obtained by calculating the averages of the luminance values in B, respectively where the random sequence is 0 and where the random sequence is 1. D is the difference I1 I0. If D > 0 then the embedded bit has value 1 else the embedded bit has value 0. The steps from 2 to 5 are repeated until all the bits are extracted. The extracted bits are converted to the matrix of the bits and the in the bitmap of the watermark string.

3. 4.

Figure 9. Configuration panel of the tool watermarking on the Android SDK Emulator.

for

digital

invisible

5. 6. 7.

Algorithm 2. The pseudo-code of the algorithm for the extraction of the digital invisible watermark.

In both algorithms the seed is used for the generation of all pseudo-random sequences and patterns. The watermarked image can be stored in JPEG format or PNG format. In the first case it is possible to set the compression quality. In the second case the produced image is compressed in lossless mode with the PNG integrated algorithm provided by Android OS. Figure 9 shows a screenshot of the configuration panel of the digital invisible watermarking. The next screen of the tool shows the positions of the blocks affected by the digital invisible watermark. Figure 10 shows a picture of this screen. The white part of the image is the part that will not modified by the algorithm. The red blocks instead indicate the blocks that will embed the value 1 and the blue blocks indicates the blocks that will embed the value 0.

Figure 10. An example of the screen that shows the blocks affected by the digital invisible watermark. The red blocks indicate the blocks that embed the value 1 and the blue blocks indicate the blocks that embed the value 0.

IV.

EXPERIMENTAL RESULTS

In this section we report the experimental results achieved by the tool with a test set of RGB images composed of sixteen images with 24 bits per pixel in RGB format. The images are online available for research use from The USC-SIPI Image Database [5] in the Miscellaneous section [6]. All the images are in TIFF format, we have converted they in the original BMP format to use them with the integrated image processing library provided by Android OS.

588

Table I lists the test set images. The first column indicates the filename, the second column indicates a short description, the third column indicates the resolution and the fourth column indicates the size in kilobytes (KB).
Filename 4.1.01 4.1.02 4.1.03 4.1.04 4.1.05 4.1.06 4.1.07 4.1.08 4.2.01 4.2.02 4.2.03 4.2.04 4.2.05 4.2.06 4.2.07 house Description Girl (1) Couple Girl (2) Girl (3) House Tree Jelly beans (1) Jelly beans (2) Splash Girl (Tiffany) Mandrill (or Baboon) Girl (Lena or Lenna) Airplane (F-16) Sailboat on lake Peppers House Resolution 256x256 256x256 256x256 256x256 256x256 256x256 256x256 256x256 512x512 512x512 512x512 512x512 512x512 512x512 512x512 512x512 Size (KB) 192 192 192 192 192 192 192 192 768 768 768 768 768 768 768 768

4.2.02 4.2.03 4.2.04 4.2.05 4.2.06 4.2.07 house

15 15 15 15 15 15 15

0%/ 3.26 0%/ 2.52 0%/ 3.20 0%/ 3.32 0%/ 2.71 0%/ 3.02 0%/ 3.01

1.5%/ 20.36 0%/ 10.10 0%/ 19.84 0%/ 19.46 0%/ 14.60 0.5%/ 18.26 0%/ 15.95

2.5%/ 33.16 0.5%/ 15.46 3.5%/ 31.41 1%/ 29.66 2%/ 22.62 3%/ 29.19 0.5%/ 23.86

6%/ 47.43 4%/ 21.68 9%/ 43.63 4%/ 40.05 10%/ 31.34 6.5%/ 41.05 3.5%/ 32.37

Table II. Achieved results of the watermark extraction of 200 bits (obtained by the string Hello).

Image

4.1.01 4.1.02 4.1.03 4.1.04 4.1.05 4.1.06 4.1.07 4.1.08 4.2.01 4.2.02 4.2.03

15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15

Table I.

The used test set of images available on [6].

Table II and Table III report the results in terms of percentage of incorrect bits resulting respectively from the extraction of the invisible watermark with string Hello (composed by 200bits) and the string University (composed by 400 bits). The first column indicates the image, the second column indicates the threshold T. The third, fourth and fifth columns indicate respectively the percentage of the incorrect bits obtained from the extraction of the watermark where the image is compressed with JPEG (with integrated algorithm provided by the Android OS) with respectively 100%, 75%, 50% and 30% of quality factor and the compression ratio achieved.
Image T JPEG 100%/ C.R. 0%/ 3.09 1%/ 3.22 0%/ 3.66 0%/ 3.16 0%/ 3.13 0%/ 2.52 0%/ 3.60 0%/ 3.32 2.5%/ 3.51 JPEG 75%/ C.R. 0.5%/ 17.80 3.5%/ 18.36 0%/ 24.90 0.5%/ 16.92 0%/ 17.15 0%/ 11.60 0%/ 23.98 0%/ 19.18 2.5%/ 23.34 JPEG 50%/ C.R. 2.5%/ 27.46 7.5%/ 27.56 0.5%/ 37.96 2.5%/ 25.54 2%/ 26.43 0.5%/ 17.56 1%/ 35.63 1%/ 28.28 3.5%/ 37.19 JPEG 30%/ C.R. 7%/ 37.29 11%/ 37.48 3.5%/ 50.50 9.5%/ 34.74 5%/ 36.22 3.5%/ 23.60 4%/ 46.87 8%/ 37.47 7%/ 53.09

4.2.04 4.2.05 4.2.06 4.2.07 house

4.1.01 4.1.02 4.1.03 4.1.04 4.1.05 4.1.06 4.1.07 4.1.08 4.2.01

15 15 15 15 15 15 15 15 15

JPEG 100%/ C.R. 0.25%/ 2.98 1%/ 3.11 0%/ 3.39 0%/ 3.03 0%/ 2.98 0%/ 2.46 0%/ 3.33 0%/ 3.11 1.5%/ 3.46 0.25%/ 3.22 0%/ 2.25 0%/ 3.17 0%/ 3.28 0%/ 2.69 0.25%/ 2.99 0%/ 2.97

JPEG 75%/ C.R. 1%/ 16.61 2.75%/ 17.30 0%/ 20.86 0.25%/ 15.74 0%/ 15.84 0%/ 11.09 0%/ 19.86 0%/ 17.07 1.5%/ 22.62 1.5%/ 19.92 0%/ 10.06 0%/ 19.41 0.25%/ 19.97 0%/ 14.37 0.75%/ 17.89 0%/ 15.62

JPEG 50%/ C.R. 2.75%/ 25.95 7.25%/ 26.49 0%/ 32.93 3%/ 24.20 0.25%/ 24.53 0.25%/ 16.99 0%/ 31.11 0.5%/ 26.06 3.25%/ 36.13 3.25%/ 32.42 1%/ 15.14 1.75%/ 30.81 1.5%/ 29.10 1.5%/ 22.31 1.5%/ 28.68 0.75%/ 23.49

JPEG 30%/ C.R. 6.75%/ 35.79 12%/ 36.33 3.5%/ 45.52 7.75%/ 33.43 2.25%/ 34.18 3.5%/ 23.04 3.75%/ 42.69 4%/ 35.24 7.25%/ 51.66 6.25%/ 46.57 4%/ 21.62 6.75%/ 43.00 4%/ 39.41 6.75%/ 30.97 7%/ 40.42 6.5%/ 31.99

Table III. Achieved results of the watermark extraction of 400 bits (obtained by the string University).

Even though there is a percentage of errors obtained from the extraction process when the compression factor of the JPEG algorithm is low (i.e. 50% and 30%) however is possible to easily distinguish the string of the watermark.

589

Figures 11(a), 11(b), 11(c) and 11(d) show respectively the results of the extraction of the watermark of 400bits (obtained by the string University) from the image Girl (3) (filename: 4.1.04) compressed with JPEG respectively with quality factor of 100%, 75%, 50% and 30%. The watermark string is extracted with percentage of errors respectively of 0% (0 bit), 0.25% (1 bit), 3% (12 bits) and 7.75% (31 bits).

Future work will consider the possibility to produce watermarked images automatically before sending email or MMS messages or publishing it. Moreover, future work will also include the implementation and testing of different approaches for digital invisible watermarking. REFERENCES
[1] [2] Android Home Page [Online]. Available: http://www.android.com Android Developers [Online]. Available: http://developer.android.com [3] Android SDK Web Page [Online]. Available: http://developer.android.com/sdk/ [4] Android Developers Blog [Online]. Available : http://androiddevelopers.blogspot.com/ [5] SIPI Image Database [Online], Available : http://sipi.usc.edu/database/database.php [6] SIPI Image Database Miscellaneus [Online], Available : http://sipi.usc.edu/database/database.php?volume=misc [7] G. C. Langelaar, J.C.A. van der Lubbe, and J. Biemond, Copy Protection for Multimedia Data based on Labeling Techniques, 17th Symposium on Information Theory in the Benelux, 1996. [8] Yu-Pin Wang, Mei-Juan Chen, Po-Yuen Cheng, "Robust image watermark with wavelet transform and spread spectrum techniques," Signals, Systems and Computers, 2000. Conference Record of the Thirty-Fourth Asilomar Conference on , vol.2, no., pp.1846-1850 vol.2, 2000. [9] Qiujuan Liang, Zhizhong Ding, "Spread Spectrum Watermark for Color Image Based on Wavelet Tree Structure," Computer Science and Software Engineering, 2008 International Conference on , vol.3, no., pp.692-695, 12-14 Dec. 2008 [10] Cong Jin, Yan Chao, Xiao-Liang Zhang, "Semi-Fragile Watermark Based on Adaptive Quantization for Image Content Authentication," E-Business and Information System Security, 2009. EBISS '09. International Conference on , vol., no., pp.1-5, 23-24 May 2009.

Figure 11. The results of the extraction of the watermark of 400 bits (obtained by the string University) from the image Girl (3) (filename: 4.1.04) respectively when the compression with JPEG has quality factor of 100% (a), 75% (b), 50% (c) and 30% (d).

V.

CONCLUSIONS AND FUTURE WORKS

The continue evolution of the portable devices prompts us to investigate on the security issues. In particular, in this work it is considered the possibilities to guarantee the ownership of an image directly through the mobile devices. We have proposed a tool for Google Android OS that permits to add an invisible or visible watermark into an image.

590

You might also like