Final RP
Final RP
Submitted to the
SCHOOL OF ENGINEERING
BACHELOR OF ENGINEERING
IN
APRIL 2024
BONAFIDE CERTIFICATE
Certified that this project “Predicting College Dropout Rates Using Machine Learning: A Student
Success Initiative” is the bonafide work of [Link] (20602114), [Link] Mishal (20602115) and
M. Masthan (20602123) who carried out the project under my supervision. Certified further, that to the
best of my knowledge the work reported here does not form part of any other project report or
dissertation on the basis of which a degree or award was conferred on an earlier occasion on this or any
other candidate.
SIGNATURE SIGNATURE
VISTAS VISTAS
Chennai – 600 117 Chennai – 600 117
Submitted for the project work and viva - voice examination held on.........................at Vels Institute
of Science, Technology and Advanced Studies (VISTAS), Chennai – 600 117.
S. HARISH (20602114)
M. MASTHAN (20602123)
TABLE OF
CONTENTS
1 INTRODUCTION
1.1 GENERAL 1
1.2 DIFFERENT KIND OF STEGNOGRAPHY 2
1.3 OBJECTIVE 5
1.4 SCOPE OF THE PROJECT 7
1.5 TECHNOLOGY USED 9
1.6 ORGANISATION OF THE PROJECT 11
2 LITERATURE SURVEY
2.1 GENERAL 21
2.5 SUMMARY 28
3 SYSTEM DESIGN
3.1 GENERAL 30
3.3 SEGMENTATIONS 34
3.4 MATHEMATICAL REPRESENTATION
3.5 ADVANCED ENCRYPTION SYSTEM
4 REQUIREMENT ANALYSIS
4.1 FUNCTIONAL
4.2NON FUNCTIONAL
4.3 EXISTED SYSTEM
4.4 PROPOSED SYSTEM
4.5 SOFTWARE DESCRIPTION
4.6 COMMUNICATION
4.7 AUDRINO SOFTWARE
4.8 APPENDIX
5
CONCLUSION
ABSTRACT
It is sometimes not enough to keep the contents of a message secret. It may also be necessary
to keep the existence of the message secret. The new algorithm is based on hiding a audio file
into color JPG image. We have been used adaptive image filtering andadaptive image
segmentation .This concept is based on both visualand statistical methods. High security
layers have been proposed through three layers to make it difficult to break through the
encryption of the input data and confuse steganalysis too. We using Arduino uno
microcontroller to communicate through the Serial communication. To store the IOT platform
Steganography is an art and science of information hiding and invisible communication. It’s unlike
cryptography, where the goal is to secure communications from an eavesdropper by make the data
not understood, steganography techniques strive to hide the very presence of the message itself from
an observer so there is no knowledge of the existence of the message in the first place. In some
situations, sending encrypted information will arouse suspicion while invisible i n f o r m a t i o n w i l l
n o t d o s o . Both sciences can be combined to produce better protection of the information. In this
case, when the steganography To hide a message inside an image without changing its visible
properties, the cover source can be altered in noisy areas with many color variations, so less attention
will be drawn to the modification. The most common methods to make these alterations involve the
usage of the least-significant (LSB). The next interesting application of steganography, in which the
content is encrypted with one key and can be decrypted with several other keys, there lative entropy
between encrypt and one specific decrypt key corresponds to the amount of information.
Digital multimedia data provides a robust and easy editing and modifying of data.
The data can be delivered over computer networks with little to no errors and often without
interference. Unfortunately, digital media distribution raises a concern for digital content owners.
Digital data can be copied without any loss in quality and content. This poses a big problem for the
protection of intellectual property rights of copyright owners. Watermarking is a solution to the
problem. It can be defined as embedding digital data, such as information about the owner,
recipient, and access level, without being detectable in the host multimedia data.
Steganography relies on hiding covert message in unsuspected multimedia data and
is generally used in secret communication between acknowledged parties. Steganography is a
method of encryption that hides data among the bits of a cover file, such as a graphic or an audio
file. The technique replaces unused or insignificant bits with the secret data. Steganography is not
as robust to attacks since the embedded data is vulnerable to destruction.
1.2 DIFFERENT KINDS OF STEGANOGRAPHY:
The four main categories of file formats that can be used for steganography are:
1. Text
2. Images
3. Audio
4. Protocol
1. Text steganography:
Hiding information in text is the most important method of [Link] method
was to hide a secret message in every nth letter of every word of a text message. After booming of
Internet and different type of digital file formats it has decreased in importance. Text stenography
using digital files is not used very often because the text files have a very small amount of
redundant data.
2. Image steganography:
Images are used as the popular cover objects for steganography. A message is
embedded in a digital image through an embedding algorithm, using the secret key. The resulting
stego image is send to the receiver. On the other side, it is processed by the extraction algorithm
using the same key. During the transmission of stego image unauthenticated persons can only notice
the transmission of an image but can’t guess the existence of the hidden message.
3. Audio steganography:
Audio stenography is masking, which exploits the properties of the human ear to hide
information unnoticeably. An audible, sound can be inaudible in the presence of another louder
audible sound .This property allows to select the channel in which to hide information.
4. Protocol steganography:
1.3 OBJECTIVE:
The objective of this project is to provide an efficient data hiding technique and encryption
in which the image and the audio can be retrieved independently.
CHAPTER 2
EXISTING METHOD
2.1 INTRODUCTION
Cryptography has followed man through many stages of evolution. Ancient Egyptian scribe
used non-standard hieroglyphics in an inscription. Hebrew scribes used ATBASH, a reversed
alphabet simple solution cipher.
Key:
Encryption and decryption usually make use of a key, and the coding method is such
that decryption can be performed only by knowing the proper key. Hash functions generate a
digest of the message.
Substitution cipher involves replacing an alphabet with another character of the same
alphabet set. Mono-alphabetic system uses a single alphabetic set for substitutions. Poly-
alphabetic system uses multiple alphabetic sets for substitutions.
FIG:2.2.1 Encryption and decryption process
2.2 CRYPTOGRAPHY
There are several ways of classifying cryptographic algorithms. It will be categorized based on
the number of keys that are employed for encryption and decryption, and further defined by
their application and use. The three types of algorithms that will be discussed are (FIG 2.2):
With secret key cryptography, a single key is used for both encryption and decryption. The
sender uses the key to encrypt the plaintext and sends the cipher text to the receiver. The receiver
applies the same key to decrypt the message and recover the plaintext. Because a single key is used
for both functions, secret key cryptography is also called as symmetric encryption.
Public Key :
The study of modern Public Key Cryptography described a two-key crypto system in which
two parties could engage in a secure communication over a insecure communications channel without
having to share a secret key. It is Uses one key for encryption and another for decryption.
Hash Function:
The hash function is a one way encryption, the hash function is a well defined
procedure or mathematical formula that represents a small size of bits which is generatedfrom
a large sized file, the result of this function can be called hash code or hashes. The generating
of hash code is faster than other methods which make it more desired for authentication and
integrity.
Cryptographic hash functions are much used for digital signature and cheap constructions are
highly desirable. The use of cryptographic hash functions for message authentication has become a
standard approach in many applications, particularly internet security protocols.
The authentication and the integrity considered as main issues in information security,
the hash code can be attached to the original file then at any time the users are ableto check
the authentication and integrity after sending the secure data by applying the hash function to
the message again and compare the result to the sender hash code, if it’s similar that is mean
the message came from the original sender without altering because if there isany changed
has been made to the data will changed the hash code at the receiver side.
3. Methodology for processing plain text.
A block cipher processes the input one block of elements at a time, producing an
output block for each input block. A stream cipher processes the input elements continuously,
producing output one element at a time, as it goes along.
Figure 2.4.1 : Three types of cryptography: secret key, public key, public key, hash function.
2.4 DISADVANTAGE OF CRYPTOGRAPHY :
Cryptography scrambles a message so it cannot be understood.
In Cryptography, a cipher message for instance, might arouse suspicion on the part of
the recipient while an invisible message created with stegnographic methods will
not.
It takes a long time to figure out the code.
If you want to send a code to another person in the past, it will take long time to get
to that person.
Overall cryptography is a long process.
Transmission time for documents encrypted using public key cryptography is
significantly slower.
Transmission of very large documents is prohibitive.
The key sizes must be significantly larger to achieve the high level of protection.
The end result in cryptography is the The end result of information hiding is the
cipher text. stego-medium.
The goal of a secure cryptography is to The goal of secure stegnography methodsis
prevent an cryptographic is to prevent to prevent an observant intermediary from
an intercepter from gaining any even obtaining knowledge of the mere
information about the plaintext from the presence of the secret data.
interchanged ciphertext.
Any person has the ability of detecting The hidden message is imperceptiable to
and modifying the encrypted message. anyone.
Steganography cannot be used to adapt Stegnaography can be used in conjuction
the robustness of cryptographic system. with cryptography by hidng encrypted
message.
Cryptography alter the structure of the Stegnography does not alter the structre of
secret message. the secret message.
OVERVIEW
Hiding the information within an image is most common procedure used at present. Through
the internet secret messages canbe spread easily by inserting the secret message in an [Link]
conceal a message inside an image without altering its visible properties, “noisy” areas which
have color changes can be changed for the cover image .The general technique used to make
the changes engaged is the usage of the Least-Significant Bit (LSB), masking, filtering and
transformations on the cover image
The main aim of the project is to insert more than one bit at each byte in one pixel of the cover-
image and obtain the results like the LSB. This aim can be reached by developing a
Steganography algorithm to hide large amount of any type of information through JPG image
by using maximum number of bits per byte at each pixel. Any type of data can be hidden in a
JPG image which has 24- bits by using the Steganography algorithm. The 24 bits has three
bytes of RGB colors, each byte has four bits called as Nibbles. The highest value is stored in the
left nibble and the lowest value is contained in the right nibble in a byte [1, 2].
At present day, with rapid growth of technology it is much easier to hide messages and on the
other way it is difficult to find out that message. As the technology, is increasing
exponentially, the high demand or growth for steganography seem vast. The project is
focused on the applications that are derived from the use of Communication Engineering.
STEGANOGRAPHY ALGORITHM
CHARACTERISTICS:
Though steganography is most obvious goal is to hide data, there are several other
related goals used to judge a method's steganographic strength. These include;
5. Tamper resistance (message's ability to persist despite active measures to destroy it)
6. Signal to noise ratio (how much data is encoded versus how much unrelated data is
encoded).
ADVANTAGES OF STEGNOGRAPHY OVER CRYPTOGRAPHY:
2. A coded message that is unhidden, no matter how strong the encryption, will arouse
suspicion and may in itself be problematic.
For example, in some countries encryption is illegal. Stego may even be mixed with
encryption so the carrier file actually carries a message that is encrypted. So even if
intercepted, another barrier is presented in trying to break the encryption.
ARCHITECTURE OF STEGNOGRAPHY
1. Data hiding
2. Data extraction.
The sender hides the data and the receiver extracts the data which is sent by the sender.
Figure 3.3
ARCHITECTURE OF STEGNOGRAPHY
3rd laye r of Hiding with steganography algorithm
secur y
Figure 3.4
EMBEDDING PROCESS:
The embedding process is concerned with hiding a secret message within
a cover Work, and is the most carefully constructed process of the two. A great
deal of attention is paid to ensuring that the secret message goes unnoticed if third
party were to intercept the cover Work. The extracting process is traditionally a
much simpler process as it is simply an inverse of the embedding process,
where the secret message is revealed at the end.
1. Secret message - audio file that contains the message you want to transfer
DATA HIDING :
Select Audio
Size of audio
=A
A>3Sh Yes
No
Embedding
Stego Image
Figure 3.5
IMAGE TYPE:
Indexed images : m-by-3 color map
Intensity images : [0,1] or uint8
Figure 3.6
1.
Segmentation Segmentation
method using
proposed
Figure 3.7
ADAPTIVE FILTERING:
Figure 3.8
LOSSLESS COMPRESSION:
Lossless audio formats are most often used for archiving or production
purposes, while smaller lossy audio files are typically used on portable players
and in other cases where storage space is limited or exact replication of the
audio is unnecessary.
Figure 3.9
COVER IMAGE:
Cover image is “filtering the noise” from the original [Link] noise removed
image is called cover image.
Figure 3.10
ENCRYPTION PROCESS :
ADVANCED ENCRYPTION STANDARD
ALGORITHM:
1. [s_ box , inv _s_ box , w , poly_ mat , inv _poly_ mat] = aes _ init
2. Plaintext_ hex={‘00' ‘11' ‘22' ‘33' ‘44' ‘55' ‘66' ‘77' ‘88' ‘99' ‘aa' ‘bb' ‘cc' ‘dd'
‘ee' ‘ff' };
3. Plaintext=hex2dec(plaintext_ hex);
5. Re_ plaintext=inv_ cipher( cipher, w, inv _s_ box, inv _poly_ mat);
AES INITIALIZATION:
The AES initialization [3], produces the substitution tables and generates the s- box
which provides information of the constant vector and exemplary key. In this step two
polynomial matrices are produced [3].
ALGORITHM
3. rcon = rcon_gen;
4. key_hex = {‘00' ‘01' ‘02' ‘03' ‘04' ‘05' ‘06' ‘07' ‘08' ‘09' ‘0a' ‘0b' ‘0c' ‘0e' ‘0f'
};
S BOX GENERATION
The substitution of bytes one by one of the similar finite field is done by the
substitution tables. They use the expanded key functions for the encryption and decryption
for the replacement.
To obtain high speed in the programming it is bit difficult to attain the speed by the
substitution tables. The idea of implementing the s box is for comparison. S box generation
function generates the s boxes by using affine transformation for finding inverse where
applicable .
ALGORITHM
2. mod_pol=bin2dec(‘100011011');
3. inverse(1)=0;
4. for I = 1:255
5. inverse(i+1)=find_inverse(I,mod_pol);
6. end
7. fori=1:256
8. s_box(i)=aff_trans(inverse(i));
9. end
FIND INVERSE:
In the s box generation procedure the initial step is to find the inverse multiplication of all the finite
field elements [3].The declaration of find the inverse is given in the initial step, which is the input
parameter. The input byte and the modulo polynomial are to be inverted according to steps of the
ALGORITHM
2. for 1 = 1:255
4. if prod = =1
5. b_inv=I;
6. break
7. end
8. end
BINARY REPRESENTATION :
A byte is made up of 8 bits, the below example is in the binary
representation which has an index b.10010100b
DECIMAL REPRESENTATION:
The decimal form representation has an index d. In the below
example the conversion from binary to decimal is
performed.1.27+0.26+0.25+1.24+0.23+1.22+0.21+0.20
=128+16+4=148d
bin2dec is a built-in function used in MATLAB [3, 10] to perform
the conversion of binary number to decimal number. In order to
represent the number as string single quotation marks are used .
>>bin2dec(‘10010100')Ans= 148
HEXADEIMAL REPRESENTATION:
A nibble consists of 4 bits and the range of numbers is 0….15 . The
representation of the number are divided in two types. First set is
from 0…9 which is represented normally with index h .The second
set of numbers are from 10….15, whose representation is alphabets
from A…F with index h. Conversion from binary to hexadecimal is
done in the following method. A bye is separated into two nibbles
and each nibble is denoted by its corresponding hexadecimal value
1.x7+0.x6+0.x5+1.x4+0.x3+1.x2+0.x1+0.x0= x7+x4
It is important to note that the polynomials can only be 1's or 0's accordingly.
POLYNOMIAL ADDITION
From the above example the coefficient of the resulting polynomial are other than
0 or 1 ( 2x ) , this representation is a “classical” sum which does not denotea bye
and is not the element belonging to the same finite field [3].The XOR operation
is used for the summation, because the result of XOR sum of two 1'sis 0 and not
2. The below is the description of the Bit-wise XOR operation of two bytes (finite
field elements), which leads to another byte (element of the same finite field) .
JPG image which includes 24– bits (3 bytes of RGB colors), each byte is
separated into two nibbles (four bits). The left nibble contains the highest
value in the byte while the right nibble contains the lowest value in the
byte.
The nibble value is fixed by the interval [0, 15], so that we conclude that
we have 16 levels of a priority, each one represents one main case (MC)
out of 16.
MC=round(Byte colour/16)+1
o where Byte Color∈{ByteRed, ByteGreen, ByteBlue} represents the
value of Color in decimal notation.
SUB CASE:
Sub-case (SC) concept is used to organize the pixel architect. There are
6 SCs. Every MC have a number of SCs.
MCcolor = index
2N
Segh =∑ Val ( PSi
)
i=N+1
o where, Val(PSi) represents the value of the ith character at the
PS.
1. Find the size of non-uniform segments on both directions.
2. Perform segmentation by using column wise indexing on the cover- image
into (Segv xSegh) segments through non-uniform size of segments. The
present algorithm performs hiding into each segment separately
according to row wise scanning.
Figure 3.11
SECURITY REQUIREMENTS :
• New Steganography algorithm by using three layers of security has been
constructed. These layers are developed from previous works to acquire
high security and they work independently to provide unbreakable security
wall .
• Encryption mechanism
Encryption mechanism:
1. Key Expansion
2. InitialRound
3. Rounds
4. Final Round (no MixColumns)
Figure 3.12
1. AddRoundKey [Link]
3. ShiftRows [Link]
Figure 3.13
3. Shift Rows—a transposition step where the last three rows of the state are
shifted cyclically a certain number of steps.
The second layer of security is the adaptive segmentation. The image taken
as the cover image is the bitmap image and that cover image is segmented
randomly of regular or irregular segments based on the password given or any
other identification given by the owner. Irregular segmentation gives more
security for giving the input. A technique known as lossless compression is
applied for the bitmap stego image for sending large files. To reconstruct the
original image exactly lossless compression technique is used .
Figure 3.14
L=length(pw_input);
Aw(i)=str2num(pw_input(i)); Aw(1)=1,Aw(2)=2........Aw(4)=4
End
N=(round(L/2)); N=4/2=2
sv=0;
fori=1:N
i=1:2
End
sh=0;
fori=(N+1):L i=3:4
end
The third layer of security is the pixel selection. The Cover-image pixels
are selected randomly to place the proper byte at its corresponding pixel to embed
the secret data based on the color characteristics of the cover-image. The selection
of the pixels is done by introducing the concept called main cases and sub-cases,
which strength the reduction of noise in a stego-image.
Figure 3.15
Visual Attack:
The visual attack is a stego-only-attack that strips away part of the object in way
that allows for a human to search for visual anomalies. The most common attack
is to display the least significant bit of an object; Digital equipments such as
cameras and scanners are not perfect and often leave echoes in the least significant
bits. These completely random noises indicate the existence of a hidden
message. The average ear can pick up subtle difference in sound. However, this
is a very slow and costly attack.
Statistical Attack:
Statistical attack is similar to visual attack. The fact that most programs relies on
the assumption that least significant bit of a cover file is random and therefore
overwritten with a secret message is not necessarily true. The idea of thestatistical
attack is to compare the frequency distribution of a potential cover filewith the
theoretically expected distribution of the cover file. If the new data does not have
the same statistical profile as the standard data is expected to have, then it
probably contains a hidden message.
Figure 3.15
STEGO
IMAGE
SEGMENT
ATION
SCANNIN
G
EXTRACT
ED
DECRYPT
THE
Figure 3.17
The password does not get embedded in the image, usually. Instead, the
password is used to influence how the hidden information is to be written. Then
when the end user wants to extract the hidden information, they must supply the
password and the password is used to influence how the hidden information
gets read back. If they did not supply the right password, the information
retrieved
will not look correct. If we put in enough error detection coding, you can detect
with relatively high probability whether the data was retrieved correctly.
Then cover image save message as the stego file. It will do the same
when user want to extracting message from stego image: user needs to input
the correct password.
3.8.2 SCANNING :
A scanning pattern is the pattern or order in which the pixels are accessed to
embed data. Instead embedding the first k bits in first pixel, second k bits in
second pixel and so on, the data bits are embedded in a pseudo-random order.
We use three scan methods Raster scan method, snake scan, and Z scan method
each in both horizontal and vertical embedding schemes.
In Raster horizontal scanning method, the secret data is embedded in a row wise
manner. After embedding data in a row, the next row is scanned starting from
the first pixel.
Figure 3.18
3.8.3 EXTRACTED SEGMENT:
The activity of making clear or converting from code into plain text; "a secret key or password is
required for decryption".Decryption is the process of transforming data that has been rendered
unreadable through encryption back to its unencrypted form. In decryption, the system extracts and
converts the garbled data and transforms it to texts and images that are easily understandable not only
by the reader but also by the system. Decryption may be accomplished manually or automatically. It
may also be performed with a set of keys or passwords.
Program
start Add key
(DECRYPT) One-time loop
Check
loop1 Inv
If loop1 is Go to
shift row
Negative, Inv
jump to end shift
InvInv
submix
Else, proceed bytes row
st
after 1
end Key
added
Figure 3.19
1) Very Secure.
2) Reasonable Cost.
3) Main Characteristics
i) Flexibility
ii) Simplicity
AUDIO OUTPUT:
Figure 3.20
4.1Functional Requirements:
A robust method to encrypt a secret speech signal message inside cover image is developed. The secret
key is generated within the encryption algorithm directly according to the entered letters and numbers
at transmitter end. For the decryption of hidden file one has to go through 2512 combinations of
characters and numbers which is very difficult for attackers to hack the secret data. The secret data
will be received by the authorized person at receiver end only when the secret key is entered correctly.
The proposed method is very secure from network hackers as 256 * 2 bit maximum key length can be
used. Every time a new secret key will be generated though the same secret signal entered as the key
developed is stored in the database and compared at transmitter end. This encryption method generates
a robust encryption secret key which provides optimized security for hiding the secret speech data
within the cover image.
Authentication: The process of proving one's identity. (The primary forms of host-to-host
authentication on the Internet today are name-based or address-based, both of which are
notoriously weak.)
Privacy/confidentiality: Ensuring that no one can read the message except the intended
receiver.
Integrity: Assuring the receiver that the received message has not been altered in any way
from the original.
Non-repudiation: A mechanism to prove that the sender really sent this message.
Steganography is the art of hiding the existence of data in another transmission medium to
achieve secret communication . It provides invisible communication. In the present Steganography
algorithm ,two part(data hiding at the sender side and data extracting at the receiver side)
Software Requirements
MATLAB:
4.5 SOFTWARE DESCRIPTION:
MATLAB® is a high-level technical computing language and interactive environment for
algorithm development, data visualization, data analysis, and numerical computation. Using
MATLAB, you can solve technical computing problems faster than with traditional programming
languages, such as C, C++, and Fortran.
Matlab is a data analysis and visualization tool which has been designed with powerful support for
matrices and matrix operations. As well as this, Matlab has excellent graphics capabilities, and its
own powerful programming language. One of the reasons that Matlab has become such an
important tool is through the use of sets of Matlab programs designed to support a particular task.
These sets of programs are called toolboxes, and the particular toolbox of interest to us is the image
processing toolbox. Rather than give a description of all of Matlab's capabilities, we shall restrict
ourselves to just those aspects concerned with handling of images. We shall introduce functions,
commands and techniques as required. A Matlab function is a keyword which accepts various
parameters, and produces some sort of output: for example a matrix, a string, a graph. Examples of
such functions are sin, imread, imclose. There are manyfunctions in Matlab, and as we shall see, it
is very easy (and sometimes necessary) to write our own.
Matlab's standard data type is the matrix_all data are considered to be matrices of some sort.
Images, of course, are matrices whose elements are the grey values (or possibly the RGB values) of
its pixels. Single values are considered by Matlab to be matrices, while a string is merely a matrix
of characters; being the string's length. In this chapter we will look at the more generic Matlab
commands, and discuss images in further chapters.
When you start up Matlab, you have a blank window called the Command Window_ in which you
enter commands. Given the vast number of Matlab's functions, and the different parameters they
can take, a command line style interface is in fact much more efficient than a complex sequence of
pull-down menus.
You can use MATLAB in a wide range of applications, including signal and image processing,
communications, control design, test and measurement financial modeling and analysis. Add-on
toolboxes (collections of special-purpose MATLAB functions) extend the MATLAB environment
to solve particular classes of problems in these application areas.
MATLAB provides a number of features for documenting and sharing your work. You can
integrate your MATLAB code with other languages and applications, and distribute your MATLAB
algorithms and applications.
When working with images in Matlab, there are many things to keep in mind such as loading an
image, using the right format, saving the data as different data types, how to display an image,
conversion between different image formats.
Image Processing Toolbox provides a comprehensive set of reference-standard algorithms and
graphical tools for image processing, analysis, visualization, and algorithm development. You can
perform image enhancement, image deblurring, feature detection, noise reduction, image
segmentation, spatial transformations, and image registration. Many functions in the toolbox are
multithreaded to take advantage of multicore and multiprocessor computers.
MATLAB and images
• The help in MATLAB is very good, use it!
• An image in MATLAB is treated as a matrix
• Every pixel is a matrix element
• All the operators in MATLAB defined on
matrices can be used on images: +, -, *, /, ^, sqrt, sin, cos etc.
• MATLAB can import/export several image formats
– BMP (Microsoft Windows Bitmap)
– GIF (Graphics Interchange Files)
– HDF (Hierarchical Data Format)
– JPEG (Joint Photographic Experts Group)
– PCX (Paintbrush)
– PNG (Portable Network Graphics)
– TIFF (Tagged Image File Format)
– XWD (X Window Dump)
– MATLAB can also load raw-data or other types of image data
• Data types in MATLAB
– Double (64-bit double-precision floating point)
– Single (32-bit single-precision floating point)
– Int32 (32-bit signed integer)
– Int16 (16-bit signed integer)
– Int8 (8-bit signed integer)
– Uint32 (32-bit unsigned integer)
– Uint16 (16-bit unsigned integer)
– Uint8 (8-bit unsigned integer)
Images in MATLAB
Binary images : {0,1}
• Intensity images : [0,1] or uint8, double etc.
• RGB images : m-by-n-by-3
• Indexed images : m-by-3 color map
• Multidimensional images m-by-n-by-p (p is the number of layers)
IMAGE TYPES IN MATLAB
Outside Matlab images may be of three types i.e. black & white, grey scale and colored. In Matlab,
however, there are four types of images. Black & White images are called binary images,
containing 1 for white and 0 for black. Grey scale images are called intensity images, containing
numbers in the range of 0 to 255 or 0 to 1. Colored images may be represented as RGB Image or
Indexed Image.
In RGB Images there exist three indexed images. First image contains all the red portion of the
image, second green and third contains the blue portion. So for a 640 x 480 sized image the matrix
will be 640 x 480 x 3. An alternate method of colored image representation is Indexed Image. It
actually exist of two matrices namely image matrix and map matrix. Each color in the image is
given an index number and in image matrix each color is represented as an index number. Map
matrix contains the database of which index number belongs to which color.
IMAGE TYPE CONVERSION
• RGB Image to Intensity Image (rgb2gray)
• RGB Image to Indexed Image (rgb2ind)
• RGB Image to Binary Image (im2bw)
• Indexed Image to RGB Image (ind2rgb)
• Indexed Image to Intensity Image (ind2gray)
• Indexed Image to Binary Image (im2bw)
• Intensity Image to Indexed Image (gray2ind)
• Intensity Image to Binary Image (im2bw)
• Intensity Image to RGB Image (gray2ind, ind2rgb)
Key Features
• High-level language for technical computing
• Development environment for managing code, files, and data
• Interactive tools for iterative exploration, design, and problem solving
• Mathematical functions for linear algebra, statistics, Fourier analysis, filtering,
optimization, and numerical integration
• 2-D and 3-D graphics functions for visualizing data
• Tools for building custom graphical user interfaces
• Functions for integrating MATLAB based algorithms with external
applications and languages, such as C, C++, Fortran, Java, COM, and Microsoft
Excel.
4.6 COMMUNICATION
Microcontrollers depend on a host computer for developing and compiling programs. The software
used on the host computer is known as an integrated development environment, or IDE. For the
Arduino, the development environment is based on the open source Processing platform
([Link]) which is described by its creators as a “programming language and
environment for people who want to program images, animation, and interactions.“ The Arduino
programming language leverages an open source project known as Wiring ([Link]). The
Arduino language is based on good old- fashioned C. If you are unfamiliar with this language, don’t
worry; it’s not hard to learn, and the Arduino IDE provides some feedback when you make
mistakes in your programs.
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino,
or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which
is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the computer. The '16U2
firmware uses the standard USB COM drivers, and no external driver is needed. However, on
Windows, a inf file is required. The Arduino software includes a serial monitor which allows
simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board
will flash when data is being transmitted via the USB-to-serial chip and USB connection to the
computer (but not for serial communication on pins 0 and 1).
A Software Serial library allows for serial communication on any of the Uno's digital pins. The
ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a
Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
As you go through the list of programming statements available in the Arduino IDE (choose Help-
>Reference), you might think there isn’t much power for doing t hings like running servos,
operating stepper motors, reading potentiometers, or displaying text on an LCD. Like most any
language based on C, the Arduino supports the notion of “libraries” code
Repositories that extend core programming functionality. Libraries let you re- use code without having
to physically copy and paste it into all your programs. The standard Arduino software installation comes
with several libraries you may use, and you can download others from the Arduino support pages and
from third-party websites that publish Arduino library code. A good example of a library you’ll use with
the Robot and likely many other robot projects is
Servo. This library allows you to connect one or more hobby R/C servos to the Arduino’s digital
I/O pins. The Servo library comes with the standard Arduino installation package Library->Servo.
This adds the line
#include <Servo.h>
Which tells the Arduino IDE that you wish to include the Servo library in your sketch. With the
functionality of the library now available to you, you can use its various functions to control one or
more servos. For example, you can use the write function to rotate a servo to a specific position,
from 0 to 180 degrees. The following code
[Link](90);
Moves a servo to its midpoint, or 90 degree position. Structurally, Arduino sketches are very
straightforward and are pretty easy to read and understand. The Arduino program contains two main
parts: setup () and loop (). These are programming functions that do what their names suggest: setup
() sets up the Arduino hardware, such as specifying which I/O lines you plan to use, and whether
They are inputs or outputs. The loop () function is repeated endlessly when the Arduino is
operating.
Arduino IDE (Integrated development environment) is used to write the program and dump into the
Arduino board
Fig 3.3
3. Select the required Arduino board from Tools as shown below
Fig 3.4
4. Write the sketch in Arduino IDE
Fig 3.5
5. Compile and upload the Sketch to Arduino boardupload the Sketch to Arduino board
Fig 3.6
Voice calls:
Voice calls are not an application area to be targeted. In future if interfaces like a
microphone and speaker are provided for some applications then this can be considered.
SMS:
SMS is an area where the modem can be used to provide features like:
• Pre-stored SMS transmission
• These SMS can be transmitted on certain trigger events in an automation
system
• SMS can also be used in areas where small text information has to be sent. The
transmitter can be an automation system or machines like vending machines, collection
machines or applications like positioning systems where
The navigator keeps on sending SMS at particular time intervals. SMS can be a solution
where GSM data call or GPRS services are not available
APPLICATIONS:
Now access control devices can communicate with servers and security staff
through SMS messaging. Complete log of transaction is available at the head-office
Server instantly without any wiring involved and device can instantly alert security
personnel on their mobile phone in case of any problem. RaviRaj Technologies is
introducing this technology in all Fingerprint Access control and time attendance
products.
Transaction terminals:
EDC machines, POS terminals can use SMS messaging to confirm transactions
from central servers. The main benefit is that central server can be anywhere in the
world. Today you need local servers in every city with multiple telephone lines. You
save huge infrastructure costs as well as per transaction cost.
LCD Display
Liquid crystal displays (LCDs) have materials which combine the properties of
both liquids and crystals. Rather than having a melting point, they have a
temperature range within which the molecules are almost as mobile as they would
be in a liquid but are grouped together in an ordered form similar to a crystal.
An LCD consists of two glass panels, with the liquid crystal material sand
witched in between them. The inner surface of the glass plates is coated with
transparent electrodes which define the character, symbols or patterns to be
displayed polymeric layers are present in between the electrodes and the liquid
crystal, which makes the liquid crystal molecules to maintain a defined orientation
angle.
One each polarisers are pasted outside the two glass panels. These polarisers
would rotate the light rays passing through them to a definite angle, in a particular
direction
When the LCD is in the off state, light rays are rotated by the two polarisers and
the liquid crystal, such that the light rays come out of the LCD without any
orientation, and hence the LCD appears transparent.
The LCD’s are lightweight with only a few millimeters thickness. Since the
LCD’s consume less power, they are compatible with low power electronic
circuits, and can be powered for long durations.
The LCD’s don’t generate light and so light is needed to read the display. By
using backlighting, reading is possible in the dark. The LCD’s have long life and
a wide operating temperature range.
Changing the display size or the layout size is relatively simple which makes the
LCD’s more customer friendly.
The LCDs used exclusively in watches, calculators and measuring instruments are
the simple seven-segment displays, having a limited amount of numeric data. The
recent advances in technology have resulted in better legibility, more information
displaying capability and a wider temperature range. These have resulted in the
LCDs being extensively used in telecommunications and entertainment
electronics. The LCDs have even started replacing the cathode ray tubes (CRTs)
used for the display of text and graphics, and also in small TV applications.
9,920 bit character generator ROM for a total of 240 character fonts. 208
character fonts (5 x 8 dots) 32 character fonts (5 x 10 dots)
Wide range of instruction functions display clear, cursor home, display on/off,
cursor on/off, display character blink, cursor shift, display shift.
REGISTERS:
The controller IC has two 8 bit registers, an instruction register (IR) and a
data register (DR). The IR stores the instruction codes and address information for
display data RAM (DD RAM) and character generator RAM (CG RAM). The IR
can be written, but not read by the MPU.
The dot-matrix liquid crystal display controller and driver LSI displays
alphanumeric, Japanese kana characters, and symbols. It can be configured to
drive a dot-matrix liquid crystal display under the control of a 4- or 8-bit
microprocessor. Since all the functions such as display RAM, character generator,
and liquid crystal driver, required for driving a dot-matrix liquid crystal display
are internally provided on one chip, a minimal system can be interfaced with this
controller/driver.
APPENDIX:
Source Codes
Txt Main:
Sv=0;
for i=1:N
Sv=i^2*Aw(i)+Sv;
end
Sh=0;
for i=(N+1):L
Sh=i*Aw(i)+Sh;
end
%% Original image
[filename,pathname] = uigetfile({'*.*';'*.bmp';'*.tif';'*.gif';'*.png'},'Pick an Image File');
I = imread([pathname,filename]);
% I=imresize(I,[256 256]);
figure,imshow(I),title('Original Image');
ad_nos=imnoise(I,'salt & pepper');
figure,imshow(ad_nos)
k1=(round(size(I,1)/Sv));
k2=(round(size(I,2)/Sh));
Row=k1*Sv; Col=k2*Sh;
I1=imresize(I,[Row Col]);
figure,imshow(I1),title('Cover Image');
% Colour combination
R=I1(:,:,1); G=I1(:,:,2); B=I1(:,:,3);
% Sub-Case
SCr = sub_case(MCr,MCg,MCb);
SCg = sub_case(MCg,MCb,MCr);
SCb = sub_case(MCb,MCr,MCg);
[r1]=blocking(R,Sv,Sh);
[g1]=blocking(G,Sv,Sh);
[b1]=blocking(B,Sv,Sh);
%% message image
% img=double(imread('[Link]'));
[filename,pathname] = uigetfile({'*.*';'*.bmp';'*.tif';'*.gif';'*.png'},'Pick an Image File');
img = audioread([pathname,filename]);
% % img=double(audioread('[Link]'));
%audioplay(img);
sound(img)
img=round((img+1).*100);
% img=rgb2gray(img);
% rd1=img(:,:,1);gd1=img(:,:,2);bd1=img(:,:,3);
% img=[rd1(:)' gd1(:)' bd1(:)'];
P=[img(:)' -1];
ln1=length(P);
n=16;
sp1=P(1:n);
sp2=P(n+1:ln1);
%% key encription
ciphertext = cipher (sp1, w, s_box, poly_mat,1);
P=[ciphertext sp2];
mr=MCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mg=MCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mb=MCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sr=SCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sg=SCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sb=SCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
r=r1(1,u).data; g=g1(1,u).data; b=b1(1,u).data; % take each blocking part for segmentation
[re,ge,be,P1,id1,rot1,Bk]=embedding(r,g,b,mr,mg,mb,sr,sg,sb,P,id1,rot1); % Embedding
process through segmentation
if (Bk==1)
break
end
end
if (Bk==1)
break
end
end
%% replace the original image
k=0;
for i=1:(Row/Sv)
for j=1:(Col/Sh)
k=k+1;
R(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=r1(k).data;
G(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=g1(k).data;
B(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=b1(k).data;
end
end
I1(:,:,1)=R; I1(:,:,2)=G; I1(:,:,3)=B;
figure,imshow(I1,[]); %% Embedded image
RXT Main:
%%% Extracting method %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
%% password for extraction
pw_input1=input('Enter Password for Extracting.....: ','s');
% if strcmp(pw_input,pw_input1)
L1=length(pw_input);
for i=1:L1
Aw(i)=str2num(pw_input(i));
end
N=(round(L/2));
Sv=0;
for i=1:N
Sv=i^2*Aw(i)+Sv;
end
Sh=0;
for i=(N+1):L1
Sh=i*Aw(i)+Sh;
end
k1=(round(size(I1,1)/Sv));
k2=(round(size(I1,2)/Sh));
Row=k1*Sv; Col=k2*Sh;
I2=imresize(I1,[Row Col]);
R=I2(:,:,1); G=I2(:,:,2); B=I2(:,:,3);
% Main Case
for i=1:Row
for j=1:Col
MCr(i,j)=round(R(i,j)/16)+1;
MCg(i,j)=round(G(i,j)/16)+1;
MCb(i,j)=round(B(i,j)/16)+1;
end
end
% Sub-Case
SCr = sub_case(MCr,MCg,MCb);
SCg = sub_case(MCg,MCb,MCr);
SCb = sub_case(MCb,MCr,MCg);
[r1]=blocking(R,Sv,Sh);
[g1]=blocking(G,Sv,Sh);
[b1]=blocking(B,Sv,Sh);
ln2=length(P);
P2=zeros(1,ln2);
P2(ln2)=-1;
u=1; v=1; id2=1; rot2=1;
for i=1:(Row/Sv)
for j=1:(Col/Sh)
mr=MCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mg=MCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mb=MCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sr=SCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sg=SCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sb=SCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
if (Bk==1)
break
end
end
if (Bk==1)
break
end
end
sr1=P2(1:n);
sr2=P2(n+1:length(P2));
%% Decryption
re_plaintext = inv_cipher(sr1, w, inv_s_box, inv_poly_mat,1);
Sr=[re_plaintext sr2];
ln2=length(Sr)-1;
sz=sqrt(ln2);
Sr=reshape(Sr(1:ln2),[1 ln2]);
Sr=(Sr./100)-1;
sound(Sr,8192)
k1=(round(size(I1,1)/Sv));
k2=(round(size(I1,2)/Sh));
Row=k1*Sv; Col=k2*Sh;
I2=imresize(I1,[Row Col]);
R=I2(:,:,1); G=I2(:,:,2); B=I2(:,:,3);
figure,imshow(I2),title('input Image');
else
errordlg('Wrong password')
defaultString = 'INVALID PASSWORD DETECTED ACCESS DENIED PLEASE DONT USE
ANOTHER ACCOUNT';
[Link]('[Link]');
obj = [Link];
[Link] = 100;
Speak(obj, defaultString);
end
COLOUMN MIX
Sv=0;
for i=1:N
Sv=i^2*Aw(i)+Sv;
end
Sh=0;
for i=(N+1):L
Sh=i*Aw(i)+Sh;
end
%% Original image
[filename,pathname] = uigetfile({'*.*';'*.bmp';'*.tif';'*.gif';'*.png'},'Pick an Image File');
I = imread([pathname,filename]);
% I=imresize(I,[256 256]);
figure,imshow(I),title('Original Image');
ad_nos=imnoise(I,'salt & pepper');
figure,imshow(ad_nos)
k1=(round(size(I,1)/Sv));
k2=(round(size(I,2)/Sh));
Row=k1*Sv; Col=k2*Sh;
I1=imresize(I,[Row Col]);
figure,imshow(I1),title('Cover Image');
% Colour combination
R=I1(:,:,1); G=I1(:,:,2); B=I1(:,:,3);
% Sub-Case
SCr = sub_case(MCr,MCg,MCb);
SCg = sub_case(MCg,MCb,MCr);
SCb = sub_case(MCb,MCr,MCg);
[r1]=blocking(R,Sv,Sh);
[g1]=blocking(G,Sv,Sh);
[b1]=blocking(B,Sv,Sh);
%% message image
% img=double(imread('[Link]'));
[filename,pathname] = uigetfile({'*.*';'*.bmp';'*.tif';'*.gif';'*.png'},'Pick an Image File');
img = audioread([pathname,filename]);
% % img=double(audioread('[Link]'));
%audioplay(img);
sound(img)
img=round((img+1).*100);
% img=rgb2gray(img);
% rd1=img(:,:,1);gd1=img(:,:,2);bd1=img(:,:,3);
% img=[rd1(:)' gd1(:)' bd1(:)'];
P=[img(:)' -1];
ln1=length(P);
n=16;
sp1=P(1:n);
sp2=P(n+1:ln1);
%% key encription
ciphertext = cipher (sp1, w, s_box, poly_mat,1);
P=[ciphertext sp2];
mr=MCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mg=MCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
mb=MCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sr=SCr((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sg=SCg((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
sb=SCb((i-1)*Sv+1:i*Sv,(j-1)*Sh+1:j*Sh);
[re,ge,be,P1,id1,rot1,Bk]=embedding(r,g,b,mr,mg,mb,sr,sg,sb,P,id1,rot1); % Embedding
process through segmentation
if (Bk==1)
break
end
end
if (Bk==1)
break
end
end
%% replace the original image
k=0;
for i=1:(Row/Sv)
for j=1:(Col/Sh)
k=k+1;
R(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=r1(k).data;
G(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=g1(k).data;
B(((i-1)*Sv+1):i*Sv,((j-1)*Sh+1):j*Sh)=b1(k).data;
end
end
I1(:,:,1)=R; I1(:,:,2)=G; I1(:,:,3)=B;
figure,imshow(I1,[]); %% Embedded image
CONCLUSION
1). [Link] and F. Petitcolas, ”On the limits of steganography” IEEE Journal of Selected
Areas in Communications, Vol. 16, No. 4, May 1998.
2). NielsProvos, Peter Honeyman, ”Hide and Seek: An Introduction to Steganography,” IEEE
computer society,2003.
4). An overview of image steganography by T. Morkel , J.H.P. Eloff, M.S. Olivier. Information
and Computer Security Architecture (ICSA) Research Group Department of Computer Science
University of Pretoria, 0002, Pretoria, South Africa.
5). Johnson, N.F. Jajodia, S., ”Exploring Steganography: Seeing the Unseen”, Computer Journal,
February 1998.
6). ”Detecting LSB Steganography in Color and Gray-Scale Images” Jessica Fridrich,
MiroslavGoljan, and Rui Du State University of New York, Binghamton.
7). Ran-Zan Wang, Chi-Fang Lin, Ja-Chen Lin, ”Hiding data in images by optimal moderately
significant-bit replacement” IEE Electron. Lett. 36 (25) (2000) 20692070.
8). Hiding data in images by simple LSB substitution by Chi-Kwong Chan, L.M. Cheng
Department of Computer Engineering and Information Technology, City University of Hong
Kong, Hong Kong Received 17 May 2002.
11). A. Cheddad, J. Condell, K. Curran and P.M. Kevitt. (2010). ”Digital image steganography:
survey and analysis of current methods.” Signal Processing Journal.
13). A Review of Data Hiding in Digital Images by E Lin, E Delp Center for
Education and Research Information Assurance and Security Purdue University, West Lafayette,
IN 47907-2086.
14). W Bender, D. Gruhl, N. Morimoto, and A. Lu, ”Techniques for data hiding,” IBM Systems
Journal, Vol. 35, No. 3 and 4.
15). M.M. Amin, M. Salleh, S. Ibrahim, et al., ”Information Hiding Using Steganography”,
4th National Conference on Telecommunication Technology Proceedings
(NCTT2003), Shah Alam, Malaysia, 2003.
18. Journal of Theoretical and Applied Information Technology 15th February 2012. Vol. 36
No.1. A steganography algorithm for hiding image in Image by improved lsb substitution by
minimize Detection by vijaykumarsharma, 2vishal [Link]. scholar, Arya college of
Engineering IT, Jaipur , Rajasthan
(India).