Date post: | 15-Feb-2017 |
Category: |
Education |
Upload: | napier-university |
View: | 406 times |
Download: | 1 times |
CSN08704
Data, Audio, Video and Imageshttp://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (JPEG)
CSN08704
Data, Audio, Video and Imageshttp://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (JPEG) – JPEG Processing
JPEG ProcessRGB to YCbCr
DCT QuantisationVariable Length CodingImage JPEG
RGB to YCbCr
Y=0.299R+0.587G+0.114BCb=0.1687R–0.3313G+0.5BCr=0.5R–0.4187G+0.0813B
RGB to YCbCr
DCT QuantisationVariable Length CodingImage JPEG
Y strongly dependent on Green component
Cb strongly dependent on Blue component
Cr strongly dependent on Blue component
Discrete Cosine Transform (DCT)RGB to YCbCr
DCT QuantisationVariable Length CodingImage JPEG
F u v C u C v f x y x u y v
C z z
z
yx
( , ) ( ) ( ) ( , ) cos ( ) cos( )
( )
1
42 1
162 1
16
12
0
1 0
0
7
0
7
where if
or if
8 pixels
8 pixels
Link
DCT
[[1020 0 0 0 0 0 0 0] [-183 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [-216 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [-324 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [-924 0 0 0 0 0 0 0]]
[[1020 183 0 216 0 324 0 924] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0] [ 0 0 0 0 0 0 0 0]]
[[1020 0 0 0 0 0 0 0] [ 0 -33 0 -39 0 -58 0 -166] [ 0 0 0 0 0 0 0 0] [ 0 -39 0 -46 0 -69 0 -196] [ 0 0 0 0 0 0 0 0] [ 0 -58 0 -69 0 -103 0 -294] [ 0 0 0 0 0 0 0 0] [ 0 -166 0 -196 0 -294 0 -837]]
Link
QuantisationRGB to YCbCr
DCT QuantisationVariable Length CodingImage JPEG
• The quantisation part aims to suppress less important special frequencies to zero, while preserving important ones.
4096
150
100
50
0
Dividedby 100
Multiplied by 100
100 (Maximum error ± 50)
Value before quantization
Value afterquantization
Unquantized value
4096
104
96
88
0
Dividedby 16
6
Multiplied by 16
96 (Maximum error ± 8)
256
0
1
41
0
QuantisationEye is less sensitive to fast changes of colour.Eye more sensitive to changes in luminosity (Y).
Zig-zag storage and VLCRGB to YCbCr
DCT QuantisationVariable Length CodingImage JPEG
F(0,0) F(0,1) F(0,2) F(0,3) F(0,4) F(0,5) F(0,6) F(0,7)
F(1,0) F(1,1) F(1,2) F(1,3) F(1,4) F(1,5) F(1,6) F(1,7)
F(2,0) F(2,1) F(2,2) F(2,3) F(2,4) F(2,5) F(2,6) F(2,7)
F(3,0) F(3,1) F(3,2) F(3,3) F(3,4) F(3,5) F(3,6) F(3,7)
F(4,0) F(4,1) F(4,2) F(4,3) F(4,4) F(4,5) F(4,6) F(4,7)
F(5,0) F(5,1) F(5,2) F(5,3) F(5,4) F(5,5) F(5,6) F(5,7)
F(6,0) F(6,1) F(6,2) F(6,3) F(6,4) F(6,5) F(6,6) F(6,7)
F(7,0) F(7,1) F(7,2) F(7,3) F(7,4) F(7,5) F(7,6) F(7,7)
251 0 -2 -1 0 0 0 0 -5 -3 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
251, 0, -5, -1, -3, -2, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0,…,0-> 251, 0, -5, -1, -3, -2, 0, -1 ...[51 zeros]
CSN08704
Data, Audio, Video and Imageshttp://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (JPEG) – File Format
JPEG Tags[00000000] FF D8 FF E0 00 10 4A 46 49 46 00 01 00 01 00 C8 ......JFIF......[00000016] 00 C8 00 00 FF FE 00 1F 4C 45 41 44 20 54 65 63 ........LEAD.Tec[00000032] 68 6E 6F 6C 6F 67 69 65 73 20 49 6E 63 2E 20 56 hnologies.Inc..V[00000048] 31 2E 30 31 00 FF DB 00 43 00 19 11 12 16 12 0F 1.01....C.......[00000064] 19 16 14 16 1C 1A 19 1E 25 3F 29 25 22 22 25 4D ........%?)%""%M[00000080] 37 3A 2D 3F 5B 50 60 5E 5A 50 58 56 65 71 91 7B 7:-?[P`^ZPXVeq.{[00000096] 65 6B 89 6D 56 58 7E AC 7F 89 96 9A A2 A4 A2 61 ek.mVX~........a Link
FF F8 tag – Start of fileFF DB tag (Quantization Table). FF C4 tag (Huffman Table). FF C0 tag (Start Of Frame (Baseline DCT)). FF DA tag (Start Of Scan). FF 00 stuffed FF (Likely Huffman Coding).
Link
CSN08704
Data, Audio, Video and Imageshttp://asecuritysite.com/comms
Telecommunications
Prof Bill Buchanan
Images (JPEG)