6. Step 1: Preprocessing
First step is to convert red, green, blue color
channels to YCbCr space.
Y – Luminance
CbCr – Chrominance
Human eyes are more sensitive to Luminance
channel than the chrominance channel.
Grayscale images contain only
Luminance Channel.
11. Step 2: Transformation
Transformation from Spatial Domain to Frequency
Domain to separate out the high and low frequencies.
JPEG compression algorithm uses the
Discrete Cosine Transform (DCT).
That’s a lot of computation!
(Around 4096 computations for each block)
12. Step 2: Transformation
Humans are unable to see aspects of an image that are
at really high frequencies. Since taking the DCT allows
us to isolate where these high frequencies are, we can
take advantage of this in choosing which values to
preserve. By multiplying the DCT matrix by some mask,
we can zero out elements of the matrix, thereby freeing
the memory that had been representing those values
15. Step 3: Quantization
The next step in the JPEG algorithm is
the quantization step. Here we will make decisions about
values in the transformed image - elements near zero will
converted to zero and other elements will be shrunk so
that their values are closer to zero. All quantized values
will then be rounded to integers.
Quantization makes the JPEG algorithm an example
of lossy compression.
16. Step 3: Quantization
To quantize the above block, the JPEG algorithm first
divides each element by a prescribed value and then
rounds the result to produce integers. The values that are
used in the element-wise division step are given in
matrix Z below:
19. Step 4: Encoding
The last step in the JPEG process is to encode the
transformed and quantized image. The regular JPEG
standard uses an advanced version of Huffman coding. The
original image has dimensions 160 x 240 so that
160*240*8 = 307,200 bits are needed to store it to disk. If
we apply Huffman coding to the transformed and
quantized version of the image, we need only 85,143 bits
to store the image to disk. The compression rate is about
2.217bpp. This represents a savings of over 70% of the
original amount of bits needed to store the image!
21. JPEG Steganography
There are various different steganography techniques for
JPEG images. One of the most common and popular one is
the LSB Steganography technique!
Various other algorithms include the F5
algorithm which uses a password using permutations
using a random generator.
Some more advanced algorithms are available
such as the SWAP DCT algorithm.
23. Why the LSB method?
Image: 100x50
Total: 5000 pixels
1 pixel -> 3 Bytes
(R: 1 byte, G: 1 byte, B: 1 byte)
R: 1000 0010 G: 1010 0111 B: 0110 1001
Total of 5000 bits for hiding
Or 625 bytes (5000/8)
And this is just using 1 bit from each channel
24. JPEG Steganography
Some popular tools include:
Virtual Steganography Laboratory
StegJpeg
JSteg
Files such as images, audio, video and even this
PPT file can be embedded in a JPEG image!
25. JPEG Steganalysis
Uses Chi-Square attack to detect typical histogram change.
Difference between the theoretical expected frequency.
Can be categorized as first order statistical attack.
26. JPEG Steganalysis
Some other statistical methods for
StegAnalysis include:
Steganalysis Using Markov Model
Using SVM (Support Vector Machine) Classifier
(Basically this is pattern recognition)
Train it Predict it