0% found this document useful (0 votes)
25 views25 pages

Adobe Scan 18-Aug-2023

Uploaded by

Sonali Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
25 views25 pages

Adobe Scan 18-Aug-2023

Uploaded by

Sonali Kumari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
Digital Image Processing Lecture No - 44 Lossless Compression Algorithm: Arithmetic Coding __ |. In this coding technique, a string of characters like the words there” is represented using a fixed number of bits per character, as in the code _ | stored with fewer bits and more bits, resulting in relatively fewer bits used in total Arithmetic Coding | Huffman Coding _| Complex technique for coding short ‘Simple Technique messages »| Gives optimum result | Does not give optimum result There is no one to one correspondence There is one to one correspondence between source symbol and code word | between source symbol and code word ‘Compression Ratio s more | Compression Rabo is less Execution time is more | Execution time is less. 4. Example: Code the string CAB using arithmetic coding. <—°?’s—__» 03 ©: — $$$ : oe oF a ane —a —e. i> we Fivat chavect O& 3 co + Rerge 5 0-4-1 code world Dae Tenge only Divides omen according stort a) J S-prmtowtt rote [03/01] Cumulative Character Probability Table Character Cumulative Probability A o9te cro ose 8 0-96 + 93x01) =0 -99 c SATO IKE] =}O~ A) Resuttant meno range is; rs ry a a a e033 o-0) ran venga ee ote —) 4. Digital Image Processing Lecture No - 45 Lossless Compression Algorithm: Dictionary-based Coding _ |Q Dictionary-based coding techniques replace input strings with a code to an entry in a dictionary U The most well known dictionary-based techniques is Lempel-Ziv Algorithms (Ziv and Lempel, 1977, 1978) O The idea behind Lempel-Ziv-Welch (LZW) coding is to use a dictionary to store the string patterns that have already been encountered O Indices are used to encode the repeated patterns Q Encoder reads the input string and identifies the recurrent words, and Outputs their indices from the dictionary Ulf a new word in encountered, the word is sent as output in the uncompressed form and is entered into dictionary as a new entry O These methods are faster O They are adaptive in nature i These methods are not based on statistics. Hence there is no dependency of the quality of the model on the distribution of data > Objective is to identify the longest pattern for each collected segment of the input string > Then it is checked in the dictionary _| > If there is no match, the segment becomes a new entry in the dictionary Example: Consider the string ADBB. Explain the working of Dictionary-based technique. ) Werd = Nut 2) fead tre song, ken werden = A 5 Olrendy an Beton ward = rd +A ae null +A = A 3) Rend Oe sormg open - poe Hence FE wadak s AD 3 not ma tun tend omepet = New mmoy = Aen ara (9 to New werd eB saatae, 4) Read Gu strng agerm 6B Next cherac€ar > B wed+ kK = DE Send ous 3 SPE220 20 Digital Image Processing Lecture No - 46 Lossless Predictive Coding This technique eliminates the inter-pixel dependencies by predicting new information, which is obtained by taking the difference between the actual and predicted value of the pixel O The encoder takes a pixel of the input image f, U The predictor predicts the anticipated value of that pixel using past inputs O Predicted value is rounded to the nearest integer value, which is known as predicted value U The error is the difference between the actual and the predicted value U This error is sent across the channel. The same predictor is used in the decoder side to predict the value. — O Reconstructed image is: Example: Consider the pixel (23. 34, 39, 47, 55, 63}. Demonstrate the predictive coding. ¥ mex Welue AN OND MAL Leyeance = 63 + Tegner 6 bate + ) bet fer can 4 NC OL RR Teqpn~red to code om opel vmesioje = 6xy= 42 & we Predicted coded Atgpemce Bomex volun is 23 v (Sete 4 1 ke fer sma) > Tt Saveg 6 bite D Tetel mo g bet Tempereg = = 6x6 = 36 & 4: Consider the pixel (23, 64, 39, 47, 55, 63} 2 2 iil a ACER Sx G+!) + 1+!) sx6 47 = 3e +? = 3} s +1) gle? Digital Image Processing Lecture No - 47 Lossy Predictive Coding O Lossy Compression Algorithms incur a loss of information QO This loss is known as distortion | O This data loss is acceptable if it is tolerable QO Compression ratio of these algorithms are very large em ee EZ P jm] +ve or ove 3 | ees, || art araese 27] *GD | * Protester St ttees = - (ss | seares 7 | cue Fo anta., ee ee eg predichem coappement meals baa racces| ~ yore a For ee free ages 5S bees oF fe fi, Et panes 1431 vote a Brot te ompyted 9 — Cy droves vaseces en ste-faeta-k., oe ro Bola ver — Fetene Qo peme| oS tee SS Cretennes = QO Vector Quantization (VQ) technique is quite similar to Scalar Quantization ; QO The idea of Vector Quantization (VQ) is to identify the frequently occurring blocks in an image and to represent them as representative vectors Q The set of representative vectors is known as Code Book and it is \_ then used for image came ‘Mapping | a Games) rer) i a) | Code | Set Poin = \_ Book | Structure of Vector Quantization (VQ) L Vector quantization first partitions the | 3. This introduces an error known as Distortion input space X into K non-overlapping | measure. This distortion can be written as: regions a a C1 Then it assigns a Code Vector foreach | dCx4)= | F(x - y.) cluster The code vector is commonly chosenas | Here. x #7 Oxo ita menaeemal the centroid of the vectors of the partition ae vw C= Cis ea-- Cm) = (Ki Fa- x) 4. \0 The code book of vector quantization consists of all the code words AQ Then image is divided into fixed size blocks (vectors) A Usually 4x4, and replaced with the best match found in the codebook based on minimum distortion.

You might also like