Real Time Copyright Protection and Implementation ...

12 downloads 162 Views 510KB Size Report
watermarking, we create an Android app which captures an image using the .... Step3: A small sub matrix (M) of size 32*32 is extracted from the transformed ...
Available online at www.sciencedirect.com

ScienceDirect Procedia Computer Science 46 (2015) 1626 – 1634

International Conference on Information and Communication Technologies (ICICT 2014)

Real Time Copyright Protection and Implementation of Image and Video Processing on Android and Embedded Platforms Mohammad Farukh Hashmia,*,Ronak Jayesh Shuklab,Avinash G. Keskarc a-c

a-c

Department of Electronics and Communication Engineering Visvesvaraya National Institute of Technology,Nagpur,440010,India

Abstract In this paper, we have proposed real time copyright protection algorithm using both visible as well as invisible watermarking schemes and also implementation of real time image and video processing techniques on Android and Embedded Platform for privacy prevention. We propose invisible watermarking using DCT analysis. Visible watermarking is implemented using image processing properties of Android. We also implement real-time video processing like Canny Edge Detection, Dilation, and Successive frame subtraction on Android and embedded platforms. In this system, pre-specified copyright information is embedded directly on pictures when they are taken. These techniques were also implemented on Beagle board-xM. © 2014 The Authors. Published by Elsevier B.V.

© 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). on Communication Information and Peer-review under responsibility of organizing committee of the International Peer-review under responsibility of organizing committee of the International Conference on Conference Information and Communication Technologies (ICICT 2014). Technologies (ICICT 2014) Keywords: Android; Digital Watermarking; OpenCV; Discrete Cosine Transform (DCT); Beagleboard-xM; Smartphone.

1. Introduction Digital media nowadays becomes the largest sources of information and entertainment. Smartphone cameras have emerged tremendously as an important source for digital media at the consumer level. People capture images through their Smartphone’s camera and upload it over the Internet to share the information

* Corresponding author. Tel.: +919665610484; fax: 91-712-2223230/2223969. E-mail address: [email protected], [email protected], [email protected].

1877-0509 © 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of organizing committee of the International Conference on Information and Communication Technologies (ICICT 2014) doi:10.1016/j.procs.2015.02.096

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

1627

with others. However, it is possible that the photos may be used without the consent of the user leading to piracy of the images. This encourages various methods to prevent the misuse of the digital data and thereby develops the idea of digital watermarking. Digital watermarking area has gained tremendous acceleration in its research domain. It is a method in which we embed information in the digital data. It is carried out for all types of files such as, image, video, audio, etc. The watermarked image can be used for owner identification in case of any piracy. Watermarking algorithms can be designed to resist any kind of image processing operations, compressions, etc. Digital watermarking can be done in both spatial domain and frequency domain. Spatial domain watermarking involves techniques such as least significant bit encoding, M-sequence technique, etc. In spatial domain, image pixels are directly modified, that is, the pixel value of the image at the particular region is changed. They are computationally less complex and easy to implement and also require less power. Implementation of visible watermarking on Android platform in our work is an example of spatial domain technique for watermarking real time captured images. Frequency-domain analysis involves the use of transforms like DCT (Discrete Cosine Transform) and DWT (Discrete Wavelet Transform) to real time host images 1. Watermark is embedded by modifying the transform coefficients according to the watermark 2. In our implementation of invisible watermarking, we used DCT. Finally, inverse transform is applied to yield the watermarked image in which the watermark spreads itself in such a manner that it becomes difficult to be detected and modified. Generally, this algorithm required a lot of computation and hence more power. In general, we capture a lot of images in our daily lives, and if we want to watermark a large fraction of those images, then it is always a cumbersome task to select an individual image, watermark it and save. Hence, in our algorithm, we provide an easier approach. Since we are developing the application on Android platform and implementing the same on embedded platforms, it is possible for us to create android apps, which consist of pre-specified watermarks and default operation to capture images. So, for visible watermarking, we create an Android app which captures an image using the default Smartphone camera, watermark it, and then save it in an external storage (Sdcard). Similarly, for invisible watermarking, we developed an algorithm which embeds pre-specified watermark using digital watermarking technology in the frequency domain, when the picture is taken. So, because of this, if the user does not want to embed a watermark on the captured image, then he can neglect it by capturing the image from the default camera application provided by Android. Various image and video processing operations like Edge detection, dilation, frame differencing etc., also find many applications. We implement these operations on real time captured videos on Android and embedded platforms to show the effectiveness of image and video-processing algorithms on less computationally capable devices like Smartphone devices 3. All the real-time video processing and invisible watermarking processes are implemented using OpenCV. OpenCV is an open-source computer vision library which provides efficient methods to implement various image and video processing applications with fewer software complexities 4. Vun, N et al. 5 has illustrated a method to develop video streaming applications on Android platform. This provides us the motivation to develop Android applications for real time image and video processing. Chen, Yueh-Hong et al. 6-7 demonstrates copyright protection approach for Android devices. They implement the algorithm using Haar-wavelet transform. We develop our entire algorithm using core DCT and IDCT on Android and hence need to compensate on frame-rate of processed video, but the efficiency of algorithm is high. Because of lack of literature, we cannot compare our algorithm efficiency with that of any other similar type of approach.

1628

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

2. Development Platforms 2.1 Android Architecture Android OS is a software stack of different layers. Each layer consists of different program components. And it provides services to the layer just above it 5-6. The various layers are Linux Kernel, Libraries, Android Runtime layer, Application Framework and Application Layer. 2.2 Beagleboard-xM Beagleboard-xM is a low-power open-source hardware used for dedicated applications. It is one of the most widely used development board in embedded systems 4. Beagleboard-xM provides a user-friendly interface for booting android environment. The architecture of Beagleboard-xM consists of AM37x 1GHz ARM Cortex-A8 compatible processor, 512 MB LPDDR RAM, 2D/3D graphics accelerator, etc. There are several ports of Android on Beagleboard-xM. In our work, we made use of a rowboat as a benchmark for testing our Android application. 3. Overview of DCT and Video Processing Discrete Cosine Transform is one of the methods used in analysis of images using various processing techniques. Application of DCT shifts the working domain from spatial to frequency. Frequency-domain analysis is comparatively easier to analyze than the corresponding spatial domain. Image compression algorithms are one of the widely used applications of DCT. Watermarking using DCT is done by applying DCT to the entire image or block wise. The general expressions of 2-D DCT and IDCT are given below 8. Two –Dimensional DCT Equation G (u , v )

N 1 N 1 (2 x 1) uS [(2y+1)vS h ( u ) h ( v ) ¦ ¦ f ( x , y ) cos[ ] cos[ ] 2N 2N x 0 y 0

(1)

Here, G denotes the discrete cosine transform coefficients of image. Two –Dimensional IDCT Equation f( x , y )

N 1 N 1 (2 x 1) uS [(2y+1)vS ¦ ¦ h ( u )h(v)G(u,v) cos[ ] cos[ ] 2 N 2N u 0v 0

(2)

f denotes the inverse DCT intensity of image. h(u) and h(v) are defined as below h(u) =

1 , K 2 , K

u=0 1 d u d K 1

h (v ) =

1 , L 2 , L

v=0 1 d v d L 1

u = 0,1,2,….,K – 1, v = 0,1,2,….,L – 1. K and L represent the length and breadth of image respectively. Application of DCT leads to mapping of image to the frequency domain. It is represented as a combination of DCT basic functions with appropriate DCT coefficients, representing different horizontal and vertical intensities. Real-time video processing has gained wide applications in modern technology. Edge detection, dilation, erosion, blurring are some of the common algorithms implemented. Implementing real-time video processing

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

on android and embedded platforms leads to multi-domain platform development flexibility which can enable implementing complex image processing algorithms on the mobile platform which possesses less computing capabilities. In our work, we implement Canny Edge Detection, Dilate and Subtract, Successive frame subtraction and masking. 4. Proposed Watermarking Algorithm 4.1Invisible Watermarking In the proposed watermarking algorithm, input frame of the real-time video is obtained from the Smartphone camera. This video is watermarked frame by frame using pre-defined binary watermark. Initially, video frame obtained is in color format. So, it is converted to grey level format, and then converted to a type required for applying DCT, that is, floating point type. DCT is applied to the entire frame of video, which leads to a transformed frame. Then a portion of the frame is extracted, and binary watermark is added to the extracted sub matrix of the transformed frame. The extracted frame is chosen in such a manner that the integrity of information is retained. In our work, the size of watermark is 32*32 pixels. The size of the extracted sub matrix and the watermark are same. The modified sub-matrix of the transformed frame is copied back to main transformed frame and then IDCT is applied. Hence we obtain a watermarked frame which is displayed to us on the screen of the Smartphone. By touching on the Smartphone screen, the watermarked frame is saved as a watermarked image with the “.jpg." extension in the external storage of the Smartphone, that is, Sdcard and then again, new frames are captured from the Smartphone camera and are watermarked. In this manner, all frames of a video captured by the camera are watermarked, and this process continues to execute in a loop until we don’t terminate the application. The block diagram for the process is shown in Fig. 1(a). Steps for invisible watermark embedding Step1: Android app is launched, and input frame (F) is obtained from Android Smartphone camera. Step2: DCT is applied to the entire host frame of size equal to the display screen of Smartphone. Step3: A small sub matrix (M) of size 32*32 is extracted from the transformed frame obtained from above step. This matrix is the bottom right matrix of the frame. Step4: A small watermark (W) of size 32*32 is added to M with a gain factor α. So, in this case we have. D = M + αW. Where D is the modified sub matrix. For our convenience, we choose α = 1. Step5: The modified sub-matrix D is copied back in the main frame at the same location from where it was extracted. Step6: IDCT is applied to the entire watermarked frame. Step7: On touching the screen of the Android phone the watermarked frame is saved as a watermarked image in Sdcard of phone. 4.2Visible Watermarking Image to be watermarked is captured from Smartphone camera. Application GUI provides the flexibility to enter the desired text of watermark and the desired size of the watermark. The watermark is embedded in the spatial domain by transforming pixel values of the original image at a particular location predefined in the application. Canvassing property provided by Android is used to modify pixel value. The required watermarked image can be stored in Sdcard as required. Various other utilities like grey-scaled

1629

1630

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

watermarking (applying watermark to a grey image) and resizing are provided. The block process is shown in Fig. 1(b).

Host Frame captured from Android Smartphone

Apply DCT to entire frame

diagram for the

Android Phone

Capture Image

Extracting sub matrix from host frame of Size=Watermark

Select Text for Watermark Add Watermark to extracted sub matrix

Copy the modified sub matrix back to host DCT frame

Select Size of Watermar k

Apply Waterma rk

Save to External Storage

Apply IDCT

Convert Colour

Watermarked Frame Process Repeated For Next Upcoming

Fig. 1. (a) Block diagram of invisible watermarking

Resize Fig. 1. (b) Block diagram of visible watermarking

Steps for visible watermark embedding Step1: Android app is launched and default android phone camera is initiated to capture images. Step2: The captured image is displayed on GUI of Android app, and various options are also displayed. The screenshots for this are displayed in Fig. 3. Step3: The app demands the text from the user. This text will be watermarked on the image. The app also provides the flexibility to user as to select the size of the watermark. Step4: The watermark can also be applied to grey images by first converting the captured image from RGB to Grey and then watermarking it. The watermarked image can be resized as per requirement. Step5: The watermarked image can be saved in the external storage (Sdcard) of the phone.

1631

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

5. Experimental Results and Discussions Input video frame is obtained from Smartphone camera. It is subjected to various video processing operations like Canny Edge Detection, binarization, successive frame subtraction for observing the differences between the two successive frames by masking the difference, dilation, etc. All these algorithms are implemented using OpenCV libraries. In this section, we present the experimental results to demonstrate the practical implementation of the system. An AAKASH tablet with Android version 4.2.2 was used as a test bench. AAKASH tablet is designed by IIT-Bombay as a part of their research. This tablet is in the process of development, and various android applications are implemented on it, to check the efficiency of the tablet in response to the application. The experiments were also implemented on Begleboard-xM. The watermark used in our experiment is 32pixels x 32pixels in dimensions as shown in Fig 4(c). The frame obtained on the tablet for video processing, and invisible watermarking would occupy the whole display with dimensions 640 x 480. The images of various video processing and watermarking operations which were implemented on AAKASH and Beagleboard-xM are shown. Fig. 2(a) and Fig. 2(b) show the results for canny edge detection and successive frame subtraction on real time video frames captured from AAKASH tablet. Fig. 2(c) shows invisibly watermarked frame. Fig. 2(d) shows dilation and frame differencing. Fig. 3(a), Fig. 3(b), Fig. 3(c) and Fig. 3(d) show visible watermarking process on AAKASH and various image processing techniques applied to watermarked image. Finally, Fig. 4(a) and Fig. 4(b) show the overview of the visible watermarking algorithms implemented by us on Beagleboard-xM.

(a).

(b).

(c).

(d).

Fig. 2(a).Canny edge detection; Fig. 2(b). Successive frame subtraction and masking; Fig. 2(c).Invisibly watermarked frame; Fig. 2(d). Dilate and subtract successive frames

(a).

(b).

(c).

(d).

Fig 3(a). Real time captured image; Fig 3(b). Visible watermark of a particular text and size; Fig 3(c). Visible watermark on grey image; Fig 3(d). Watermarked image resized.

1632

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

(a). Fig. 4(a).Beagleboard-xM Android GUI;

(b). Fig. 4(b). Watermarked image on Beagleboard-xM ;

(c). Fig. 4(c). Watermark image

The watermark and the watermarked images which were captured through Smartphone for quality assessment, to calculate the efficiency of watermarking algorithm are shown in Fig. 4(c) and Fig. 5 respectively.

(w1)

(w2)

(w3)

(w4)

(w5)

Fig.5. Real time images captured and watermarked by the proposed system

In order to evaluate the efficiency of watermarked images, we calculate their PSNR and MSE values as listed below in Table 1 for different quality factors 9-10. Table 1 lists the results for all watermarked images with different qualities. 5.1Mean Square Error (MSE) The mean-squared-error (MSE) is widely used for full-reference image quality measurement.

MSE

1 MN

M

N

i 1

j 1

2

¦¦ [ x(i, j )  y(i, j )]

(3)

Where x (i, j) represents the original (reference) image and y (i, j) represents the distorted (modified) image and i and j are the pixel position of the M×N image 8-10. 5.2Peak Signal to Noise Ratio (PSNR) The Peak Signal to Noise Ratio (PSNR) is the ratio between maximum possible power and the corrupting noise which adversely affects the quality of image 8-10.

PSNR

10 log10

2552 MSE

20. log10 (255)  10.log10 (MSE )

(4)

(5)

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

1633

Table 1. Performance analysis of watermarked images for different quality factors Watermark Q=30 Q=60 Q=90 Q=100 Images MSE PSNR MSE PSNR MSE PSNR MSE PSNR W1 8.84 38.66 8.67 38.75 8.51 38.83 8.32 39.92 W2 6.66 39.89 5.95 40.38 5.85 40.45 5.48 40.74 W3 4.84 41.28 4.66 41.44 4.60 41.50 4.02 42.08 W4 3.49 42.70 3.45 42.75 3.42 42.79 3.28 42.97 W4 4.04 42.06 4.01 42.09 3.85 42.27 3.62 42.54

6. Conclusion and Future Work In this paper, we have proposed copyright protection and video processing application on Android and embedded platforms. The image captured from the Smartphone camera is watermarked using pre-defined watermarking system. Also, images without watermark can be captured by the normal method. Video processing algorithms can be implemented more effectively for small-scale processing. The system has following features: 1) The invisible watermarking process is operated using DCT and so the efficiency of watermarking is high. 2) The visible text watermark is also resilient to be removed by common image processing algorithms. 3) The watermark embedding process is automatic, with the watermark being embedded on each frame of the captured video as soon as we launch the application on Android Smartphone. 4) Common video processing techniques can be effectively implemented on the small computational platform like Android. 5) Invisible watermarking and video processing algorithms are implemented using OpenCV. But with the increase in computational complexity, speed of implementation gets compensated. So, future work may be carried out for increasing the speed of processing and thereby effectively utilizing the full capabilities of Android and embedded platforms. Acknowledgements We would like to thank the Department of Electronics and Communication Engineering of VNIT, Nagpur, for providing us AAKASH Tablet and all the facilities required for our work. We would also like to thank our guide Dr. Avinash G. Keskar for his constant encouragement and guidance towards this project. Special thanks to Director VNIT Nagpur for providing institutional facilities and needed administrative and authoritative support during the work at VNIT. References 1. Liu, Lin. A survey of digital watermarking technologies. Technical Report, Stony Brook University. New York, USA; 2005. 2. Gunjan, Reena, Saurabh Maheshwari, Vijay Laxmi, and Manoj Singh Gaur. Robust Watermarking through Spatially Disjoint Transformations. In Proc. of first International Conference on Advances in Computing and Communications (ACC-2011). Springer Berlin Heidelberg; 2011; 192, p. 478-487. 3. Salman, AfanGalih, and BayuKanigoro. Application Hiding Messages in JPEG Images with the Method of Bit-Plane Complexity Segmentation on Android-Based Mobile Devices. Procedia Engineering, 2012; 50, p.314-324. 4. Teoh, ShenKhang, VooiVoon Yap, Chit Siang Soh, and Patrick Sebastian. Implementation and optimization of human tracking system using ARM embedded platform. In Proc. of IEEE 4th International Conference on Intelligent and Advanced Systems (ICIAS-2012), 2012; 1, p. 353-356. 5. Vun, N., and Y. H. Ooi. Implementation of an Android phone based video streamer. In Proc. of IEEE/ACM International Conference on Green Computing and Communications (GreenCom) and IEEE/ACM Int'l International Conference on Cyber, Physical and Social Computing (CPSCom). 2010; p. 912-915.

1634

Mohammad Farukh Hashmi et al. / Procedia Computer Science 46 (2015) 1626 – 1634

6. Chen, Yueh-Hong, and Hsiang-Cheh Huang. A Copyright Information Embedding System for Android Platform. In Proc.of IEEE Seventh International Conference on Intelligent Information Hiding and Multimedia Signal Processing (IIH-MSP-2011). 2011; p. 2124. 7. Chen, Yueh-Hong, and Hsiang-Cheh Huang. The copyright protection system for android platform." In Proc. of Recent Advances in Information Hiding and Applications. Springer Berlin Heidelberg; 2013; p. 19-32. 8. Strunk Gunjan, Reena, Saurabh Maheshwari, Manoj Singh Gaur, and Vijay Laxmi. A DCT Based Permuted Image Digital Watermarking Method. In Proc. of TENCON IEEE Region 10 Conference (TENCON 2010). 2010; p. 2264-2268. 9. Nagaria, Baluram, Mohammad Farukh Hashmi, Vijay Patidar, and Nitin Jain. An Optimized Fast Discrete Cosine Transform Approach with Various Iterations and Optimum Numerical Factors for Image Quality Evaluation. In Proc. of IEEE International Conference on Computational Intelligence and Communication Networks (CICN- 2011). 2011; p. 158-162. 10. Ahmet M. Eskicioglu, Paul S. Fisher. Image Quality Measures and Their Performance. IEEE Transactions on Communication.1995; 43:12, p. 2959-2965.