A DUAL-WATERMARKING WITH QR CODE AGAINST CROPPING AND RESIZING ATTACK LAU WEI KHANG

iv A DUAL-WATERMARKING WITH QR CODE AGAINST CROPPING AND RESIZING ATTACK LAU WEI KHANG A dissertation submitted in fulfillment of the requirement f...
Author: Abigail Dorsey
1 downloads 0 Views 1MB Size
iv

A DUAL-WATERMARKING WITH QR CODE AGAINST CROPPING AND RESIZING ATTACK

LAU WEI KHANG

A dissertation submitted in fulfillment of the requirement for the award of the Degree Master’s of Computer Science (Information Security)

Faculty of Computer Science and Information Technology Universiti Tun Hussein Onn Malaysia

January 2016

viii

ABSTRACT

Watermarking is a pattern of bits inserted into a digital image, audio or video file (digital file) that identifies the file’s ownership copyright information. It is one of the techniques to discourage illegal duplication of intellectual property. However, there is still a room for improvement for new techniques applied to digital files to withstand against cropping and resizing attack. In this Dual-watermarking with QR code project, both visible and invisible watermark are used. The proposed technique is compared with MOHANTY and HSU & WU techniques. First, visible QR code watermark is embedded into the image using LSB 7 (embed at the 7th bit from the left of the binary number) technique. Then, the invisible QR Code watermark was embedded into image using LSB 1 (embed at the 1st bit from the left of the binary number) technique. The proposed technique shows the watermark can be successfully extracted when image is enlarged up to 90 percent or shrank up to 90 percent (resizing attack). If enlarging and shrinking are combined to the same watermarked image, watermark can still be extracted and scanned. Final result for cropping attack shows that watermark can be successfully extracted when image is cropped up to 36 percent. If it is more than 36 percent, watermark is extractable but can not be scanned by QR Code scanner device. Besides that, PSNR result also shows that the proposed technique DWQR is 15 percent better than HSU & WU technique.

ix

ABSTRAK

Watermarking merupakan salah satu corak yang memasukkan bits ke dalam satu imej digital, fail bunyi atau video yang dapat mengenal pasti maklumat tentang hak cipta pemilik. Ia merupakan salah satu teknik untuk mengelakkan pertindihan harta intelek daripada seseorang. Walau bagaimanapun, masih terdapat ruang untuk penambahbaikan bagi teknik-teknik baru untuk menahan serangan pengubahan saiz imej (resizing attack) dan serangan pangkas (cropping attack). Dalam projek DualWatermarking with QR code ini, watermark yang ketara (visible watermark) dan watermark yang tersembunyi (invisible watermark) telah digunakan. Teknik yang dicadangkan telah dibandingkan dengan teknik MOHANTY dan teknik HSU & WU. Pertama, watermark kod QR yang ketara ditanam ke dalam imej dengan menggunakan teknik LSB 7 (tanam pada bit ketujuh dari kiri nombor binari). Kemudian, watermark kod QR yang tersembunyi ditanam juga ke dalam imej dengan menggunakan teknik LSB 1 (tanam pada bit pertama dari kiri nombor binari). Hasil kajian menunjukkan bahawa teknik yang dicadangkan menunjukkan bahawa watermark berjaya dikeluarkan apabila imej dibesarkan sehingga sembilan puluh peratus atau disusut sehingga sembilan puluh peratus. Jika teknik membesar dan menyusut digabungkan pada imej yang sama, maka watermark masih boleh dikeluarkan dan diimbas. Watermark berjaya dikeluarkan apabila imej diserang dengan serangan pangkas sehingga tiga puluh enam peratus. Jika melebihi tiga puluh enam peratus, watermark masih boleh dikeluarkan tetapi kod QR tidak dapat diimbas oleh peranti imbasan. Selain itu, hasil PSNR menunjukkan teknik DualWatermarking with QR code lima belas peratus lebih baik daripada teknik HSU & WU.

x

TABLE OF CONTENTS

DECLARATION

ii

DEDICATION

iii

ACKNOWLEDGEMENT

iv

ABSTRACT

v

ABSTRAK

vi

TABLE OF CONTENTS

vii

LIST OF TABLES

x

LIST OF FIGURES

xi

LIST OF ABBREVIARIONS

xiii

LIST OF APPENDICES

xiv

CHAPTER 1 INTRODUCTION 1.1

Overview

1

1.2

Problem Statement

2

1.3

Project Aim

3

1.4

Objectives

3

1.5

Scope

4

1.6

Contribution

4

CHAPTER 2 LITERATURE REVIEW 2.1

Introduction

5

2.2

Digital Watermarking

5

2.2.1 Visible Watermarks

10

2.2.2 Invisible Watermark

11

2.2.3 Public Watermark

11

2.2.4 Fragile Watermark

11

2.2.5 Private Watermark

12

xi

2.3

2.4

2.5

2.2.6 Perceptual Watermarks

12

2.2.7 Bit-stream Watermarking

12

2.2.8 Text Document Watermarking

12

QR Code

13

2.3.1 QR Code Model 1

16

2.3.2 QR Code Model 2

17

2.3.3 Micro QR code

17

2.3.4 iQR Code

18

2.3.5 SQRC

19

2.3.6 Logo Q

20

Image File Types

20

2.4.1 JPEG

21

2.4.2 TIFF

21

2.4.3 RAW

22

2.4.4 GIF

22

2.4.5 BMP

23

2.4.6 PNG

23

Dual-watermark Techniques

24

2.5.1 MOHANTY Dual-watermarking Technique

24

2.5.2 HSU & WU Dual-watermarking with QR Code Technique

2.6

25

2.5.3 Comparison of Technique

27

Summary

28

CHAPTER 3 METHODOLOGY 3.1

Introduction

29

3.2

The Proposed Framework

29

3.2.1 Visible Watermarking of the Image

33

3.2.2 Invisible Watermarking with Embedded QR Code of the Image

34

3.2.3 Extracts QR Code from Dual-Watermarked Image 35 3.3

Method of Validation

36

3.4

Comparison with Other Techniques

36

3.5

Summary

37

xii CHAPTER 4 IMPLEMENTATION 4.1

Introduction

38

4.2

Implementation Phase

38

4.2.1 Proposed Framework Flowchart

39

4.2.2 QR Code Generation

44

4.2.3 LSB Based Visible Watermark Function

46

4.2.4 LSB Based Invisible Watermarking Function

48

4.2.5 Watermark Extract Function

51

Summary

54

4.3

CHAPTER 5 EXPERIMENTATION AND RESULT 5.1

Introduction

55

5.2

Resizing Attack

55

5.2.1 Test on Resizing Attack

56

5.2.2 Result of Resizing Testing

65

Cropping Attack

66

5.3.1 Test on Cropping Attack

66

5.3.2 Result of Cropping Attack

70

Peak Signal-to-noise Ratio (PSNR)

71

5.3

5.4

5.5

5.4.1 PSNR Test

71

5.4.2 Result of PSNR Test

73

Summary

74

CHAPTER 6 CONCLUSION AND FUTURE WORKS 6.1

Introduction

75

6.2

Limitations

75

6.3

Future Works

76

6.4

Conclusion

77

REFERENCES

78

APPENDICES A

81

VITA

83

xiii

LIST OF TABLE

2.1

Weaknesses of MOHANTY and HSU & WU technique

27

3.1

Comparison of Dual-Watermarking technique

31

3.2

Comparison of related work

37

4.1

Extracted watermark from four watermarked cover image

53

5.1

Result of enlarging

56

5.2

Results of shrinking

58

5.3

Cover image : baboon512 Watermark image : UTHM_L

59

5.4

Cover image : baboon512 Watermark image : UTHM_M

60

5.5

Cover image : baboon512 Watermark image : UTHM_Q

60

5.6

Cover image : baboon512 Watermark image : UTHM_H

60

5.7

Cover image : lena512 Watermark image : UTHM_L

61

5.8

Cover image : lena512 Watermark image : UTHM_M

61

5.9

Cover image : lena512 Watermark image : UTHM_Q

61

5.10

Cover image : lena512 Watermark image : UTHM_H

62

5.11

Cover image : pepper512 Watermark image : UTHM_L

62

5.12

Cover image : pepper512 Watermark image : UTHM_M

62

5.13

Cover image : pepper512 Watermark image : UTHM_Q

63

5.14

Cover image : pepper512 Watermark image : UTHM_H

63

5.15

Cover image : UTHM512 Watermark image : UTHM_L

63

5.16

Cover image : UTHM512 Watermark image : UTHM_M

64

5.17

Cover image : UTHM512 Watermark image : UTHM_Q

64

5.18

Cover image : UTHM512 Watermark image : UTHM_H

64

5.19

Results of cropping attack based on cropping percentage

67

5.20

Results of random cropping attack

69

5.21

PSNR of each cover image with watermark image

72

5.22

Comparison between Dual-Watermarking and HSU & WU technique based on PSNR

73

xiv

LIST OF FIGURES

2.1

Fifty percent visibility of watermark

6

2.2

Hundred percent visibility of watermark

6

2.3

Classification of watermarks

9

2.4

Watermark embed spatial domain watermarking

10

2.5

Watermark extraction spatial domain watermarking

10

2.6

QR Code versus Barcode

14

2.7

QR Code modules

14

2.8

Version of QR Code

15

2.9

QR Code Model 1 with 73 × 73 modules

16

2.10

QR Code Model 2 with 177 × 177 modules

17

2.11

Micro QR Code that required one position detection pattern

17

2.12

Comparison of data size between QR Code, Micro QR Code and Barcode 18

2.13

Storage increase 80 percent than a regular QR Code

19

2.14

Smaller footprint is required to compare with regular QR Code

19

2.15

QR Code embedded with letters and color to create Logo Q

20

2.16

The flowchart of HSU & WU technique

26

2.17

The flowchart of watermark removing algorithm

26

3.1

Proposed framework of Dual-Watermarking with QR Code

32

3.2

Schematic of the proposed Dual-Watermarking with QR Code

32

3.3

Function E for encode visible watermark into raw image

33

3.4

QR Code that same size with watermarked image (I’ )

34

3.5

Function E that encode invisible watermark ( Q ) and resulting (I’’)

35

3.6

Function D that decode (I’’) into (I’ ) and QR Code ( Q )

36

4.1

Flowchart of Dual-Watermarking with QR Code

39

4.2

Flowchart to generate a watermark QR Code

40

4.3

Flowchart for visible watermark embedding

41

4.4

Flowchart for invisible watermark embedding

42

xv 4.5

Flowchart for invisible watermark extracting

43

4.6

Call function for QR Code generator

44

4.7

Version mode for QR Code generator

44

4.8

Function mode for QR Code generator

45

4.9

Partial code for maximum data input

45

4.10

Graphic user interface for QR Code generator

46

4.11

Partial code for LSB based visible watermarking process using MATLAB

47

4.12

Watermarked image I’

48

4.13

Partial code that read both watermarks image and cover images

48

4.14

Partial code for checking the size of watermark image and cover image using MATLAB

4.15

Algorithm calculation for LSB based invisible watermarking process using MATLAB

4.16

49

50

Partial code for saving and display the watermarked image using MATLAB

50

4.17

Watermarked image I’’

51

4.18

Partial code for watermark extracts function

52

4.19

Watermark (QR Code) extracted from watermarked image I’’

52

5.1

Watermarked image was divide into 25 parts which was 4 percent of each part by using Adobe Photoshop

66

xvi

LIST OF ABBREVIATIONS

BMP

Bitmap File Format

QR Code

Quick Response Code

FFT

Fast Fourier Transform

IPR

Intellectual Property Rights

MPEG

Motion Picture Experts Group

TV

Television

2-D

2 Dimension

MSB

Most Significant Bit

DFD

Data Flow Diagram

GUI

Graphical User Interface

JPEG

Joint Photographic Experts Group

JPG

Joint Photographic Experts Group

LSB

Least Significant Bit

PNG

Portable Network Graphics

RP

Rapid Prototyping

PHP

PHP Hypertext-Preprocessor

MATLAB

Matrix Laboratory software

TIFF

Tagged Image File Format

GIF

Graphics Interchange Format

DWQR

Dual-Watermarking with QR Code

OS

Operating System

UTHM

Universiti Tun Hussein Onn Malaysia

FSKTM

Faculty of Computer Science and Information Technology

xvii

LIST OF APPENDICES

APPENDIX

TITLE

PAGE

A

Gantt Chart

82

1

CHAPTER 1

INTRODUCTION

1.1

Overview

Digital watermark is a kind of information security and protection technology. It is typically used to identify ownership of copyright media (digital library, video broadcasting, and other multimedia services). Watermarking is mostly similar to steganography in a number of respects. The main idea of steganography is embedding hidden information into data under assumption that others cannot know the secret information in data. There are two types of watermarking, visible watermarking and invisible watermarking. For visible watermarking for images, a secondary image (the watermark) is embedded into a primary image such that watermark is intentionally perceptible to a human observer. Visible watermarking is an effective technique for preventing unauthorized use of an image, based on the insertion of a translucent mark, which provides immediate claim of ownership. Digital watermarking technology primarily joins the rightful owner of totem to the protected media. Once the media are suspect to be illegally used, an open algorithm can be used to extract the digital watermark, for showing the media's ownership but it is difficult to develop a visible watermarking algorithm that satisfies all types of attack and works effectively for all types of images [1]. Moreover, a visible watermark can always be tampered by certain softwares. To detect such kind of illegal use of image, an invisible watermark can be used as a backup. When a visible watermarked image is being questioned, the invisible watermark can provide appropriate ownership information in order to protect the ownership copyright.

2 Besides that, this project is looking into another useful technique that can be applied into digital watermarking. QR Code (Quick Response Code) is the trademark for a type of matrix barcode (two-dimensional code). QR Code was invent in Japan by the Toyota subsidiary Denso Wave in 1994 to track vehicles during manufacturing [2] due to its fast readability and large storage capacity compared to UPC barcode standard that consists of black modules arranged in a square pattern on a white background. The information encoded can made up of four standardized types of modes of data that are similar to numeric, alphanumeric, byte, binary, kanji, through supported extensions or virtually any kind of data [3]. Therefore, the QR Code has become the focus of advertising strategy, since it provides quick and effortless access to the brand's website. In this project, a proposed technique is dual-watermarking algorithm which is use of QR Code embed into image with both visible and invisible watermarking technique.

1.2

Problem Statement

Although several researches have been done on digital watermarking using difference scheme, there are still several issues to be addressed. In digital watermarking many researchers only focus on certain attack that applies to watermarked image. Beside, most of researchers try to increase the watermark capacity by compromising image quality in order to tradeoff among data rate, security and imperceptibility of watermarked image. For a watermark to be useful it must be robust against any possible attack and image processing by those who seek to corsair the material, researchers have considered various approaches like JPEG compression, geometric distortions, resizing, salt and pepper and many more attack to the digital watermark. Most of works from previous studies against only certain attack but not multiple attacks that would apply to watermarked image. The most common attack that always happed to smartphone user are cropping attack and resizing attack. By using smartphone application, smartphone user can easily download image from internet source and crop or resize the image without knowing the image was protected by digital

3 watermark. Once the image attacked by cropping attack, the digital watermark are damaged and not retrivedable anymore. This happed to resizing attack too. Both shrink and enlarge attack to an image will course pixel of image change or damage. It will make digital watermark unable to be retrived.

1.3

Project Aim

Through this project, the aim is to work on the watermarking and to devise some robust means to make the watermark withstand the attack from resizing and cropping.

1.4

Objectives

The objectives of this project is to ensure that the proposed version of dualwatermarking strengthen to make it more reliable than the previous versions. A watermark cannot defend against all form of attack but with improved watermarking algorithm, a watermarking algorithm can defend against multiple attacks. On the other hand, the current watermarking algorithm could not always be useful to prevent evolving forms of attack. Hence, an improved algorithm is needed to protect the intellectual property. The proposed algorithm is to overcome the problem stated above. The followings are the objectives of this project: 

To propose a Dual-watermarking technique to withstand against cropping and resizing attacks using QR Code.



To develop the proposed algorithm.



To test the strength of the proposed algorithm against resizing and cropping attacks.

4 1.5

Scope

In this project, experimentation and testing against cropping and resizing attacks will be using JPEG and TIFF image only.

1.6

Contribution

This project contributes to the image protection by solving the following issues. Firstly, this project is expect to come up with a combination of dual-watermarking technique that is more secure as compare to a single watermarking technique. Both visible and invisible watermark will be embedding into a cover image in order to against cropping attack and resizing attack. Secondly, the proposed visible watermark used QR Code as watermark image, QR Code can store information and QR Code has up to 30% of error correcting function. It will be harder to be deleted or tampered. Lastly, this project will provide an alternative option for the researchers to choose between the available versions of watermark algorithm for their image protection. The followings are the outline of the contributions. 

Increase protection of image by combining two watermarking techniques (visible watermark and invisible watermark) to a more reliable one.



Visible watermark give smartphone user a hint that image is under protected by digital watermark.



Give researchers another option to explore more techniques and could use this algorithm to integrate with other techniques for a more robust watermark.

5

CHAPTER 2

LITERATURE REVIEW

2.1

Introduction

In this part of the project, all related items are described in details to prove and to disclose how the previous development were achieved and how to proceed and develop a much better system.

2.2

Digital Watermarking

Digital watermarking is a technique which allows an individual or an organization to add hidden copyright notices or verification messages to media element such as audio, video, image or documents. The term digital watermarking was introduced by Andrew Tirkel and Charles Osborne [5]. This term was originally from Japanese word denshi sukashi which means an “electronic watermark”. Digital watermark is similar to steganography. Both are used to hide information into a media element [6]. Functionally, the term digital watermark is used to describe the differences between copies of the "same" content in undetectable manner. Many watermarking system hide the data so that erasure attempt will resulted in degradation of the quality of the content.

6 The difference between watermarking and steganography is watermark data are hidden in the message without the end user's knowledge, although some watermarking techniques have the steganographic feature of not being perceivable by the human eyes. Watermarking techniques tend to divide into two categories, text and image, according to the type of document to be watermarked [7]. For image watermarking, several different methods enable watermarking to be used in spatial domain. The simplest technique is to flip the lowest-order bit of chosen pixels in a grayscale or colour image. This will only work well if the image does not have any human or noise modification. Spatial domain watermarking is illustrated in Figures 2.1 and 2.2 that demonstrate how the degree of visibility of the watermark depending on its intensity and the nature of the background.

Figure 2.1: Fifty percent visibility of watermark

Figure 2.2: Hundred percent visibility of watermark

Figure 2.1 and 2.2 are two identical watermarked images but different in term of the intensity of the image. Considerable latitude is available, in terms of placement, size and intensity to blend the watermark into a graphic. A robust watermark can be embedded into an image in the same way that a watermark is added to paper. Such techniques may superimpose a watermark symbol over an area of the picture and

7 then add some fixed intensity value for the watermark to the varied pixel values of the image. The outcome of watermark may be visible or invisible depending on the value of the watermark intensity. Nevertheless, this watermark is highly exposed to cropping attack, as a part of the image without watermark can be cropped and may be used without permission. Spatial watermarking can also be applied using colour separation [8]. In this way, the watermark appears in only one of the colour bands. This renders the watermark visibly subtle such that it is difficult to detect under regular viewing. However, the watermark appears immediately when the colours are separated for printing or xerography. This renders the document useless to the printer unless the watermark can be removed from the colour band. This approach is used commercially by journalists to inspect digital pictures from a photo-Stackhouse before buying un-watermarked versions. Watermarking can be applied in the frequency domain and other transform domains by first applying a transform like the Fast Fourier Transform (FFT) [9]. In a similar manner to spatial domain watermarking, the values of chosen frequencies can be altered from the original. Since high frequencies will lost by compression or scaling, the watermark signal is apply to lower frequencies, or better yet, applied adaptively to frequencies that contain important information of the original picture (feature-based schemes). Since watermarks apply to the frequency domain will be dispersed over the entirety of the spatial image upon inverse transformation, this technique is not as susceptible to defeat by cropping as the spatial technique. However, there is more of a tradeoff here between

invisibility

and

decodability,

since

the

watermark

is

affected

indiscriminately across the spatial image. The main idea of a digital watermark is a digital signal or pattern combined with a digital image. Since this signal or pattern is presented in each copy of noneditable original image, the digital watermarking may also characterize as digital signature that represent the owner. There have two types of digital watermarks techniques that common used nowadays, visible watermark and invisible watermark. Visible watermark are used in the same way as their ancestors, which is by adding an extra digital “stamp” into digital image. Visible watermarks are extension of the logos concepts [10]. Such watermarks are applicable to images only. Logos inserted into the image are transparent. Such watermarks cannot be removed by cropping the centre part of the image. In addition, such watermarks are protected against attacks such as statistical analysis. But as mentioned before, it is difficult to develop a

8 watermarking algorithm that can prevent from all kinds of attack. Cropping attack, that deal with certain small parts of image does not protect the image from being used without permission. However, the drawbacks of visible watermarks are degrading the quality of image and detection by visual means only. Thus, it is not possible to detect them by dedicated programs or devices. Such watermarks have applications in maps, graphics and software user interface. Invisible watermarks are potentially useful as means of identifying the source, author, creator, owner, and distributor or authorized consumer of a document or image [11]. It can be detected by authorized agency only. For this purpose, the objective to add a watermark into an image is to permanently and unalterably marked the image so that the credit or assignment is beyond being questioned. If the digital image is being detected as illegally used, the watermark would facilitate the claim of ownership, receipt of copyright payment, or the success of prosecution [12]. Other than visible and invisible watermark techniques, there are other watermark techniques for copyright protection such as public watermark, fragile watermark, private watermark, perceptual watermark, bit-stream watermark and text document watermark. Public watermark can be read or retrieved by anyone using specialized algorithm. In this sense, public watermarks are not secured. However, public watermarks are useful for carrying intellectual property rights (IPR) information. They are good alternatives to labels. Fragile watermarks are also known as tamper-proof watermarks. Such watermarks are destroyed by data manipulation. Private watermarks are also known as secure watermarks. To read or retrieve such watermark, it is necessary to have the secret key. A perceptual watermark exploits the aspects of human sensory system to provide invisible yet robust watermark. Such watermarks are also known as transparent watermarks that provide extremely high quality contents. The term of bit-stream watermark is sometimes use for watermarking compressed data such as video. Lastly, text document watermarking are hidden watermark information in semantics and hidden watermark in text format. The hierarchy of watermarks is shown in Figure 2.3 [13].

9

Watermarking

According to domain

Spatial Domain

According to type of document

According to human perception

Frequency domain

Text

Video

Source Based Audio

Robust

Public

Destination Based

Image

Visible

Private

According to application

Invertible

Invisible

Fragile

NonInvertible

QuasiInvertible

NonquasiInvertible

Figure 2.3: Classification of watermarks [13]

Digital watermarking software looks for noise in digital media and replaces it with useful information or owner details. A digital media file is nothing more than a large list of 0’s and 1’s. The watermarking software determines which of these 0’s and 1’s correspond to too many or irrelevant details. For example, the software might identify details in an image that is too small for the human eyes to see and flag the corresponding 0’s and 1’s as irrelevant noise. Then the flagged 0’s and 1’s can be replaced by a digital watermark. Watermarking process is shown in Figure 2.4 and 2.5.

10

User Key Image

Watermark Embed

Watermarked Image

Watermark

Figure 2.4: Watermark embed spatial domain watermarking

User Key

Watermarked Image

Watermark Extraction

Extracted Watermark

Figure 2.5: Watermark Eextraction spatial domain watermarking

Figure 2.4 and 2.5 demonstrate a typical spatial domain watermark embedding and extraction process applied to a static image. It is notable that a slight degradation of the original image occurs when the watermark is embedded. However, the retrieved watermark is very close to the original watermark, which can help resolve ownership issues.

2.2.1

Visible Watermark

Visible watermark are an extension of the concept of logos. Such watermarks are applicable to images only. These logos are inlaid into the image but they are transparent. Such watermarks cannot be removed by cropping the centre part of the image. Moreover, such watermarks are protected against attacks such as statistical analysis.

11 2.2.2

Invisible Watermark

A code hides secretly in a cover image and carry copyright information or other secret messages. An invisible watermark consists of a very slight change of contrast over large areas of the picture, invisible to the human eyes, even fainter than the watermark on a piece of paper. Suitable software can recover the invisible watermark even if the image has been printed out, photographed, and scanned.

2.2.3

Public Watermark

Such a watermark can be read or retrieved by anyone using specialized algorithm. In this sense, public watermarks are not secured. However, public watermarks are useful for carrying Intellectual Property Rights (IPR) information. Public watermark are good alternatives to labels.

2.2.4

Fragile Watermark

Fragile watermarks are also known as tamper-proof watermarks. Such watermarks will be destroyed if data are manipulated. Fragile watermark is similar to invisible watermark, it can only be extracted by suitable program and if the image which embeds with fragile image be manipulated or edited, then the fragile watermark will appear to be different when it is extracted and compared to the original watermark.

12 2.2.5

Private Watermark

Private watermarks are also known as secure watermarks. To read or retrieve such watermark, it is necessary to have the secret key. It cannot be removed, altered or duplicated. It is a permanent part of the paper. It is an extension of corporate image. It conveys confidence.

2.2.6

Perceptual Watermark

A perceptual watermark exploits the aspects of human sensory system to provide invisible yet robust watermark. Such watermarks are also known as transparent watermarks which can provide extremely high quality contents.

2.2.7

Bit-stream Watermark

The term is sometimes used for watermarking compressed data such as video. The watermark is embedded into the MPEG-2 bitstream without increasing the bit-rate, and can be retrieved even from the decoded video and without knowledge of the original, un-watermarked video.

2.2.8

Text Document Watermark

Text document is a discrete information source. In discrete sources, contents cannot be modified. Thus, generic watermarking schemes are not applicable. The approaches for text watermarking are hiding watermark information in semantics and hiding watermark in text format.

13 2.3

QR Code

QR Code is two-dimensional barcode which is categorized in matrix barcode that can store data information. QR stands for “Quick Response” as the creator intended the code to allow its contents to be decoded at high speed. It was introduced in Japan by Denso Corporation in 1994 [14]. This kind of barcode was initially used for tracking inventory in vehicle parts manufacturing and is now used in a variety of industries. Because of its large information capacity, high reliability, ultra-high-speed read, QR Code is widely used in many fields, such as newspaper and TV media, product identification, security, electronic business cards, e-commerce, electronic guides, assembly line production, and etcetera. QR Code can be read by an imaging device such as camera. Data extracted from patterns present in both horizontal and vertical components of the image. As a variety of industries utilize the QR Code today, the applications for use can vary from product tracking, item identification, time tracking, document management and general marketing purposes [15]. QR Code reading is divided into two categories which are laser-way acquisition and imageacquisition. Image-acquisition type is used in most cases, but QR Code image based on image-acquisition have uneven illumination problems, resulting to recognition difficulty. Structure of QR Code is comprised of black and white patterns on geometric plane surface in the two dimensions. It uses black pattern to stand for binary number 1, and white pattern to represent binary number 0. The QR Code is capable of 360 degree (Omni-directional). There are three finder patterns located at the corners. QR Code contains information in both directions (vertical and horizontal), whereas a barcode contains data in one direction only. QR Code holds a considerably greater volume of information than a barcode as shown in Figure 2.6.

14

Figure 2.6: QR Code versus Barcode [16]

QR Code modules work with some functions that contain both horizontal and vertical directions. Some contain the actual data, while others are grouped into various function patterns that improve reading performance and allow symbol alignment, error correction and distortion compensation. The timing pattern lets the scanning device know the size of the symbol. There is also a required “quiet zone,” a buffer area containing no data, to ensure that surrounding text or markings are not mistaken for QR Code data.

Figure 2.7: QR Code modules [16]

Conventional 2-D matrix codes require some time to be spent to search for a symbol’s code to determine its angle of orientation, size, position x and y. To solve this problem, the QR Code is designed with position-detection patterns located in three corners of symbol. The patterns have a symmetrical scan-line ratio which allows them to be scanned from any directions within 360 degrees. In addition, the positional relationship of the patterns allows quick access to the relevant angle, position and size information contained in the symbol. Figure 2.7 shows the QR Code modules.

15 As a result, the QR Code does not require lengthy code searching, enabling reading speeds twenty times faster than those of conventional matrix codes. Also, searching the position detection patterns which can be performed by the scanning hardware, further increase overall speed by allowing image reading and data processing to be carried out simultaneously. Various versions of QR Code are shown in Figure 2.8.

Version 1 (21 x 21)

Version 2 (25 x 25)

Content “Ver1”

Content “Version 2”

Version 4 (33 x33) Content “Version 4 QR Code, up to 50 char”

Version 10 (57 x57) Content “Version 10 QR Code, up to 174 char at H level, with 57x57 modules

Version 3 (29 x 29)

Content “Version 3 QR Code”

Version 40 (177x177) Content “Version 40 QR Code, up to 1264 char of ordinary/ASCII test

Figure 2.8: Versions of QR Code [16]

16 One of the big selling points of QR Code is the capacity of the information storage. The amount of data that can be stored in the QR Code symbol depends on the data type, version, and error correction level. The highest storage capacities are available for 40-L symbols [15]. QR Code has a function of an error correcting for misreading that white is black. Error correcting is defined in four levels as follows [17] :

i)

Level L : about 7% or less errors can be corrected.

ii)

Level M : about 15% or less errors can be corrected.

iii)

Level Q : about 25% or less errors can be corrected.

iv)

Level H : about 30% or less errors can be corrected.

In larger QR symbols, the message is broken into several Reed–Solomon code blocks. The block size is chosen so that at most 15 percent errors can be corrected in each block; this limits the complexity of the decoding algorithm. The code blocks are then interleaved together, making localized damage to a QR symbol to less likely will overwhelm the capacity of any single blocks.

2.3.1

QR Code Model 1

The original QR Code is capable of coding 1167 numerals with its maximum version being 14 (73 × 73 modules). Figure 2.9 shows the QR Code Model 1 with 73 × 73 modules.

Figure 2.9: QR Code Model 1 [16] with 73 × 73 modules

17 2.3.2

QR Code Model 2

QR Code Model 2 is an improved version of Model 1 that can be read smoothly even if it is distorted in some ways. QR Codes Model 2 can be printed on a curved surface and the reading angle will not be affected or distorted by the reading images. The QR Code can be read efficiently by referring to an alignment pattern embedded in them. Besides that, QR Code Model 2 can encode up to 7,089 numerals with highest version being 40 (177 × 177 modules). Figure 2.10 shows the improved version of QR Code Model 2.

Figure 2.10: QR Code Model 2 [16] with 177 × 177 modules

2.3.3

Micro QR Code

Figure 2.11 shows the Micro QR Code that has only one position detection pattern. Regular QR Code requires at least a four-module wide margin around a symbol, whereas a two-module wide margin is enough for Micro QR Code. This configuration of Micro QR Code allows printing in areas even smaller than QR Code.

Figure 2.11: Micro QR Code [16] has only one position detection pattern

18 Micro QR Code can only store up to a maximum of 35 numerals. Figure 2.12 shows Micro QR Code can encode data more efficiently than regular QR Code. Unlike the case with the regular code, Micro QR Code size is small and there are 4 variations, M1, M2, M3 and M4. The maximum amount of data that can be encoded for the maximum version of this code is M4. However, the data size that encoded in Micro QR Code M4 is still smaller than regular QR Code.

Figure 2.12: Comparison of data size between QR Code, Micro QR Code and Barcode

2.3.4

iQR Code

iQR Code is a matrix-type 2D code which allowing easy reading of its position and size. This code allows a wide size range of codes from regular QR Code and Micro QR Code to large ones that can store more data than these. This code can be printed as a rectangular code, turned-over code, black-and-white inversion code or dot pattern code (direct part marking), it is also allowing a wide range of applications in various areas. iQR Code can hold a greater amount of information than the regular QR Code. An iQR Code of the same size as regular QR Code can hold 80 percent more information. If the same amount is stored, an iQR Code can be made 30 percent smaller compared to the regular QR Code. Figure 2.13 shows iQR storage increase

19 80 percent than a regular QR Code and Figure 2.14 shows iQR have smaller footprint compared to a regular QR Code.

Figure 2.13: Storage increase 80 percent than a regular QR Code [16]

Figure 2.14: Smaller footprint is required compared to regular QR Code [16]

2.3.5

SQRC

SQRC is a type of QR Code equipped with reading restricting function. This can be used to store private information and to manage company's internal information. However this function does not guarantee that the coded data are secured. There are three features of SQRC: 

Locking up of encoded data. SQRC can be read only by specific types of scanners.



Composite of public and private data. Data for SQRC consist of public part and private part. With SQRC, it is possible to store 2 control levels of information in one code.

20 

Appearance and apparent properties of regular QR Code retained. Appearance of SQRC is no different from the regular QR Code. Functionalities that come with the regular QR Code including error correction function are all retained.

2.3.6

Logo Q

LogoQ is a new type of QR Code created to enhance visual recognizability by combining it with letters and pictures in full colour. Since LogoQ is a highly designable type of QR Code, it becomes possible to differentiate LogoQ from the regular QR Code. A proprietary logic is used when generating LogoQ codes. The purpose of LogoQ is to combine designability and readability. Figure 2.15 shows regular QR Code embbed with letters and colour to create Logo Q.

Figure 2.15: QR Code embed with letters and colour to create Logo Q [16]

2.4

Image File Types

There are two types of image file compression algorithms, lossless and lossy. Lossless compression algorithms reduce file size while making a perfect copy of the original uncompressed image. Generally, lossless compression results in larger files than lossy compression and it should be use to avoid accumulating stages of recompression when editing images.

21 Lossy compression algorithms preserve a representation of the original uncompressed image that may appear to be a perfect copy, but it is not a perfect copy. Often lossy compression is able to achieve smaller file sizes than lossless compression because lossy compression algorithms allow for variable compression that trades image quality for file size.

2.4.1

JPEG

JPEG (Joint Photographic Experts Group) is a lossy compression technique. It is usually the compressed images and stored in the JPEG File Interchange Format (JFIF). The JPEG/JFIF filename extension is JPG or JPEG. JPEG applies lossy compression to images, which can result in a significant reduction of the file size. Applications can determine the degree of compression to apply, and the amount of compression affects the visual quality of the result. When not too great, the compression does not noticeably affect or detract from the image's quality, but JPEG files suffer generational degradation when repeatedly edited and saved. Besides that, JPEG are cross platform, meaning the same file will look the same on both Mac and PC [18].

2.4.2

TIFF

TIFF (Tagged Image File Format) is one of the most popular and flexible of the current

public

domain

raster

file

formats

[19].

It

is

using

either

the TIFF or TIF filename extension. The tagged structure is designed to be easily extendible, and many vendors have introduced proprietary special purpose tags with the result that no one reader handles every flavour of TIFF file. TIFFs can be lossy and lossless. Some offer relatively good lossless compression for bi-level (black and white) images. Some digital cameras can save images in TIFF format, using the LZW compression algorithm for lossless storage. TIFF image format is not widely supported by web browsers but remain widely accepted as a photograph file

22 standard in the printing business. The TIFF format is widely supported by imagemanipulation applications, by publishing and page layout applications, and by scanning, faxing, word

processing, optical

character

recognition and

other

applications [19]. TIFF can handle device-specific colour spaces, such as the CMYK defined by a particular set of printing press inks. OCR (Optical Character Recognition) software packages commonly generate some forms of TIFF image for scanned text pages.

2.4.3

RAW

RAW refers to raw image formats that are available on some digital cameras, rather than to a specific format. These formats usually use a lossless or nearly lossless compression, and produce file sizes smaller than the TIFF formats. Although there is a standard raw image format which is ISO 12234-2, TIFF/EP, the raw formats used by most cameras are not standardized or documented, and different among camera manufacturers. Most camera manufacturers have their own software for decoding or developing their raw file format, but there are also many third-party raw file converter applications available that accept raw files from most digital cameras. Some graphic programs and image editors may not accept some or all raw file formats, and some older ones have been effectively orphaned already.

2.4.4

GIF

GIF (Graphics Interchange Format) is limited to an 8-bit palette, or 256 colours. This makes the GIF format suitable for storing graphics with relatively few colours such as simple diagrams, shapes, logos and cartoon style images. The GIF format supports animation and it is widely used to provide image animation effects. Its LZW lossless compression is more effective when large areas have a single colour, and less effective for 24-bit colour photos. For graphics of only few colours, GIF can be much smaller than JPEG, with more clear pure colours than JPEG.

23 2.4.5

BMP

The BMP file format (Windows bitmap) handles graphics files within the Microsoft Windows OS. Typically, BMP files are uncompressed, and therefore BMP storing image information allows for crisp, high-quality graphics, but also produces large file sizes. Their advantage is their simple structure and wide acceptance in Windows programs and OS/2 [18]. The BMP file format is capable of storing 2D digital images of arbitrary width, height, and resolution, both monochrome and colour, in various colour depths, and optionally with data compression, alpha channels, and colour profiles. The JPEG and GIF formats are also bitmaps, but use image compression algorithms that can significantly decrease their file size. For this reason, JPEG and GIF images are used on the Web, while BMP images are often used for printable images.

2.4.6

PNG

The PNG (Portable Network Graphics) file format is created as a free, open-source alternative to GIF. The PNG file format supports 8 bit palette images and 24 bit true colour or 48 bit true colour with and without alpha channel. PNG is designed to work well in online viewing applications like web browsers and can be fully streamed with a progressive display option. Besides that, PNG provides a patent-free replacement for GIF and can replace many common uses of TIFF. Indexed-colour, grayscale, and true colour images are supported, plus an optional alpha channel. PNG can store gamma and chromaticity data for improved colour matching on heterogeneous platforms.

24 2.5

Dual-watermark Techniques

In this section, MOHANTY [20] Dual-watermarking Technique for Images and HSU & WU Technique [21] Dual-watermarking with QR Code Applications in Image Processing technique are reviewed.

2.5.1

MOHANTY Dual-watermarking Technique

In 1999, a version of Dual-Watermarking algorithm was released in a paper: “A Dual-watermarking Technique for Images [20]”. In this watermarking algorithm, a visible and an invisible watermarking are both embedded into host image. Firstly, a visible watermark is merged into host image in order to create a watermarked image. Host image (one to be watermarked) I and the watermark (image) W are divided into block. Let 𝑖𝑛 donate the 𝑛𝑡ℎ block of the original image I and 𝑤𝑛 donate the 𝑛𝑡ℎ block of watermark W. For each block ( 𝑖𝑛 ), the local statistics; mean µ𝑛 and variance 𝜎𝑛 are computed. The image mean gray value µ is also found out. Watermarking is done blockwise. A watermarked image block is obtained by modifying 𝑖𝑛 as follows. 𝑖𝑛 = 𝛼𝑛 𝑖𝑛 + 𝛽𝑛 𝑤𝑛 ,

n = 1, 2…

Where 𝛼𝑛 and 𝛽𝑛 are scale and embed factors respectively, depending on µ𝑛 and 𝜎𝑛 of each block. At invisible watermarking part, a pseudo-random binary-sequence {0,l} of period N is generated using linear shift register. The period N is equal to the number of pixels of the image. Then the watermark is generated by arranging the binary sequence into blocks of size 4×4 or 8×8. After that start with bit-plane k=O (MSB) of the image I’. The watermark is EX-ORed with the 𝑘 𝑡ℎ bit-plane of the image. This gives the 𝑘 𝑡ℎ bit-plane for watermarked image. All bit-planes (EX ORed and non-EX ORed) of the image I’ are merged to obtain final watermarked image I”.

78

REFERENCES

[1]

Yeung, M.M. (1997). Digital Watermarking for High-Quality Imaging, Proc. IEEE First Workshop on Multimedia Signal Processing, New Jersey, pp. 357362.

[2]

Borko, F. (2011). Handbook Of Augmented Reality, Springer, pp.341-349.

[3]

Denso-Wave.

(2011).

QR

Code

Features,

Retrieved

from

:

http://www.qrcode.com/en/

[4]

Scott, M.C. (2000). Hiding Information in Images: An Overview of Watermarking,

Cryptography

Research

Paper.

Retrieved

from

:

http://www.cim.mcgill.ca/~scott/RIT/CryptoPaper.html

[5]

Tirkel, A.Z., Rankin, G.A., Schyndel, R.M.V., Ho, W.J., Mee, N.R.A. and Osborne, C.F. (1992). Electronic Water Mark. DICTA 93, Macquarie University, pp.666-673.

[6]

Gao, X.B., Yuan, Y., Cheng, D. and Li, X.L. (2011). Lossless data embedding

using

generalized

statistical

quantity

histogram,

IEEE

Transaction on circuits and systems for video technology, vol. 21, No. 8, pp. 1061-1070.

[7]

Vidyasagar, M.P., Song, H. and Elizabeth, C. (2005). A Survey of Digital Image Watermarking Techniques, 3rd IEEE International Conference on Industrial Informatics (INDIN), pp.709-713.

79 [8]

Masoud, N., Ronak, K. and Hojat, A.H. (2012). Short Communication on Digital Watermarking in Images. Shaneh Branch Islamic Azad University. Vol (2), No (4), pp.220-223.

[9]

Pranab, K.D. and Kim, J.M. (2011). Digital Watermarking Scheme Based on Fast Fourier Transformation for Audio Copyright Protection International Journal of Security and Its Applications, Vol. 5 No.2 , pp.33-48.

[10]

Petitcolas, F.A.P., Anderson, R.J. and Kuhn, M.G. (1999). Proceedings of the IEEE, Volume 87, Issue 7, pp.1062-1078.

[11]

Jaspreat, K. and Karmjeet, K. (2012). Digital Watermark : A Study. International Journal of Advanced Research in Computer Science and Software Engineering. Volume 2, Issue 8

[12]

Ruanaidh, Boland, F. and Dautzenberg, C. (1995). Watermarking Digital Images for Copyright Protection, Proc. IEE Conf. Image Processing and It’s Applications, pp.87-94.

[13]

Vanwasi, A.K. (2011). Digital Watermarking-Steering the future of security. Retrieved from: http://www.networkmagazineindia.com/200108/security1. html

[14]

Yue, L., Yang, J. and Ming, J.L. (2008,). Recognition of QR Code with mobile phones, Control and Decision Conference Chinese, pp. 203-206.

[15]

Denso-Wave. (2012). “Version and Maximum Capacity Table”. Retrieved from: http://www.qrcode.com/en/about/version.html

80 [16]

Denso ADC. (2011). “ QR Code Essentials.” Retrieved from: http://www.nacs.org/LinkClick.aspx?fileticket=D1FpV AvvJuo%3D&tabid=146&mid=4802

[17]

Phaisarn, S. and Wichian, P. (2010). QR Code Generator Eighth International Conference on ICT and Knowledge Engineering. Thailand, pp. 90-101.

[18]

Murray, James, D., Van, R. and William. (1996). Encyclopedia of Graphics File Formats (Second ed., pp. 1152-1169.

[19]

Pachghare, V.K. (2005). Comprehensive Computer Graphics: Including C++. Laxmi Publications, pp. 93-97.

[20]

MOHANTY, S.P. (1999). A Dual-watermarking Technique for Images, Proc. 7th ACM International Multimedia Conference, ACM-MM’99, Orlando, USA, pp. 49-51.

[21]

Hsu, F.H. and Wu, M.H. (2012). Dual-watermarking by QR Code Applications in Image Processing, 9th International Conference on Ubiquitous Intelligence and Computing, pp. 638-643.

[22]

Gersho, A. and Gray, R.M. (1993). Vector Quantization and Signal Compression. Boston, MA: Kluwer, pp. 159-165.

[23]

Chen, T.S. (1998). A virtual image cryptosystem based upon vector quantization. IEEE Trans. Image Process, 7(10), pp. 1485-1488.