Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Introduction of Image Authentication Techniques & Avs

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

CHAPTER 1

INTRODUCTION OF IMAGE AUTHENTICATION


TECHNIQUES & AVS

1.1 Overview of IMT


This report explores the various techniques used to authenticate the visual data recorded by the
automatic video surveillance system. Automatic video surveillance systems are used for continuous
and effective monitoring and reliable control of remote and dangerous sites. Some practical issues
must be taken in to account, in order to take full advantage of the potentiality of VS system. The
validity of visual data acquired, processed and possibly stored by the VS system, as a proof in front
of a court of law is one of such issues. But visual data can be modified using sophisticated
processing tools without leaving any visible trace of the modification. So digital or image data have
no value as legal proof, since doubt would always exist that they had been intentionally tampered
with to incriminate or exculpate the defendant. Besides, the video data can be created artificially by
computerized techniques such as morphing. Therefore the true origin of the data must be indicated
to use them as legal proof. By data authentication we mean here a procedure capable of ensuring
that data have not been tampered with and of indicating their true origin.
There are two types of authentication schemes, which are-
1. Cryptographic data authentication.-
2. Watermarking-based authentication.

In this report an attempt is made to present the basic features of the image authentication
techniques.

1.2 Automatic Visual Surveillance system (AVS)


Automatic Visual Surveillance system is a self monitoring system which consists of a Video
camera unit, central unit and transmission networks. A pool of digital cameras is in charge of frame
the scene of interest and sent corresponding video sequence to central unit. The central unit is in
charge of analyzing the sequence and generating an alarm whenever a suspicious situation is
detected.

1
Fig. 1.1 Automatic Visual Surveillance System
Fig 1.1 shows the blocks of automatic visual surveillance system consisting of central unit,
transmission network, security service provider.
Central unit also transmits the video sequences to an intervention centre such as security service
provider, the police department or a security guard unit. Somewhere in the system the video
sequence or some part of it may be stored and when needed the stored sequence can be used as a
proof in front of court of law. If the stored digital video sequences have to be legally credible, some
means must be envisaged to detect content tampering and reliably trace back to the data origin.

1.3 Authentication Techniques


Authentication techniques are performed on visual data to indicate that the data is not a forgery;
they should not damage visual quality of the video data. At the same time, these techniques must
indicate the malicious modifications include removal or insertion of certain frames, change of faces
of individual, time and background etc. Only a properly authenticated video data has got the value
as legal proof. There are two major techniques for authenticating video data. They are as follows:

1.3.1 Cryptographic Data Authentication


It is a straight forward way to provide video authentication, namely through the joint use of
asymmetric key encryption and the digital Hash function. Cameras calculate a digital summary
(digest) of the video by means of hash function. Then they encrypt the digest with their private key,
thus obtaining a signed digest which is transmitted to the central unit together with acquired
sequences. This digest is used to prove data integrity or to trace back to their origin. Signed digest
can only read by using public key of the camera.

2
1.3.2 Watermarking- based authentication
Watermarking data authentication is the modern approach to authenticate visual data by
imperceptibly embedding a digital watermark signal on the data. Digital watermarking is the art and
science of embedding copyright information in the original files. The information embedded is
called ‘watermarks ‘. Digital watermarks are difficult to remove without noticeably degrading the
content and are a covert means in situation where copyright fails to provide robustness.

3
CHAPTER 2
CRYPTOGRAPHY

2.1 Introduction of Cryptography


Mounting concern over the new threats to privacy and security has lead to wide spread adoption of
cryptography. Cryptography is the science of transforming documents. It has mainly two functions:
¨ Encryption
¨ Decryption
The purpose of encryption is to render a document unreadable by all except those who authorize to
read it. Cryptographers refer to the content of the original document as plain text. Plain text is
converted in to cipher form using an algorithm and a variable or key. The key is a randomly
selected string of numbers.

Fig.2.1 Encryption & Decryption


Fig 2.1 shows block diagram of encryption and decryption of document consisting of encryption
key, encryption algorithm, decryption algorithm.
Only after decoding the cipher text using the key the content of the document is revealed to the
common people.
Encryption schemes are classified in to:
1. Symmetric encryption
In which the same key is used to both encode and decode the document.
2. Public key or asymmetric encryption
It requires a pair of keys: one for encrypting the plain text and the other for decrypting the cipher
text. A file encrypted with one key of a pair can be decrypted with other key of the same pair.

4
Digital images have been widely used in our community. Such massive amount digital images have
been recently applied in forensic science, such as we can figure out features of suspects or
characteristic marks of criminal vehicles. However, with proper computer software, we can modify
or duplicate those image data easily. If those modification or duplication is unauthorized, it will
make us doubtful when submitting digital images as evidence in court. To guarantee the
reproductivity, all processes or steps taken by forensic examiners have to be documented or
recorded in detail, such as dodging, burning, color balancing, contrast adjustment, unsharp
masking, multiimage averaging, integration, or Fourier analysis, and so on, when dealing with
digital image evidence to provide integrity protection. Nevertheless, those documents and records
still cannot prohibit the malicious or criminal obfuscation from altering the content of the digital
evidence effectively and completely. Therefore, in order to assist the examination and analysis of
digital image evidence by forensic examiners in the laboratory, we propose a robust and convenient
technology to improve this situation. The technology is based on cryptography and effectively
enhances the strength of power of evidence. The proposed technology creates a unique code as a
‘fingerprint’ or ‘digital signature’ to be with an image. Therefore, we can easily figure out if anyone
tampers with the evidence content. In cryptography, one of the techniques to produce a message
authentication code is based on using hash functions. A hash function provides additional security
properties to make it suitable for use as a primitive in various information security applications,
such as authentication and meddage integrity. Hash functions are widely used to protect password
contents and interactive authentication in the internet. Even a single bit changed in the input
message, though, will produce a different hash value. In this paper, we apply this important
property to provide integrity protection.

2.2 Cryptographic Data Authentication


To authenticate visual data each video camera is assigned a different public or private key pair,
with private key hardwired within the cameras. A document encrypted with the private key of any
particular camera can be decrypted with its own public key. This property is used to provide centre
authentication that is to trace back to the true origin of the data. Before sending the video sequence
to the central unit, cameras calculate a digital summary or digest of the video by means of a proper
hash function. The digest is then encrypted with their private key. Encryption is done by
considering the digitized value of the brightness of each pixel. Digital signal is a sequence of zeros
and ones and it is encrypted with the private key using a proper algorithm. The signed digest thus
obtained is then transmitted to the central unit together with the acquired visual sequence. Later the
signal digest is used to prove data integrity or to trace back to their origin. The signed digest is read

5
using the public key of the camera which produce the video and check if it corresponds to the digest
derived from the decrypted video content using the same hash function.

Fig.2.2 Cryptographic Method

Fig. 2.2 shows steps of cryptographic method. Any manipulation of the data will change the
calculated image digest derived from the decrypted data. Any discrepancy between the decrypted
digest and calculated image digest indicate that the data has been tampered, with identical digest
indicates that the data is genuine. Value of the visual data can be added by tying each frame to the
particular label of the instant the frame has been produced yet. This can be achieved by printing
date and time of creation of each frame. Any modification of either the date or time could be easily
revealed since it would change the locally calculated image digest.

2.3 Hash Algorithms


Hash functions are widely used to protect password contents and interactive authentication in the
internet. Even a single bit changed in the input message, though, will produce a different hash
value. In this paper, we apply this important property to provide integrity protection. There are
many well-known and documented hash algorithms: MD (Message-Digest algorithm) [2,], MD5
(Message-Digest algorithm 5) [~], SHA-0 [ ], SHA-1[ ], and RIPEMD-160 [10] in information
security domains. Here, we briefly summarize those hash algorithms.

6
2.3.1 MD family
In 1 2, Ronald L. Rivest successively proposed two hash algorithms named MD and its revised
version, MD5.In cryptography, MD5 is widely-used hash function with a 12 -bit hash value as
output. The input is operated in 512-bit blocks. The MD5 algorithm is designed to be quite fast on
2-bit machines. In addition, it does not require any large substitution tables, that is, it can be coded
quite compactly. MD5 is slightly more complex and slower than MD, but it improves the security
level in design.

2.3.2 SHA family


The secure hash algorithm (SHA) family is a set of related cryptographic hash functions and
introduced by the National Institute of Standards and Technology (NIST). SHA-0, the first member
of SHA, was published in 1991. HA-1, an improved version of SHA-0, was published in 1 5. Four
variant models have been issued by NIST with increased output ranges and a slightly different
design: SHA-22, SHA-256, SHA- , and SHA-512. The SHA-1 algorithm is based on principles
similar to MD message digest algorithm. It operates on message blocks of 512 bits for which a 160-
bit digest is produced. Because the SHA-1digest is 2 bits longer than the MD5 digest, SHA-1 is
considerably stronger against attacks. In addition, SHA-1 involves 0 steps to produce a 160-bit
buffer compared to 12 -bit buffer from MD5. Thus, SHA-1 is slower than MD5.

2.3.3 RIPEMD-160
The RIPEMD-160 algorithm was developed by the framework of the EU project RIPE (RACE
Integrity Primitives valuation), and first published in 1 6. The group originally developed a 12 -bit
version of RIPEMD, which in turn was based upon the design principles used in MD, and is similar
in performance to the more popular SHA-1. There also exist 12, 256 and 20-bit versions of this
algorithm, called RIPEMD-12, RIPEMD-256, and RIPEMD- 20, respectively. The 12 -bit version
had been found to have questionable security. And the 256 and 20-bit versions don􀂧t have higher
levels of security as compared to RIPEMD-12 and RIPEMD-160. The RIPEMD-160 also takes
input as a message in 512-bit blocks and return to a 160-bit message digest as output. The added
complexity and number of steps of SHA-1and RIPEMD-160 does bring about a slow computation
on comparing to MD5. Table 1 [ ] summarizes features of MD5, SHA-1, and RIPEMD-160. We
compare the performance of MD -like hash functions: RIPEMD-160, RIPEMD-12, RIPEMD,
SHA-1, MD5, and MD in Table 2[11]. The implementations are written in assembly language
optimized for the Pentium processor (0 MHz). It is assumed that both code and data resides in the
onchip caches. Under these conditions the cycle figures are independent of the clock speed, and the
throughput figures scale with the clock speed. In this report, we select MD5 as a model to apply to
7
our system because of its faster operation speed than SHA-1 and RIPEMD-160. We describe the
method in session 2 and describe our experiments in session. Finally, we give our discussion.

Table 1 comparison of MD5, SHA-1, and RIPEMD-160

2.4 Methods
2.4.1 Hash Functions
Hash functions [ ], H (M), have been used in computer science and information security for a long
time. They compress an arbitrary-length input, M, to a string of small and fixed length arbitrarily
which generally called hash value (message digest), h, can replace the authenticity of a large
amount of information (message) by the authenticity of a much smaller hash value. The hash value
is a set of a short string of random looking letters and numbers.
A hash function must have the following properties:
1. H can be performed to any block of data in any size.
2. H produces a small and fixed length of output.
For any generated h, it is computationally infeasible to find any M to conform that H (M) =h in
mathematics. (One-way property). For any input, M, it is computationally infeasible to find M’ to
conform that H (M) =H (M’). 5. For any pair (M, M’), it is infeasible to find H (M) =H (M’) in
mathematics. The third property is the "one-way property". That means the function works in one
direction and it's nearly impossible to derive the original text from the string. A one-way hash
function is used to create digital signatures, which in turn identify and authenticate the sender and
message of a digitally distributed message (hence the name one-way). A good one-way hash
function is also collision-free. That means it is hard to create two inputs with the same hash value.

2.4.2 Message Digest 5 Algorithm


The MD5 message-digest algorithm was developed by Ron Rivest at MIT and published in April 1
2. MD5 evolved from its precursor, MD. The algorithm processes a block of data of arbitrary length

8
and produces as output a 12 -bit message digest of the input. The input is processes in 512-bit
blocks. Fig. 1 shows the flow chart of how MD5 works.
The overall structure of a typical secure hash function indicated in Fig. 5.2. If we have an arbitrarily
large message as input and that we want to find its message digest. The processing involves the
following steps:

2.4.2.1 Bit-padding
After some initial processing, the message is padded so that its length is 6 bits. The process of
padding is a single 1-bit added to the end of the message. Padding is always continued, even if the
length of the message is just what we want. For instance, if the input message is bits long, we pad
512 bits to a length of 60 bits. Thus the range of padding bits is from 1 to 512.

2.4.2.2 Length-appending
After padding, a 6 -bits binary representation of the original length of the message (before adding)
is concatenated to the result of step 1. The bits of the message are extracted successively to form
the first 512-bit block. The expanded message will exactly be a multiple of 512-bits. Assume the
length of the message is greater than 26, and then only the low-order 6 bits will be used. Let the
expanded message be represented as a sequence of L 512-bit blocks Y0, Y1... Yq... YL-1 . Note
that in the figure, IV and CV represent initial value and chaining variable respectively.

2.4.3 MD buffers initialization


A 12 -bit buffer in MD5 is used to hold intermediate and final results of hash function. The buffer
consists of four 2-bit registers (represented as A, B, C, and D). Thus, if we want to initialize the 12
-bit buffer, the relationship equates to initialize four 2-bit registers. Then these registers are
initialized to the following 2-bit integers in hexadecimal:
A=6 52 01
B=EFCDAB
C= BADCFE
D=10 25 6
The values are stored in little-endian format, which means that the least significant byte of the word
is arranged in the low-address byte position. The initialization values are shown as follows:
Word A: 01 2 5 6
Word B: 89AB CD EF
Word C: FE DC BA98
Word D: 6 5 2 10
9
Fig. 2.3 Flow chart of how MD5 works.

Fig. 2.3 explains how MD5 hash algorithm works and what steps do this algorithm consists of .

10
Fig. 2.4 General Structure of Secure Hash Code

Fig 2.4 shows the general structure of SHA (Secure Hash Algorithm), which consists of various
blocks, compression function, message digest.

2.4.4 Message-processing
This is the most important step of the function. It includes four rounds of processing. The module
includes found rounds of processing shown as HMD5 in Fig.3.4and the four rounds have similar
structure, but each uses different primitive logical functions (PLFs), referred to as F, G, H and I.
Round 1: F (B, C, D) = (B^C) 􀇅 ((􃛡B) ^D)
Round 2: G (B, C, D) = (B^D) 􀇅 (C^ (􃛡D))
Round: H (B, C, D) =B􀃳C􀃳D
Round: I (B, C, D) =C􀃳 (B􀇅 (􃛡D))
(Where 􀃳, ^,, and 􃛡 represent the logical
XOR, AND, OR, and NOT operations, respectively)
Each round consists of a sequence of 16 steps and each step makes use of one-fourth of a 6
-element table T [1 ... 6] constructed from the sine function. The ith element denote T[i], which is
equal to the integer part of 232 times abs (sin (i)), where i is in radians. The table provides a
11
randomized set of 2-bit integers to eliminate the regularities in the input data. Each round also takes
as input the current 512- bit block (Yq) and the 12 –bit buffer value ABCD and updates the
contents of the buffer. The output of the final round is added to the input of the first round (CVq) to
produce CVq+1.The addition is done for each of the four words in the buffer with each of the
corresponding words in CVq, using addition modulo 232

2.4.5 Hash values output


After all L 512-bit blocks have been processed, we obtain the output from Lth stage is the 12 -bit
message digest (hash value).

Fig. 2.5 Message Digest Generation Using MD5

12
Fig.2.6 MD5 compression function

Fig. 3.6 explains the compression function in MD5 hash algorithm. It has one input which divides
in to 4 parts. Each step has 16 steps and at the end all output from last step are EXORed and we get
the hashed output.

13
Fig2.7 Elementary MD5 Operation (single step).

Fig 2.7 elaborates the elementary steps of MD5 operation, consisting of 4 blocks, F/G/H/I function.

2.5 Drawbacks of Cryptographic Authentication


Even though cryptographic data authentication is highly resistant to content tampering, it suffers
from few drawbacks. They are as follows:

1. Knowledge of private key


If the manipulator knows the private key of the camera, he can change the digest to involve the
modifications he had made on the actual sequence. But the possibility of such a thing is very small
because the private key is hardwired within the camera.

2. Impossible to distinguish between malicious and innocuous modification

14
It is difficult to distinguish between malicious and innocuous manipulations if cryptography is
used. Innocuous modifications include compression of the video sequences. These modifications
are usually performed by the central unit whereas digest is calculated on the basis of the
uncompressed data by the camera. So on compression the correspondence between the digest and
data would be lost.
3. High requirements of video camera
To avoid the above discussed problem, the video camera should perform the compression of the
video sequences prior to digest calculation. This requires the video camera to have high
computation as storage requirements.
4. Delay in transmission
Digest calculations and encryption introduces a delay in transmission of video documents. This is
harmful in system where the timely generation of alarm is critical.
5. Protecting privacy is difficult
A part of the program cannot be removed for privacy reasons since it will alter the calculated
digest.

15
CHAPTER 3
WATERMARKING

3.1 Introduction of Watermarking


A digital watermark is a signal that is imperceptibly embedded within digital data. This signal can
be detected or extracted by means of computations to make some assertions about the host data.
Digital watermark is a signal which added to a document to authenticate it and to prove the
ownership. A commonly encountered digital watermark is the logo most television channels display
on the top of the television screen. Not only does it advertise the channel but also provides the legal
benefit of having a source signature persist during video recording.
A digital Watermark is a digital signal or pattern inserted into a digital image. Since this
signal or pattern is present in each unaltered copy of the original image, the digital Watermark may
also serve as a digital signature for the copies. The desirable characteristics of a Watermark are
 Watermark should be resilient to standard manipulations of any nature.
 It should be statistically irremovable
Every Watermarking system consists at least two different parts:

 Watermark Embedding Unit


 Watermark Detection and Extraction Unit
In this paper, we discuss an algorithm for embedding and detecting the Watermark in a
still image. A robust, secure, invisible Watermark is imprinted on the image I, and the
Watermarked image WI, is distributed. The author keeps the original image I. To prove that an
image WI' or a portion of it has been pirated, the author shows that W' contains his Watermark (to
this purpose, he could but does not have to use his original image I). The best a pirate can do is to
try to remove the original W Watermark (which is impossible if the Watermark is secure).
There can be another way out for the pirate, as to embed his signature in the image. But this does
not help him too much because both his "original" and his Watermarked Image will contain the
author's Watermark (due to robustness property), while the author can present an image without
pirate's Watermark. Thus, the ownership of the image can be resolved in the court of law.
A digital Watermark is a digital signal or pattern inserted into a digital image. Since this signal or
pattern is present in each unaltered copy of the original image, the digital Watermark may also
serve as a digital signature for the copies.
A given Watermark may be
 Unique to each copy (e.g., to identify the intended recipient), or
 Be common to multiple copies (e.g., to identify the document source)
16
In either case, the Watermarking of the document involves the transformation of the original into
another form. This distinguishes Digital Watermarking from Digital Fingerprinting, where the
original file remains intact, but another file is created that “best describes" the original file's
content. As a simple example, the Checksum field for a disk sector would be a fingerprint of the
preceding block of data. Similarly, Hash Algorithms produce fingerprint files. Digital
Watermarking is also to be contrasted with Public-Key Encryption, which also transforms original
files to another form. It is a common practice nowadays to encrypt digital documents so that they
become un-viewable without the decryption key. Unlike encryption, however, Digital
Watermarking leaves the original image or basically intact and recognizable. In addition, Digital
Watermarks, as signatures, may not be validated without special software. Further, decrypted
documents are free of any residual effects of encryption, whereas Digital Watermarks are designed
to be persistent in viewing, printing, or subsequent re-transmission or dissemination

3.2 Properties of Digital Watermark


1. Perceptually invisible
2. Robustness
3. Cost
4. Capacity
5. Recoverable
6. Reversible
7. Undetectable
8. Able to determine the true owner
9. High bit rate

3.3 Classification of Watermarking Authentication Schemes

Fig.3.1 Types of Watermarking

17
The characteristics of watermarking system largely depend on its application scenario. For instant
copy write protection application require that the watermark is robust against most common data
manipulation, i.e. its presents can still be detected after non-destructive transformation of host
document. Two approaches for watermarking data authentication are possible:
1. Fragile watermarking
2. Robust watermarking
Fragile watermarking refers to the case where watermark inserted within the data is lost or altered
as soon as host data undergoes any modification. Watermark loss or alternation is taken as evidence
that data has been tampered with, whereas the information contained within data used to
demonstrate data origin In case of robust watermarking a summary of the candidate frame or video
sequence is computed and is inserted within the video sequence. Information about the data origin
is also with the summary. To prove data integrity the information conveyed by the watermark is
recovered and compared with the actual content of the sequence. Their mismatch is taken as an
evidence of data tampering. The capability to localize the manipulation will depend on the
summary of which is embedded in to the image.

3.4 Robust Versus Fragile Watermark


Semi fragile watermark is more mature than robust watermarking. Tamper localization is easier in
fragile watermarking but it is difficult to distinguish between malicious and innocuous
manipulations.
Image authentication by means of robust watermarking is very promising with regards to the
distinction between malicious and innocuous manipulations. The robustness of such technique
depends on the number of bits that can be hidden in to the image.

3.5 Requirements of Watermarking Based V Data Authentication


In order to highlight the peculiarities of VS data authentication. Let us consider the most common
requirements for watermarking authentication techniques:
1. The authentication technique must not deteriorate the visual quality of data quality.
2. The authentication technique should be able to identify any unauthorized processing acquired to
visual data.
3. The authentication technique should not consider innocuous manipulation, e.g., image
compression and zooming, as valid authentication attacks.
4. It should be difficult for unauthorized person to forge an authenticated image.
5. The authentication checking procedure should be easily performed by authorized persons.
6. The authentication checking procedure should localize data tampering.
18
By considering particular cases the requirement for the authentication of VS data are following:
3.5.1 The Invisibility Constraint
The requirement on the deterioration of the visual quality of authenticated data is usually referred to
us as invisibility constraint.
The authentication technique must not deteriorate the visual quality of data. In this VS case
however this is not crucial issue since VS do not exhibit a quality comparable that of visual data
used in a media. VS data acquired by inexpensive, low quality devices. Visual analysis would
possibly be carried out in a low court will focus on the semantic content of the image, rather than
on their visual quality

3.5.2 Malicious Versus Innocuous Manipulations


The authentication technique should be able to identify any no authorized or malicious processing
occurred to the visual data. Besides the authentication technique should not consider innocuous
manipulation E.g.: Image compression or Zooming, as valid authentication techniques.
When data compression is done in central unit the authentication is performed before compression
and must survive it. To satisfy privacy complaints, some processing is done on the authenticated
video, before it is stored. E.g. for obscuring the faces of persons which are unimportant on the law
point of view. This kind of processing as to be considered as innocuous. On the other side, the
same processing procedure as to be considered as malicious when information that is important for
a court law is removed.
A solution to this problem is offered by authentication techniques capable of localizing
manipulations. Once the modification is precisely localized, it will be up to the court law to decide
if it is malicious of innocuous.

3.5.3 Other Requirements


The authentication checking procedure should be easily performed by authorized person and it
should be difficult for non authorized person to forge an authenticated image.

3.5.4 VS – Specific Requirements


Since water marking is performed inside the video camera, water mark embedding should not have
high computational demands and should be compressing resistant. To ensure data integrity, the
video sequence is tied to the time and date it has been produced. The easiest way to detect the
removal of one or more frames although alternation of the original frame order is to embed on each
image a serial number before authenticating tools are applied. In fact such a number can neither be
removed nor modified without affecting the authentication check, this making it impossible to
19
remove or change the position of any frame of the sequence. By embedding in each frame the time
and date of its creation in dissoluble link is created between the sequence content and the time
instant, so that legal value of the sequence is completely preserved.
The embedded water mark can be made to depend on the frame number and to bear time
information. Frame exchange or substitution would thus be easily detected and acquisition time can
be reliably extracted. In figure below a sketch of a simple VS system in which water marking is
used to authenticate VS data in its raw form is given. Time, date and frame serial number are over
written to every single frame before authentication. The authenticated sequence is possessed by a
central unit for detecting pre-alarm situations and then is compressed for storage purposes. In this
case authentication tools should be transparent to the image possessing algorithms applied by the
central unit and resistant to compression.

20
CHAPTER 4
WATERMARKING ALGORITHM

A watermarking algorithm for VS data authentication based on semi-fragile watermarking of each


frame of the video sequence is described in this section. The various steps for the watermarking
process are as follows.
4.1 Watermark Generation and Embedding
Watermark generation aims at producing a binary or ternary watermark W(X) using a digital key K
and host image f(x). The watermark key corresponds to the image owner or camera that has
captured the image. The block diagram of watermark generation and embedding is shown below.

Fig.4.1 Block diagram of watermark generation and embedding

In the proposed method as indicating in the Fig. 4.1 the watermark generation by using a pseudo
random number generator and appropriate thresholding.
The watermark key used for watermarking a specific frame in the sequence is composed of the
camera id and frame number. Generating the watermark key using frame number provides the
advantage of producing frame–dependent watermarks.
In this case, frame removal or frame substitution can be easily detected as non authentic. To
perform authenticity check, the detection should first know the frame number in the sequence
which is always zero. Watermark embedding is performed by altering all the pixels of the original
frame according to the following formula.
Fw(x) = f(x) if w(x) = 0
g1 (f(x), n(x)) if w(x) =-1
g2 (f(x), n(x) if w(x) =1
Where g1g2 are suitably designed function based on x.
n(x) denotes a function that depends on neighbourhood of x.
21
The function g1g2 are called embedding function and are selected so as to detect the inverse
detection function. D (fw(x), n(x)). The detection function, when applied to the watermarked
image fw(x), produces the watermark w(x).
D (fw(x), N(x)) = w(x)

4.2 Watermark Detection


In the watermark detection procedure, the detector generates first the water mark for each frame to
be checked. To do so, the id number of camera that produce the sequence and the frame number
are needed.
A detection function D is defined such that by applying the detection function to the watermarked
image a detection image d(x) is produced.
d(x) = D (fw(x), n(x))

Fig. 4.2 Watermark Detection


Now we frame the false detection image given by
Ew(x) = 1if w(x) ≠0 and w(x) ≠d(x) 0 otherwise
The false detection image has value 1 if a watermarked pixel is falsely detected and 0 otherwise.
The watermarked detection ratio is given by the ratio of the correctly detected pixel to the sum of
the watermarked pixels in the image.

4.3 Authentication Check


Authentication check is a two level process. A first level decision on image authenticity is taken by
comparing the watermark detection of the text image with a pre specified threshold T. If the first
level decision test indicates that the image is somehow altered but authentic, a second level decision
test should be performed. This test indicates whether the alternations made on the image are

22
concentrated in certain regions (Malicious tampering) or one spread on the image (innocuous
alternations).

4.4 Techniques for Watermarking


Watermarking techniques tend to divide into two categories, text and image, according to the type
of document to be watermarked. Techniques for images:
The Watermarks can be included in two domains:
1. Spatial Domain
2. Frequency Domain

4.4.1 Spatial Domain


Several different methods enable Watermarking in the spatial -domain. The simplest (too simple for
many applications) is to just flip the lowest-order bit of chosen pixels in a gray scale or color
image. This will work well only if the image will not be subject to any human or noisy
modification. A more robust Watermark can be embedded in 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 then add some fixed intensity value for the Watermark to the varied pixel values
of the image. The resulting Watermark may be visible or invisible depending upon the value (large
or small, respectively) of the Watermark intensity. One disadvantage of spatial domain Watermarks
is that picture cropping (a common operation of image editors) can be used to eliminate the
Watermark. Spatial Watermarking can also be applied using color separation. In this way, the
Watermark appears in only one of the color 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 color band. This approach is used
commercially for journalists to inspect digital pictures from a photo-stock house before buying un-
Watermarked versions

4.4.1.1 The Process


 The Spatial method involves the 2D array of pixels in the container image to hold hidden
data.
 Most common method is known as Least Significant bit method (LSB).

23
 This technique involves replacing the N least-significant bits of each pixel of the container
image with the data of the hidden message.

 The pixels for gray scale images are encoded with 8 bits.
 We swap the higher resolution bits of the container image for the lower resolution bits of the
hidden image.
 The key used by the sender and the receiver is the number of bits N of hidden data
imbedded in each container pixel.

4.4.1.2 Advantages
 It is a well-rounded method and lends itself to a variety of information hiding applications.
 A large quantity of embedded information can be included in even the most modestly sized
images.
 LSB can also allow for the hiding of photographic images and even audio recordings.
 Calculation complexity is relatively low.

4.4.1.3 Disadvantages
 Any attack or noise distortion of the composite image will seriously damage the imbedded
data.
 Cropping or translation of the composite image will destroy an equal portion of the
imbedded image.
 Robustness limits the overall effectiveness.

4.4.2 Frequency Domain


Watermarking can be applied in the frequency domain (and other transform domains) by first
applying a transforms like the Fast Fourier Transform (FFT), Discrete Cosine Transforms (DCT),
Wavelet Transforms etc. Since high frequencies will be lost by compression or scaling, the
Watermark signal is applied to lower frequencies, or better yet, applied adaptively to frequencies
that contain important information of the original picture (feature-based schemes). Since
Watermarks applied to the frequency domain will be dispersed over the entirety of the spatial
image upon inverse transformation, this method is not as susceptible to defeat by cropping as the
spatial technique.
4.4.2.1 The Process Sequence
 Frequency methods encode the data across the global frequencies of the image.
24
 This method enables to achieve greater robustness to attack.
 Two types of information hiding methods are
 Fast Fourier Transform (FFT)
 Discrete Cosine Transform (DCT)
We focus our attention in FFT.
4.4.2.2 The FFT Watermarking
This transformation is a one that converts the time domain signal into a signal of the frequency
domain. The watermarking is now performed over the transformed values instead of the spatial
domain values of the image.
The steps in a nutshell are:
 2D FFT of the original image.
 Isolate the coefficients with the maximum information – similar to denoising
 Then the watermark is embedded
 The inverse transform is applied to get the watermarked image

Fig. 4.3 FFT watermarking

4.5 Spatial Vs Frequency Domain


Spatial watermarking is easy to implement from computational point of view but too fragile to
withstand large varieties of external attacks. Frequency or transformed domain approach offers
robust watermarking but in most cases implementation needs higher computational complexity.
Moreover the transform domain technique is global in nature (global within the block in block-
based approach) and cannot restrict visual degradation of the cover image. But in spatial domain
technique, degradation in image quality due to water marking could be controlled locally leaving
the region of interest unaffected

25
4.6 Implementation:
Algorithm for embedding the watermark:
1. Start the process.
2. Get the text data (e.g. your college name), the original image.
3. Convert the text data to a binary row vector.
4. Scale the binary vector.
5. Create the data mark.
6. Compute the FFT and decompose into the magnitude and phase
7. Create the ring of the data mark ( using loops)
8. Add the ring to the magnitude of the image
9. Reduce the magnitude points where the data bit is zero.
10. Convert the matrix into an image.(i.e. watermarked image)
11. Output the watermarked image.
12. Stop the process.

Algorithm for extraction of watermark:


1.Start the process.
2.Get the watermarked image.
3. Initialize the matrix used in storing the extracted magnitude coefficients.
4. Compute the magnitude of the FFT of the image.
5. Calculate the size of the image.
6. Extract the magnitude coefficients along the circle.
7. Thresholding.
8. Convert to estimated data bits.
9. Convert the bits to a text message.
10. Output the watermark (text).
11. Stop the process.

26
CHAPTER 5
EXPERIMENT

We use some synthetic and real case images in our experiments. The experiments have three parts:
photographs, image authentication and application on forensic examination.
5.1 Photographs
We apply some simple steps on images to examine the change of hash values. We extract a color
image in three color layers of the original image: red (R), green (G), and blue (B) and its gray level
image is shown in Fig. 5.1. Fig.5.2 illustrates the sample for rotation with 0 degrees and its mirror.

27
Fig.5.1 Extract a color image in red (R), green (G), and blue (B) and its gray level image.

Fig.5.2 The sample for rotation and mirror

5.2 Image Authentication


We tamper the content of image evidence unscrupulously with Adobe Photoshop CS. For instance,
we change original numbers of the license plate (6-HH) to new ones (6 6-HH), replace the feature
“ridge ending” with “bifurcation” in the fingerprint analysis and hide the main features of other
images (include equipment on the hood, bloodstain and bite mark) respectively to influence their
power of evidence. Obviously, no matter what a negligible change we operate on original images,
corresponding hash values of modified image are distinct from original ones right away. We show
the results in Fig.5.3

28
29
Fig.5.3 Different hash values produced from original and modified images

5.3 Application on forensic examination

30
Here, we summarize examinational explanations, operating outcomes and the hash values returning
from every step. We take footwear impression and fingerprint as examples to simulate the process
of forensic examination. In our experiment, we need to record all of the hash values except steps
and parameters to reinforce the image authentication. Our suggestion for forensic image
examination steps is shown in Fig. and the result is shown in Fig. 5.4.

Fig.5.4 Our suggestion for forensic image examination steps

31
Fig.5.5 Take footwear impression as example.

32
5.4 Other Applications
1. To protect the intellectual property right of a music publisher who distributes music scores over
digital media. Digital piracy is a serious concern to the musical industry. Customers receive
music in digital data format and such data can be pirated and redistributed very easily. By using
image score watermarking we can prevent this.
2. It can be used for everything from sending e-mail and storing medical records and legal
contracts to conducting on-line transactions.

5.5 Advantages
1. Robustness to high quality lossy image compression.
2. Automatic discrimination between malicious and innocuous manipulations.
3. Controllable visual deterioration of the VS sequence by varying the watermark embedding
power.
4. Watermark embedding and detection can be performed in real time for digital data.

5.6 Disadvantages
1. Frame independent watermark can be easily found by comparative analysis of all image
sequence
frames and then could be easily added again to fake frames.
2. The detector should know the frame number in order to perform authenticity check.

33
CONCLUSION

In these modern eras, visual surveillance system finds application in almost all fields, ranging from
commercial to defences. The video data acquired by VS system are forming vital evidence for
several legal situations. So for such situations, the importance of authenticating their content is very
high. Cryptography and watermarking based authenticating techniques are quite safe and efficient
for this purpose and they are likely to remain for quite for some while. The technology provides a
unique cipher for every single processed image. We can use the unique cipher (check any change of
the cipher) to confirm if the image is modified easily. With the proposed technology, we can
strengthen image authentication effectively.

34
REFERENCES

1. C. Ragazoni, G.Fabri, “Image Authentication Techniques for VS”, Proceedings IEEE, October
2001.
2. “Digital Watermarking for protecting piracy”, Electronics for you, January 2003.
3. “Encryption wars”, IEEE Spectrum, April 2000.
4. M.M.Yeung and F.Mintzer “A watermark for digital image” IEEE Spectrum, April 2002
5. Yeung & Mintzer, “Invisible Watermarking for Image Verification”, J. of Electronic Imaging,

Pp.578-591, July 1998

35

You might also like