100% found this document useful (1 vote)
419 views53 pages

Final Project New

VISUAL SECRET IMAGE SHARING USING ERROR DIFFUSION A PROJECT REPORT Submitted by "SRIRAMACHANDRAN.R.S" and "VIGNESH.S" in partial fulfillment for the degree of BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE and ENGINEERING.

Uploaded by

gopi_96
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
419 views53 pages

Final Project New

VISUAL SECRET IMAGE SHARING USING ERROR DIFFUSION A PROJECT REPORT Submitted by "SRIRAMACHANDRAN.R.S" and "VIGNESH.S" in partial fulfillment for the degree of BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE and ENGINEERING.

Uploaded by

gopi_96
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 53

VISUAL SECRET IMAGE SHARING USING ERROR DIFFUSION

A PROJECT REPORT Submitted by

SRIRAMACHANDRAN.R.S (9907004266) VIGNESH.S (9907004300) SUGAN.K (9907004271) in partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY in
COMPUTER SCIENCE & ENGINEERING

KALASALINGAM UNIVERSITY (KALASALINGAM ACADEMY OF RESEARCH & EDUCATION) KRISHNANKOIL 626190


MAY 2011

KALASALINGAM UNIVERSITY (KALASALINGAM ACADEMY OF RESEARCH & EDUCATION) KRISHNANKOIL 626190 BONAFIDE CERTIFICATE
Certified that this project report VISUAL SECRET IMAGE SHARING USING ERROR DIFFUSION is the bonafide work of SRIRAMACHANDRAN.R.S (9907004266),VIGNESH.S (9907004300), SUGAN.K (9907004271) who carried out the project work under my supervision.

SIGNATURE

SIGNATURE

Dr.D.DEVARAJ., HEAD OF THE DEPARTMENT

Mr.S.VEERAMANI., SUPERVISOR

Kalasalingam University Anand Nagar, Krishnankoil-626190 Viruthunagar District

Kalasalingam University Anand Nagar, Krishnankoil-626190 Viruthunagar District

Submitted for the project viva-voce held on: _____________

INTERNAL EXAMINER
1

EXTERNAL EXAMINER

ACKNOWLEDGEMENT We give all the glory and thanks to our ALMIGHTY GOD who showered the necessary and grace upon us for accomplishing the project. I express my sincere gratitude to our beloved vice-chancellor Dr.S.RADHAKRISHNAN Ph.D., for all his valuable advice to make this project a great success. We extent our profound thanks to Dr.D.DEVARAJ., Head of the Department, COMPUTER SCIENCE &ENGINEERING, for his valuable suggestion throughout the project work. We express project a successful one. We project are filled with utmost gratitude to thank our our sincere complete thanks to our

project coordinator K.KIRUTHIKA.,M.E., Lecturer, for encouraging us to make our

guide Mr. S.VEERAMANI M.E., Lecturer, for her superlative efforts and

espousals without which our project work would have been stand still for a while without undergoing completion. I wish to express my thanks and gratitude to my family and beloved ones and all the staff members of Department of computer science & engineering for having heled me so generously with their valuable and constructive suggestions to improve the project and provide steady support.

ABSTRACT

Halftone visual cryptography (HVC) enlarges the area of visual cryptography by the addition of digital halftoning techniques. In particular, in visual secret sharing schemes, a secret image can be encoded into halftone shares taking meaningful visual information.

The decoded image shows the secret contrast loss. In this paper, a new HVC scheme

image with 50% is introduce to

overcome the drawback. The secret image is binary valued shares while these shares

concurrently embedded into are halftoned by error diffusion

the workhorse standard of halftoning algorithms.

Error diffusion has low complexity and provides halftone shares with good image quality. A reconstructed secret image, obtained by stacking qualified shares together, does not suffer from cross interference of share images.

TABLE OF CONTENTS

CHAPTER NO

TITLE ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATION INTRODUCTION 1.1 Objective 1.2 About HVC SYSTEM ANALYSIS 2.1 Existing System 2.1.1 Drawback 2.2 Proposed System 2.2.1 Advantage 2.3 Problem Description SYSTEM SPECIFICATION 3.1 Software Requirements 3.2 Hardware Requirements 3.3 Methodology 3.3.1 Rapid Prototyping LANGUAGE DESCRIPTION 4.1 About Mat lab 4.2 Interface with other languages 4.3 Features 4.4 Development Environment 4.5 File I/O and external interfacing 4.6 Performance 4.7 About Visual Basic 4.7.1 Features PROJECT DESCRIPITION SYSTEM DESIGN 6.1 System Design 6.2 Algorithm 6.2.1 Error Diffusion 6.2.2 Analysis of ED Algorithm 5 6.2.3 Parallel ED 6.3 Phase Description

PAGE NO. iv vii viii ix 1 1 3 4 4 4 5 5 5 8 8 8 9 9 10 10 10 11 12 12 13 13 13 15 20 20 20 20 22 22 24

1.

2.

3.

4.

5. 6.

LIST OF TABLE

S.NO. 1

TABLE NO. 6.3

TABLE NAME Phase Description

PAGE NO. 24

LIST OF FIGURES
7

S.NO. 1 2 3 4 5 6 7 8

FIGURE NO. 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.2.7 8.2.8

FIGURE NAME PAGE NO.

Transmission side form Reception side form Before error diffusion Error diffusion Encrypt the secret image Sending of the image Receiving of output image View of the secret image

33 34 35 36 37 38 39 40

CHAPTER 1 INTRODUCTION Objective


Cryptography is the practice and study of hiding information. Modern cryptography intersects the disciplines of mathematics, computer science, and electrical engineering. Applications of cryptography include ATM cards, computer passwords, and electronic commerce.It to the modern age was almost synonymous with encryption, the conversion of information from a readable state to apparent nonsense. The sender retained the ability to decrypt the information and therefore avoid unwanted persons being able to read it. Since WWI and the advent of the computer, the methods used to carry out cryptology have become increasingly complex and its application more widespread. Before the modern era, cryptography was concerned solely with message confidentiality (i.e., encryption)conversion of messages from a comprehensible form into an incomprehensible one and back again at the other end, rendering it unreadable by interceptors or eavesdroppers without secret knowledge .Encryption was used to (attempt to) ensure secrecy in communications, such as those of spies, military leaders, and diplomats. In recent decades, the field has expanded beyond confidentiality concerns to
9

1.1

include techniques for message integrity checking, sender/receiver identity authentication, digital signatures, interactive proofs and secure computation, among others

Visual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decryption can be performed by the human visual system, without the aid of computers. It demonstrated a visual secret sharing scheme, where an image was broken up into n shares so that only someone with all n shares could decrypt the image, while any n-1 shares revealed no information about the original image. Each share was printed on a separate transparency, and decryption was performed by overlaying the shares. When all n shares were overlaid, the original image would appear. If each pixel in the original image is split randomly into two shares as described above, the shares are correlated together. Still, when each individual share is considered alone , it is a totally random collection of blocks. Given only one share, a second share can be crafted to reveal any possible image; therefore, individual shares reveal no information about the original image. Visual Cryptography is a paradigm for cryptographic schemes that allow the decoding of concealed images without any cryptographic computation. Particularly in a -out-of- visual secret sharing (VSS) scheme, a secret image is cryptographically encoded into n shares. Each share resembles a random binary pattern.
10

1.2 About HVC

Visual cryptography encodes a secret binary image (SI) into n shares of random binary patterns. If the shares are xeroxed onto transparencies, the secret image can be visually decoded by superimposing a qualified subset of transparencies, but no secret information can be obtained from the superposition of a forbidden subset. The binary patterns of the n shares, however, have no visual meaning and hinder the objectives of visual cryptography. Extended visual cryptography was proposed recently to construct meaningful binary images as shares using hypergraph colourings, but the visual quality is poor. In the proposed HVC methods, pixels that carry the secret image information are predetermined before a halftone share is generated. These pixels are then naturally embedded into the halftone shares when the grayscale images are halftoned. Error diffusion, a simple and widely used halftone method that yields a good compromise between the image quality and the computational complexity

11

CHAPTER 2 SYSTEM ANALYSIS 2.1 Existing System


Halftone visual cryptography (HVC) enlarges the area of visual cryptography by the addition of digital half toning techniques.

In visual secret sharing schemes, a secret image can be encoded into halftone shares taking meaningful visual information. The scheme is secure and very easy to implement.

2.1.1 Drawbacks of Existing System


The decrypted image is fluctuated from the original image in size. Also the output image is reducing in contrast.

12

2.2 Proposed System


In this proposed system the method error diffusion is used to overcome the limitation in the HVC method The contrast of the image is improved by this method, the decrypted image is equally relative to original image and it is better than HVC image. Error diffusion has low complexity and provides halftone shares with good image quality.

2.2.1 Advantage of Proposed System

The output image is reducing in contrast.

It is very easy to implement A reconstructed secret image, obtained by stacking qualified shares together, does not suffer images. from cross interference of share

2.3 Problem Description

13

The HVC proposed by Zhi Zhori and Gonzalo R. Arce is enlarges the area of visual cryptography by the addition of digital halftoning techniques. In particular, in visual secret sharing schemes, a secret image can be encoded into halftone shares taking meaningful visual information. In this proposed system visual cryptography method based on Error diffusion. Error diffusion has low complexity and provides halftone shares with good image quality. A reconstructed secret image, obtained by stacking qualified shares together, does not suffer from cross interference of share images. Error diffusion is a simple, yet efficient algorithm to halftone a grayscale image. The quantization error at each pixel is filtered and fed back to a set of future input samples. The first component is the thresholding block where the output g(m, n) is given by

The threshold t(m,n) can be position-dependent. The second component is the error filter h(k,i) whose input e(m,n) is the difference between d(m,n) and g(m,n). Finally, we can compute as

14

As an example, the widely used FloydSteinberg error filter , where indicates the current pixel. The weights of the filter are given by , The recursive structure indicates that the quantization error e(m,n) depends not only on the current input and output but also on the entire past history. The error filter is designed in such a way that the low frequency Difference between the input and output image is minimized.

The error that is diffused away by the error filter is high frequency or blue noise in nature, leading to visually pleasing halftone images. As will be described all the shares in our proposed HVC method are generated by a constrained error diffusion based on the algorithm introduced above. In the second construction method to be

introduced shortly, it is necessary to generate mutually exclusive sets of pixels. To this end, the method of error diffusion is modified so as to produce multitone output pixels where the pixels of each tone are assigned to a pixel set. Multitone error diffusion is obtained by simply replacing the thresholding block by a multilevel quantization block in halftone error diffusion. The number of output levels
15

of the quantization block is the same as the number of tones of the multitone image.

Multitone error diffusion can generate multitone images where the pixels of each tone are homogeneously distributed. The multitone error diffusion algorithm used here for the generation of mutually exclusive pixel sets. This algorithm jointly optimizes the distribution of multitone pixels by locating the pixels of different tones in a correlated fashion so that the mutual interference between different tones is minimized and multitone pixels are well separated from each other.

CHAPTER 3 SYSTEM SPECIFICATION 3.1 Software Requirements The software required for the system is as follows
Language Front End Tool Back End Tool Operating System : Matlab 7.4 : Visual Basic : Matlab 7.4 : Windows XP, Windows 7
16

3.2

Hardware Requirements
Monitor

: 1024*768 minimum resolutions of 256


colors

Processor Input

: Atleast 2GHz Intel Core 2 processor : Two or Three button mouse and standard 104 Keyboard. : 40 GB : 512MB RAM

Hard Disk Primary Memory

3.3 Methodology

3.3.1 Rapid Prototyping


The methodology deployed for the development of this project is prototyping. This is one of the best options to develop real time projects. The applications which are to be built in the quick space of time can be effectively created using this method. First of all, a model of the application is examined with the minimal and sufficient requirements. Then the application further evolves based on the user views about the model. Due to this end user can get a clear picture of what and how the product will look like and the programmer can

17

accommodate changes easily. Hence this method of specification development was chosen for this project.

CHAPTER 4 LANGUAGE DESCRIPTION 4.1 About MATLAB

MATLAB (for matrix laboratory) is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, and Fortran.

18

Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An additional package, Simulink, adds graphical multi-domain simulation and Model-Based Design for dynamic and embedded systems. In 2004, MATLAB had around one million users across industry and academia. MATLAB users come from various backgrounds of engineering, science, and economics. MATLAB is widely used in academic and research institutions as well as industrial enterprises.

4.2 Interface with other Language


MATLAB can call functions and subroutines written in the C programming language or Fortran. A wrapper function is created allowing MATLAB data types to be passed and returned. The dynamically loadable object files created by compiling such functions are termed "MEX-files" (for MATLAB executable). Libraries written in Java, ActiveX or .NET can be directly called from MATLAB and many MATLAB libraries are implemented as wrappers around Java or ActiveX libraries. Calling MATLAB from Java is more complicated, but can be done with MATLAB extension, which is sold separately by Math Works, or using an undocumented mechanism called JMI (Java-to-Mat lab Interface), which should not be confused with the unrelated Java Metadata Interface that is also called JMI.As alternatives to the MiPads based Symbolic Math Toolbox available from Math Works, MATLAB can be connected to Maple or Mathematical.
19

4.3 Features
MATLAB can call functions and subroutines written in the C programming language or Fortran. A wrapper function is created allowing MATLAB data types to be passed and returned. The dynamically loadable object files created by compiling such functions are termed "MEX-files" (for MATLAB executable). Libraries written in Java, ActiveX or .NET can be directly called from MATLAB and many MATLAB libraries (for example XML or SQL support) are implemented as wrappers around Java or ActiveX libraries. Calling MATLAB from Java is more complicated, but can be done with MATLAB extension, which is sold separately by MathWorks, or using an undocumented mechanism called JMI (Java-to-Matlab Interface), which should not be confused with the unrelated Java Metadata Interface that is also called JMI. As alternatives to the MuPAD based Symbolic Math Toolbox available from MathWorks, MATLAB can be connected to Maple or Mathematica.

4.4. Development Environment

Editor highlighting enhanced to show all uses of a variable or sub function and identify shared variables Ability to manage ZIP files as folders in the Current Folder Browser File previews in Current Folder Browser that show image file contents and unsaved content in MATLAB files

20

Access to additional toolbox plots in the Plot Selector, including plots for System Identification, Mapping, and Bioinformatics Toolboxes Comparison Tool enhanced, allowing comparison among ZIP files, folders, and Simulink manifests, and improving MAT-file comparisons

4.5 File I/O and External Interfacing

New VideoWriter object

for creating Motion JPEG and

uncompressed AVI files larger than 2 GB netCDF 4.0.1 support, enabling use of HDF5 as the data storage layer for the netCDF API

Enhanced interface to Microsoft .NET framework, supporting delegates and interaction with Microsoft Office products

4.6 Performance
Ability to perform FFTs on vectors larger than 2 GB Multithreaded computation support for sort, filter, bsxfun, sparse matrix QR decomposition, gamma functions, and error functions Sparse matrix performance improvements for basic math, binary and relational operators, and exponential functions

4.7 About Visual Basic


Visual Basic (VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for
21

its COM programming model. Visual Basic is relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic, but perform differently

4.7.1 Features
Like the BASIC programming language, Visual Basic was designed to be easily learned and used by beginner programmers. The language not only allows programmers to create simple GUI applications, but can also develop complex applications. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality. Since default attributes and actions are defined for the components, a simple program can be created without the programmer having to write many lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this has become less of an issue. The language is garbage collected using reference counting, has a large library of utility objects, and has basic object oriented support. Since the more common components are included in the default project template, the programmer seldom needs to specify additional libraries. Unlike many other
22

programming languages, Visual Basic is generally not case sensitive, although it will transform keywords into a standard case configuration and force the case of variable names to conform to the case of the entry within the symbol table. String comparisons are case sensitive by default, but can be made case insensitive if so desired.

CHAPTER 5 PROJECT DESCRIPTION


Visual Cryptography is a paradigm for cryptographic schemes that allow the decoding of concealed images without any cryptographic computation. Particularly in a -out-of- visual secret sharing (VSS) scheme, a secret image is cryptographically encoded into n shares. Each share resembles a random binary pattern. The n shares are then copied onto transparencies, respectively, and distributed among n participants. The secret images can be visually revealed by stacking together any or more transparencies of the shares and no cryptographic computation is needed. However, by inspecting less than shares, one cannot gain any

23

information about the secret image, even if infinite computational power is available. Aside from the obvious applications to information hiding, VC can be applied to access control, copyright protection watermarking, visual authentication and identification. To illustrate the principles of VSS, consider a simple 2-out-of-2 VSS scheme shown. Each pixel p taken from a secret binary image is encoded into a pair of black and white sub pixels in each of the two shares. If p is white/black, one of the first/last two columns tabulated under the white/black pixel in is selected. The selection is random such that each column is selected with 50% probability. Then, the first two sub pixels in that column are assigned to share 1 and the following two sub pixels are assigned to share 2. Independent of whether is black or white is encoded into two sub pixels of blackwhite or whiteblack with equal probabilities. Thus an individual share gives no clue as whether is black or white. If the pixel p is black, the preposition of the two shares outputs two black sub pixels corresponding to a gray level 1. If is p white, it results in one white and one black sub pixel, corresponding to a gray level 1/2. Then by stacking two shares together, we can obtain the full information of the secret image. The 2out-of-2shows a secret binary image SI to be encoded. According to the encoding rule, each pixel p of SI is split into two sub pixels in each of the two shares, superimposing the two shares leads to the output secret image. The decoded image is clearly identified, although some contrast loss occurs.

24

The width of the reconstructed image is twice that of the original secret image since each pixel is expanded to two sub pixels in each share. The 2out-of-2 VSS scheme demonstrated above is a special case of the k-out-of- n VSS scheme proposed an optimal contrast -out-of- scheme to alleviate the problem of contrast loss in the reconstructed images designed a more general model for VSS schemes based on general access structures. An access structure is a specification of all the qualified and forbidden subsets of shares. The participants in a qualified subset can recover the secret image while the participants in a forbidden subset cannot. The concept of VSS has also been extended such that the secret image can be a gray scale image rather than a binary image. The aforementioned VC methods all have the disadvantage that the shares consisting of random pixel patterns do not take any visual information and may lead to suspicion of secret information encryption. Shares showing meaningful images are more desirable in terms of the steganography aspect. To alleviate this problem, developed the method of extended visual cryptography (EVC). In EVC, the shares not only contain the secret information, but are also themselves meaningful halftone images. Secret images can still be decoded when qualified shares are stacked together. Shares in an EVC scheme, however, provide very low quality visual information and suffer from low contrast between per graph black and white pixels. Then extended the EVC approach to natural gray scale images to improve the image quality. Generated halftone shares that carry visual information by using joint visual cryptography and watermarking to generate meaningful halftone
25

images by using threshold arrays .The major shortcomings with these methods are that either the security property is not strictly guaranteed or the decoded image is not immune to the interference from the share images. To produce halftone shares that can carry signification visual information halftone visual cryptography (HVC) based on the principle of void and cluster dithering .Compared with EVC, the image quality of the shares is greatly improved and the reconstructed image contains much less cross interference from the share images. The HVC method inserts the pixels carrying secret information into preexisting encoded halftone shares. While this method is effective at generating shares with pleasing visual results, it is computationally expensive. Moreover, using the void and cluster algorithm to choose the pixels to be modified may make the positions of the modified pixels dependent on the content of the original halftone image. As a result, the reconstructed image may bear residual features of the original halftone images. The method has the disadvantage that a pair of complimentary shares is required to prevent the share visual information from showing on the decoded image. To further improve the image quality of the halftone shares and completely remove the cross interference of the share images on the reconstructed image, novel HVC construction methods are proposed in this paper. Instead of modifying halftone images to encode secret information, it is shown that it is viable to concurrently halftone gray scale images and encodes the secret information into the halftone images.

26

In the proposed HVC methods, pixels that carry the secret image information are predetermined before a halftone share is generated. These pixels are then naturally embedded into the halftone shares when the gray scale images are halftone. Error diffusion, a simple and widely used halftone method that yields a good compromise between the image quality and the computational complexity is employed in this paper as the underlying half toning algorithm. Error diffusion then halftones the input gray scale images but does not change the predetermined pixels. When half toning a gray scale image, error diffusion diffuses away the quantization error into the neighboring gray scale pixels so that a visually pleasing halftone image is obtained. In our approach, encoding of the secret information imposes extra constraints on the error diffusion. However, the additional quantization error introduced by the encoding of the secret information is diffused away by error diffusion to the neighboring gray scale pixels. Thus, visually pleasing halftone shares can still be obtained. Three methods are developed to make the reconstructed image immune to the interference from the share images. The first method employs a complementary halftone image pair. The second method deliberately introduces homogeneously distributed black pixels into each share, which has the advantage that complementary image pairs are not needed. The third method exploits the fact that the half toning of the gray scale images alone may generate a sufficient number of black pixels to satisfy the contrast condition of image decoding. A black pixel is deliberately introduced only when a sufficient number of black pixels have not yet been produced. Thus, complementary shares are also not required. With fewer constraints on error diffusion, the third method has the potential to obtain shares showing natural images with fine details.
27

CHAPTER 6 SYSTEM DESIGN 6.1 System Design


Design is concerned with identifying system components specifying relationship upon components. Specifying system structure and providing architecture for development files. Modularity is one of the desirable properties of the large systems. It implies that system is divided into several parts in such a manner the interaction between parts is minimal clearly specified, this wing ill help the implementation of the system. Moreover, this will guide the future changes in the system to satisfy the future requirements. This system design can be subdivided into as follows
28

Input design Output design Code design

6.2 Algorithm 6.2.1 Error Algorithm


Error diffusion algorithms that is used in many computer graphics and image processing programs. Error diffusion is a technique for displaying continuous tone in digital images on devices that has limited colors (tone) range. Printing an 8 bit grey scale image to a black and white printer is problematic. The printer, being a bi-level device, cant print the 8 bit image natively. It must stimulate multiple shares of grey by using an approximation technique. The basic error diffusion algorithm does its work in the following base. 1) Determine the output value given the input value of the current result this often uses quantization or in binary case thresholding. 2) For an 8 bit grey scale image that is displayed on a 1 bit output device, all input devices in range [0,127] are to be displayed as 0. 3) Input value between [128,255] is to be displayed as a 1 on the output device.

29

4) Once the output values are determined, the code computes the error between what should be displayed on the output device and what is actually displayed. 5) Assume the input pixel value 168 given that is greater than our threshold value(128) it determine that output value will be a 1, this value is stored in the output array. 6) To compute the error, the program must normalize output first, so it is in the same scale as input value. Finally the error value is distributed on a fractional basis to neighboring pixel in the region.

6.2.2 Analysis of the ED Algorithm


At first glance, one might think that error diffusion algorithm is an inherently serial process. The conventional approach distributes error to neighboring pixels as they are computed. As a result, the previous pixels error must be known in order to compute the values of the next pixels. This interdependency implies that the code can only process one pixel at a time. Its not that difficult, however, to approach this problem in a way that is more suitable to a multithreaded approach.

6.2.3 Parallel ED
30

To transform the conventional error diffusion algorithm into an approach that is more conducive to a parallel solution, consider the different decomposition that was covered previously. Given that a pixel may not be processed until its spatial predecessors have been processed, the problem appears to lend itself to an approach where we have a producer-or in this case, multiple producers-uses to compute the proper output pixels. The flow of error data to the current pixel is critical. Therefore, the problem seems to break down into data-flow decomposition. Now that we identified the approach, the next step is to determine the best pattern that can be applied to this particular problem. Each independent thread of execution should process an equal amount of work. One way, based on the algorithm presented in the previous section, would be to have a thread that processed the even pixels in a given row, and another thread that processed the odd pixels in the same row. This approach is ineffective however; each thread will be blocked waiting for the other to complete, and the performance could be worse than in the sequential case. To effectively could the work among threads, we need a way to reduce the dependency between pixels. Thus once these pixels immediately to the left on the current rows. Thus, once these pixels are processed, the current pixels may complete its processing. This ordering suggests an implementation where each thread processes a row of data. Once a row has completed processing of first few pixels, the thread responsible for the next row may begin its processing. Notice that a small latency occurs at the start of each row. This latency is due to the fact that the previous rows error data must be calculated before
31

the current row can be processed. These types of latency are generally unavoidable in producer-consumer implementation; however you can minimize the impact of the latency. The trick is to derive the proper workload partitioning so that each thread of execution works as efficiently as possible. In this case you incur two-pixels latency before processing of the next thread can begin. An 8.5 * 11 per row. The two-pixel latency is insignificant here.

6.3 Phase Description

32

PHASE Phase 1 Phase 2 Phase 3 Phase 4

TASK Analysis Literature survey Design Implementation

Phase 5 Documentation

DESCRIPTION Analyze the information given in the IEEE paper. Collect raw data and elaborate on literature surveys. Assign the module and design the process flow control Implement the code for all the modules and integrate all the modules Prepare the document for this project with conclusion and future enhancement

6.4 Dataflow Diagram


Dataflow is the movement of data in a system from point of origin to a specified destination indicated by lines or arrows. Dataflow diagram is the graphical representation of data movement process and files used in support of information system. The dataflow diagram is one of the most important tools used by system analysis. One of the important feature of DFDs is that it is logical rather than physical. The elements of the system do not depend on vendor or
33

hardware. They specify in precise, concise, manner the working of the system and how it hangs together. Unlike detail flow chart dataflow diagram not supplied detailed description of the module but graphically describes a systems data and how the data interact with the system.

SI Rename to HVC

Halftoning process

Encryption

Generation of halftone

Encrypted image

Decryption

Decrypted image

DFD diagram for generating halftoning


34

CHAPTER 7 SYSTEM TESTING 7.1 Software Testing


Testing is the process of executing a program with the intent of finding an error. A successful test in one that uncovers on as yet undiscovered errors. Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design coding, testing is a process of executing a program with intent of finding an error The objective of software testing is to uncover errors. To fulfill this objective, a series of test steps-unit, integration, validation and system test are planned and incorporation of module into program. Testing is the integral part of the software process and activity that must be carried put throughput the life cycle. Is testing is conducted successfully will uncover errors on the software. As the benefit testing demonstrates that the software function appears to be working according to specification and performance requirements appear to have been met. Here the term verification and validation refers to the process of determining where a phase has been correctly carried out and intensive evolution process that place just before the product is delivery to the customer.
35

7.2 Types of Testing 7.2.1 Unit Testing


Unit testing focuses verification effort on the smallest unit of the software design. In this testing, each module is tested to be working satisfactorily as the expected output from the module.

Test Cases
Our project consists of three modules. All the modules were unit tested. And the three units are Haftoning generation Encryption Decryption

Unit 1
Input Output : The secret image has to insert into its corresponding location. : The halftone is generated.

Unit 2
Input Output : The Halftoning secret image : Encrypted image

Unit 3
Input Output : The Encrypted secret image : Original image

36

7.2.2 Integration Testing All the three modules are integrated and tested. The data transfers among various modules are verified so that create no bugs and function as excepted. Test Cases Input Output : The Halftoning process and then the encryption and the decryption of secret images takes place. : Encrypted and Decrypted secret images are displayed 7.2.3 Validation Testing Validation testing is used to demonstrate that the software functions in a manner that can be reasonably expected by the customer. Test Cases (i) Input : The secret image must be correctly renamed. (ii) Output : The secret image is successfully halftoned.
37

(i) Input : The secret image is not renamed. (ii) Output : The image is not halftoned.

38

CHAPTER 8 IMPLEMENTATION AND RESULTS


8.1 Module Description: There are three main modules like 1. Halftone 2. Secret Image Transmission 3. Receiving of Secret Image The Explanation for both the modules are described below.

8.1.1 Halftone
Halftone is the reprographic technique that simulates continuous tone imagery through the use of dots, varying either in size, in shape or in spacing. Where continuous tone imagery contains an infinite range of colors or greys, the halftone process reduces visual reproductions to a binary image that is printed with only one color of ink. This binary reproduction relies on a basic optical illusionthat these tiny halftone dots are blended into smooth tones by the human eye. At a microscopic level, developed black and white photographic film also consists of only two colors, and not an infinite range of continuous tones.

Halftoning is also commonly used for printing color pictures. The general idea is the same, by varying the density of the four primary printing colors, cyan, magenta, yellow and black any particular shade can be reproduced. Error diffusion is a type of halftoning in which residual is distributed to neighboring pixels that have not yet been processed. the
39

quantization Its main use is to convert a multi-level image into a binary image, though it has other applications. Unlike many other halftoning methods, error diffusion is classified as an area operation, because what the algorithm does at one location influences what happens at other locations. This means buffering is required, and complicates parallel processing. Point operations, such as ordered dither, do not have these complications. Error Diffusion has the tendency to enhance edges in an image.

After the distribution of SIPs is generated, the next step is to assign the values to all the SIPs. This procedure only depends on the underlying VC scheme. Under the k-outof-n VC scheme, the basis matrices S0 and S1 are constructed first. Then we construct the matrix collections C0 and C1from the basis matrices To produce the halftone share , a greyscale image is provided. Let f(m,n) be the (m,n) pixel of the grayscale image, then the input to the threshold block is

The generation of the complementary share in method 1 is as follows. The SIPs in the complementary share are decided by the VSS scheme, as in other shares, but the non-SIPs are obtained by reversing the non-SIPs in a primary share. The

40

resultant share is still a structured halftone.

8.1.2 Secret Image Transmission This is the main page for the transmission for the secret image. After transmission in the secret image the following process is to do. Click the error diffusion command button the picture is resized to 512*512. If the error diffusion button is clicked the resized image is converted to halftone shares using error diffusion method. In this process the image is encrypted and it has to save in the Location D:\HVC and this to be send. The browse command button is clicked, and then the output image is click to send.

BEFORE ERROR DIFFUSION FOR ERROR DIFFUSION ENCRYPT THE SECRET IMAGE 8.1.3 Receiving of Secret Image

41

The image that is to be sent will be received here. The image is displayed when the output button is clicked. The image that send to be received here,this form is used to view the output image.

8.2 Result 8.2.1 Screen Shots 8.2.1 Transmission side form

This is the main page for the transmission for the secret image. After transmission in the secret image the following process is to do.

BEFORE ERROR DIFFUSION FOR ERROR DIFFUSION ENCRYPT THE SECRET IMAGE
42

After this process send the secret image.

8.2.2 Reception side form

The image that is to be sent will be received here. The image is displayed when the output button is clicked.

43

8.2.3 Before error diffusion

Click the error diffusion command button the picture is resized


to 512*512.

44

8.2.4 Error diffusion

If the error diffusion button is clicked the resized image is converted to halftone shares using error diffusion method.

45

8.2.5 Encrypt the secret image

In this process the image is encrypted and it have to save in the Location D:\HVC and this to be send.

46

8.2.6 Sending of the image

The browse command button is clicked, then the output image is click to send.

47

8.2.7 Receiving of output image

The image that send to be received here,this form is used to view the output image.

48

8.2.8View of the secret image

Finally the output image is displayed and it stored in the Location D:\HVC
49

CHAPTER 9 CONCLUSION AND FUTURE ENHANCEMENT

9.1 Conclusion
This method is better to send the image in very secure manner, because it based on error diffusion that can generate shares taking pleasing visual information. Error diffusion is used to construct the shares such that the noise introduced by the preset pixels is diffused away when halftone shares are generated. The homogeneous and isotropic distribution of the preset pixels imposes the least noise in the error diffusion, thus leading to shares with high image quality.

9.2 Future Enhancement


We are going to implement in the military in order to provide security in sharing of the maps. We are also going to implement in the color image.
50

REFERENCE
[2] Z. Zhou, G. R. Arce, and G. Di Crescenzo, (Aug. 2006), Halftone visual [1] M. Naor and A. Shamir, (1995) ,Visual cryptography, Advances in

cryptography: EUROCRYPT94, LNCS, vol. 950, pp. 112.

cryptography, IEEE Trans. Image Process., vol. 15, no. 8, pp. 24412453, [3] L. A. MacPherson, (2002), Grey level visual cryptography for general

access structures, M.S. thesis, University of Waterloo, Ontario, Canada. [4] T. C. Chang and J. P. Allebach, (Nov.2003) Memory efficient error

diffusion, IEEE Trans. Image Process., vol. 12, no. 11, pp. 13521366.

51

52

You might also like