jpeg scb missigon10x
TRANSCRIPT
-
8/10/2019 Jpeg Scb Missigon10x
1/15
Session 1
Session Name: Introduction to JPEGAuthor Name: Shailendra C. Badwaik
Department: Electronics & TelecommunicationSubject/Course: Signal Coding and Estimation Theory
Cell Number: 9372305856
-
8/10/2019 Jpeg Scb Missigon10x
2/15
Page 2 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
Session Objectives
At the end of this session, the learner will be able to:
Identify the need of compressionCompare and explain types of compression techniquesSynthesize JPEG block diagramState the applications of JPEG in real worldSpecify the upcoming trends in compression standards
Teaching Learning Material
White Board and MarkersPresentation Slides
LCD projectorVideo
-
8/10/2019 Jpeg Scb Missigon10x
3/15
Page 3 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
Session Plan
Time
(inmin)
Content
Learning Aid
andMethodology
FacultyApproach
Typical
StudentActivity
Learning
Outcomes(Blooms +Gardeners)
10Need ofcompression
AnalogiesFacilitiesExplain
ParticipateAnalyzeAnswer
AnalyzingIntrapersonalInterpersonalVerbal Linguistic
05
Comparison
of types ofcompressiontechniques
Visual Aids FacilitatesInstructsExplains
ListensObservesComprehends
UnderstandingIntrapersonalVisual-SpatialVerbal-Linguistic
25
JPEG blockdiagramoverview
Visual AidsVideo
FacilitatesInstructsExplains
ListensObservesComprehends
UnderstandingIntrapersonalVisual-SpatialVerbal-Linguistic
10
Applications
of JPEG
Question and
Answer
PPTpicture
and Tell
Facilitates
Guides Lists
UnderstandingIntrapersonal
Visual -Linguistic
05
Upcomingtrends incompressionstandard
Visual AidsFacilitatesInstructsExplains
ListensObservesComprehends
UnderstandingIntrapersonalVisual-SpatialVerbal-Linguistic
05 JPEG InNutshell Carve TodaysTopic Facilitates RecallsAnswers
Understanding
InterpersonalVerbal- Linguistic
-
8/10/2019 Jpeg Scb Missigon10x
4/15
Session Inputs
Need of compression
Compression is playing a vital role in data transfer.We can begin the session with an activity which will help the learnersunderstand the need of compression
Suggested Activity: Analogies
We can narrate some analogies for problems that if compression is notdone/available. Invite the learners response on what major problems can occurdue transfer of large data.Some sample analogies could be as follows:
Making ZIP File:It will be ask to learners about what they do when data couldnot fit in pen drive and they want to carry intended data. Likely answer will bezip the data and copy in pen drive.
Photo Size : Size of photo of BMP format image is 2 to 3 MB . By saving samephoto by extension .jpg the size comes in 200 to 300 KB . Students can do ontheir at home from MS-paint by saving .bmp image in different file format andcan verify its net effect by observing size of different format files.
Uploading Photos on WEB: We find difficult to upload big size photo whilesending to our friend by picasa . What picasa generally does is file conversion incompressed form.
RAR HTML files : It is not possible to send HTML files as email attachment. Bestway out for this problem is to keep all HTML in a folder and rar(compress) thatfolder and send mail of rar file(s).
Some of the problems faced without compression are:
Need more bandwidth to send data on network
Channel get busy for more time
Need more memory
Page 4 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
Need more CPU speed
-
8/10/2019 Jpeg Scb Missigon10x
5/15
Page 5 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
Analogy1 (ZIP File) :Original data may not fit in pen drive or memory stick but zip data could easy fit inpen /memory stick. More data one can put in pen drive due to compression.
Analogy2(Photo size) :Photos capture from high mega pixel camera are big in size , it take more time toupload such photos on web some time connection speed creates bottle neck onuploading these photos. Best way is to save such photos by .jpg extension andshare on the web. Learners can do practical by saving same image in different fileformats and analyze its size.
Analogy3(Uploading Photos on WEB)Birthday photos learners do upload on picasa or any social networking web site byinternet. If all learners answer simultaneously, (photos upload at high speed
internet connection) Also, some responses could be unheard. (Lost connection andre-upload photos needed) Chaos would cause the teacher to become frustrated.(Internet connection is too slow!!)
512 x 512 pixel color image
512 x 512 x 24bits = 786 Kbytes
Videoconference QCIF (Quarter Common Intermediate Format)
(176 x 144 + 88 x 72 + 88 x 72) x 8 x 25 = 7.6 Mbits/s
Digital television
(720 x 576 + 360 x 288 + 360 x 288 ) x 8 x 25 = 124 Mbits/s
High definition television - HDTV
(1440 x 1152 + 720 x 576 + 720 x 576 ) x 8 x 25 = 497 Mbits/s
Multispectral images (satellite)
(6000 x 6000) x 8 x 6 = 216 Mbytes
-
8/10/2019 Jpeg Scb Missigon10x
6/15
Comparison of types of compression techniques
Page 6 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
The human eye has the property that when an image appears on theretina, the image is retained for some number of milliseconds before
decaying. If a sequence of images is drawn line by line at 50images/sec, the eye does not notice that it is looking at discreteimages. All video (i.e., television) systems exploit this principle toproduce moving pictures.
8 bits per pixel to represent 256 gray levels.This scheme gives high-quality black-and-white video. For color video, good systems use 8 bitsfor each of the RGB colors, although nearly all systems mix these intocomposite video for transmission. While using 24 bits per pixel limitsthe number of colors to about 16 million, the human eye cannot evendistinguish this many colors, let alone more.
A video is just a sequence of images (plus sound). The JPEG (JointPhotographic Experts Group) standard for compressing continuous-tone still picturesJPEG is defined in International Standard 10918.
JPEG 10918 has 4 parts -Part 1 - The basic JPEG standard, which defines many options andalternatives for the coding of still images of photographic qualityPart 2 - which sets rules and checks for making sure softwareconforms to Part 1Part 3 - set up to add a set of extensions to improve the standardPart 4 - defines methods for registering some of the parameters
used to extend JPEG
For our purposes, though, only the lossy see Fig 0sequential mode isrelevant, and that one is illustrated in Fig.1. Furthermore, we willfocus the
Figure 0: Lossless and lossy image
-
8/10/2019 Jpeg Scb Missigon10x
7/15
Page 7 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
JPEG as normally used to encode 24-bit RGB video images.
Figure 1: The operation of JPEG in lossy sequential mode
Step 1 (Block Preperation)of encoding an image with JPEG is blockpreparation. For the sake of specificity, let us assume that the JPEGinput is a 640 x 480 RGB image with 24 bits/pixel,as shown in Fig.2(a). Since using luminance and chrominance gives bettercompression, we first compute the luminance, Y, and the twochrominances, I and Q, according to the following formulas:
Figure 2: (a) RGB input data. (b) After block preparation
Separate matrices are constructed for Y, I, and Q, each with elementsin the range 0 to 255. Next, square blocks of four pixels are averagedin the I and Q matrices to reduce them to 320 x 240.This reductionis lossy, but t he eye bar ely not ices i t since the eye responds t oluminance more than to chrominance. It compresses the totalamount of data by a factor of two.Now 128 is subtracted from eachelement of all three matrices to put 0 in the middle of the range.Finally, each matrix is divided up into 8 x 8 blocks. The Y matrixhas 4800 blocks; the other two have 1200 blockseach, as shown inFig2(b).
-
8/10/2019 Jpeg Scb Missigon10x
8/15
Page 8 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
Step 2 (DCT) of JPEG is to apply a DCT (Discrete CosineTransformation)to each of the 7200 blocks separately. The output ofeach DCT is an 8 x 8 matrix of DCT coefficients. DCT element (0, 0) is
the average value of the block. The other elements tell how muchspectral power is present at each spatial frequency. In theory, a DCTis lossless, but in practice, using floating-point numbers andtranscendental functions always introduces some roundoff errorthat results in a little information loss. Normally, these elementsdecay rapidly with distance from the origin, (0, 0), as suggested byFig.3.
Figure 3. (a) One block of the Y matrix. (b) The DCT coefficients
Step 3(Quantization) in this step which the less important DCTcoefficients are wiped out. This (lossy) transformation is done bydividing each of the coefficients in the 8 x 8 DCT matrix by a weight
taken from a table. If all the weights are 1, the transformation doesnothing. An example of this step is given in Fig.4. Here we see theinitial DCT matrix, the quantization table, and the result obtainedby dividing each DCT element by the corresponding quantizationtable element. The values in the quantization table are not part ofthe JPEG standard.
Figure 4: Computation of the quantized DCT coefficients
-
8/10/2019 Jpeg Scb Missigon10x
9/15
Page 9 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
Step 4(Differential Quantization) This step reduces the (0, 0) valueof each block (the one in the upper-left corner) by replacing it withthe amount it differs from the corresponding element in the previousblock. So taking the differential values should reduce most of them to
small values. No differentials are computed from the other values.The (0,0) values are referred to as the DC components; the othervalues are the AC components.
Step 5(Run-length Encoding) This linearizes the 64 elements andapplies run-length encoding to the list. Scanning the block from leftto right and then top to bottom will not concentrate the zerostogether, so a zigzag scanning pattern is used,as shown in Fig.5.Inthis example, the zig zag pattern produces 38 consecutive 0s at theend of the matrix. This string can be reduced to a single count sayingthere are 38 zeros, a technique known as run-length encoding.
Figure 5: The order in which the quantized values are transmitted
Step 6(Statistical Encoding): Here Huffman-encodes the numbers forstorage or transmission, assigning common numbers shorter codesthat uncommon ones. JPEG seems to be complicated. It produces a20:1 compression or better.
It is widely used. Decoding a JPEG image requires running thealgorithm backward. JPEG is roughly symmetric: decoding takes aslong as encoding.
MPEG (Motion Picture Experts Group) These are the main algorithmsused to compress videos and have been international standards since
-
8/10/2019 Jpeg Scb Missigon10x
10/15
Page 10 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
1993. Because movies contain both images and sound, MPEG cancompress both audio and video.MPEG-1 output consists of four kindsof frames:I (Int ra coded) f rames:Self-contained JPEG-encoded still
pictures.P (Pr edict iv e) fr ames:Block-by-block difference with the last frame.B (Bidi rect ional) f rames:Differences between the last and nextframe.D (DC-coded ) f r ames:Block averages used for fast forward.
Applications of JPEG :
Internet
Digital Photography Medical Imaging
Wireless imaging
Document imaging
Pre-Press
Remote sensing and GIS
Cultural Heritage
Scientific and Industrial
Digital Cinema
Image archives and databases
Surveillance
Printing and scanning
Facsimile
Upcoming trends in compression standard
Joint Photographic Experts Group (JPEG) is an ISO standard committee witha mission on Coding and compression of still images.
JPEG coding standard (1988): DCT (discrete cosine transform) basedtransform coding to compress bit-map images.
JPEG2000 efforts started in 1996 to use new methods such as fractals orwavelets. The target deliver date is year 2000 and hence the name.
-
8/10/2019 Jpeg Scb Missigon10x
11/15
Image Coding Standard
Page 11 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
-
8/10/2019 Jpeg Scb Missigon10x
12/15
ConclusionConclusionCarving Todays Topic :Carving Todays Topic :
Page 12 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Punellege Name:Sinhgad College of Engineering,Pune
J:J PEG STANSD FOR
P: 1. Y , component represent2. I and Q represents3. The output of DCT in J PEG is _ X _ matrix4. (0,0) values are called and other than it is called ____ and _____ , ____
E:1. Total No of blocks In J PEG2. Name of First Block step in JPEG (Fill upper and then lower boxes)3.Write name of second block step in J PEG
4. Forth step in J PEG5. Write Name of last but-one step in J PEG
G:1. Scanning in case of run-length encoding is2. Compressing rate achieved by JPEG is (in words)3. Which source encoding is used as a last block of J PEG
13
4
1
2
2
4
3
5
2
1
3
5
-
8/10/2019 Jpeg Scb Missigon10x
13/15
-
8/10/2019 Jpeg Scb Missigon10x
14/15
Page 14 Ver : 1.01 Topic Introduction to JPEGAuthor Name:Shailendra C. Badwaik College Name:Sinhgad College of Engineering,Pune
Assignment
Q1: For what JPEG stands for?
Q2: What is persistence of human eye?Q3: What do you mean by pixel?Q4: Draw JPEG block diagram ?Q5: Explain block preparation method.Q5: Explain quantization method in context to JPEG?Q6: Explain in detail differential quantization?Q7: Explain with example how run length encoding compress the data.Q8: Which statistical encoding technique is used JPEG?Q9: Where JPEG is used?Q10: Is JPEG used in MEEG ? If so explain in brief?
-
8/10/2019 Jpeg Scb Missigon10x
15/15
Page 15 Topic Introduction to JPEGAuthor Name: Shailendra C. Badwaik College Name: Sinhgad College of Engineering
References
http://en.wikipedia.org/wiki/JPEG
Communication Networks Andrew S. Tanenbaumhttp://www.w3.org/Graphics/JPEG/itu-t81.pdf