10 views

Uploaded by techtrainphp

- Jpeg
- IJCSE11-03-06-090
- Scribd
- Image Compression Using Fourier Techniques
- OBRT : Lossless Video Compression Using DCT and DWT Techniques
- Analysis of Efficient Wavelet Based Volumetric Image Compression
- Ahmed
- 3d-Mrf Based Video Tracking in the Compressed Domain
- %5B2010_TITB%5DHyejungKim
- Image Compression Fundamentals
- MCA1
- Across Expertise Exploitation Results Reality
- Huffman Compression
- IJESAT_2012_02_01_12
- PREPROCESSING FOR PPM: COMPRESSING UTF-8 ENCODED NATURAL LANGUAGE TEXT
- UNIT I Unit v e Commerce 2 Marks
- Jacquin Fractal Image Compression
- Chapter 2.1-Multimedia Storage Techniques
- 08 16 Still Image Files
- Storage Calcs

You are on page 1of 12

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

by KALLURI RAJESH . - Monday, 2 April 2012, 04:53 PM

Friends, There is a repeated question in old question papers to apply lossless image compression on a table using predictor p6. I wasted around 3 hours to find some worked out solution but in vain ... if any body have some link please share with me ... Any body can solve the problem apply lossless image compression using predictor 6 for the table 10 10 15 10 15 20 15 20 25

Reply

by KALLURI RAJESH . - Tuesday, 3 April 2012, 12:29 PM

any inputs ?

Show parent | Reply

by SRIRAM R . - Tuesday, 3 April 2012, 12:40 PM

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4735 follow this forum, should be the same way i guess !!!

Show parent | Reply

by ABHAY DUTT PAROHA . - Tuesday, 3 April 2012, 01:02 PM

As per my understanding This question is related to lossless mode of JPEG (different from baseline JPEG). Steps to follow

1 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

1. Predictor 2. Entropy Encoding Predictor 1. For each pixel a predictor (one of 7 possible) is used that best predicts the value contained in the pixel as a combination of up to 3 neighbouring pixels. 2. The difference between the predicted value and the actual value (X) contained in the pixel is used as the predictive difference to represent the pixel. 3. The predictor along with the predictive difference are encoded as the pixel's content. 4. The series of pixel values are encoded using Huffman Coding. P1 P2 P3 P4 P5 P6 P7 A B C A+B+C A+floor[(B-C)/2] B+floor[(A-C)/2] floor[(A+B)/2]

A. The first pixel (0,0) will always use itself. B. Pixels at the first row always use P1. C. Pixel at the first column always use P2. D. The best of the 7 predictions is always chosen for any pixel So our image would be after predictor P6 (I am not sure about this...please verify once) P6 = B+floor[(A-C)/2] 10 10 10 10 10 17 10 17 22

Show parent | Reply

by KALLURI RAJESH . - Tuesday, 3 April 2012, 02:12 PM

Abhay, thank you ... i understand the procedure but only lack of confidence ... thats why i posted ... now i feel i am in correct line .. @sriram This is different sriram ...

2 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

by ABHAY DUTT PAROHA . - Tuesday, 3 April 2012, 02:23 PM

Hey Rajesh...I am not sure..same case with me also.. ..lack of confidence...Can u pls verify my procedure......Can u post some steps of Entropy Encoding after this? I think, we cant apply entropy coding (which we use with DCT based compression) because that encoding use DC (predictive difference) and AC coefficients (Run length coding)

Show parent | Reply

by SRIRAM R . - Tuesday, 3 April 2012, 02:50 PM

Show parent | Reply

by ABHAY DUTT PAROHA . - Tuesday, 3 April 2012, 03:23 PM

...

entropy coding (which we use with DCT based compression) for lossless JPEG ?

Show parent | Reply

by TORTHI SUSMITHA . - Tuesday, 3 April 2012, 03:37 PM

I suppose, we have to find out the difference matrix between the original matrix and the matrix obtained after applying prediction, find out the frequency of the characters in the resultant matrix and just apply huffman coding on that. Correct me if i am wrong.

Show parent | Reply

by KALLURI RAJESH . - Tuesday, 3 April 2012, 05:21 PM

@torthi process is correct ... but here confusion is how to calculate the predicted matrix ... please share if you know @abhay i also got the same answer ... As per my understanding no need to apply any dc encoding ... but for ac coefficients, we can do zigzag scan and apply run length encoding (as said in text book ... i did not remember the procedure) ...

3 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

by TORTHI SUSMITHA . - Tuesday, 3 April 2012, 07:48 PM

Okay. Here is my understanding.. We need to apply lossless image compression using P6 on the below matrix 10 10 15 10 15 20 15 20 25 For P-6 predictor, the prediction is B+(A-C)/2 Neighboring pixels in a lossless JPEG are assumed to be as given below ---|---|---|---|--| |C|B| ---|---|---|---|--| |A|X| ---|---|---|---|--So if you want to predict value for an element at X, we consider its neighboring pixels in the above form Now, in the matrix, say M, given, 10 10 15 10 15 20 15 20 25 If you consider element at (0,0) no A,B,C exists... hence this value doesnt change for element at (0,1) -> A=10, B and C dont exist --> apply the formula B+(A-C)/2, X value is 10/2=5 (0,2) -> A=10, B and C dont exist -> X=10/2 = 5 For elements at position (1,0) (2,0) (1,1) (1,2) 17.5 (2,1) (2,2) 22.5 -> -> -> -> A and C don't exist, B=10 -> X=10 A and C don't exist, B=10 -> X=10 A=10, B=10, C=10 -> X= 10 + (10-10)/2 = 10 A=15, B=15, C=10 -> X= 15 + (15-10)/2 = 15 + 2.5 =

-> A=15, B=15, C=10 -> X= 15 + (15-10)/2 = 17.5 -> A=20, B=20, C=15 -> X= 20 + (20-15)/2 = 20 + 2.5 =

4 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

10 17.5 22.5 Now, my understanding is, we have to find the difference between M and P M-P gives, (not sure whether floor / ceil function is needed for decimal values) 0 5 10 0 5 2.5 5 2.5 2.5 and, we have to apply Huffman coding on the above matrix, considering the frequency of each character. 0 --> freq = 2 5 --> freq = 3 2.5 --> freq = 3 10 --> freq = 1 I am not confident about the above step.. someone please confirm !! This is my understanding--- please let me know if i didnot understand the algorithm properly

Show parent | Reply

by ABHAY DUTT PAROHA . - Tuesday, 3 April 2012, 11:40 PM

We need to apply lossless image compression using P6 on the below table - M 10 10 15 10 15 20 15 20 25 For P-6 predictor, the prediction is B+floor[(A-C)/2] ---|---|---|---|--||C|B| ---|---|---|---|--||A|X| ---|---|---|---|--Rules are below (I think, we need to apply below rules during our calculations) A. The first pixel (0,0) will always use itself. B. Pixels at the first row always use P1. C. Pixel at the first column always use P2. D. The best of the 7 predictions is always chosen for any pixel P1 A P2 B

5 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

P3 P4 P5 P6 P7

So, the Predicator Table is - P 10 10 10 10 10 17 10 17 22 Difference : M-P 005 053 533 Huffman Coding Count(0) = 3 Count(3) = 3 Count(5) = 3 Torthi..Can you please confirm? (I used rules also, that's why I am getting different matrix for P)

Show parent | Reply

by TORTHI SUSMITHA . - Wednesday, 4 April 2012, 12:17 AM

Hi, Are you sure we have to apply P1 and P2 on first row and first column always ??? I was in an assumption that when P-6[=B+(A-C)/2] is used, for first row , the predicted values will be A/2 for first column, the predicted values will be B (u can say P2) this is wat i understood from the text book.. Please share the source where these rules are mentioned.. i haven't come across anything like this in the text book... or not sure if i had missed that point... Also, are you sure, we have to use the FLOOR of the value ?? btwn... i m Susmitha, Torthi is my surname.. ;)

6 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

by ABHAY DUTT PAROHA . - Wednesday, 4 April 2012, 09:45 AM

Hi Sushmitha, I was assuming ur name as Torthi.. Here are the links Simon Fraser University Lectures http://www.cs.sfu.ca/CourseCentral/365/mark /material/notes/Chap4/Chap4.2/Chap4.2.html http://www.ecpe.nu.ac.th/paisarn/Multimedia/week2 /M4L1.pdf http://www.technicaljournalsonline.com /jers/past%20issue/swapnillahudkar.pdf http://www.cs.clemson.edu/~jzwang/1201863 /cpsc86303.pdf Can you please mention the text book where you read this? I am 100% sure about FLOOR value..

Show parent | Reply

...

by TORTHI SUSMITHA . - Wednesday, 4 April 2012, 09:50 AM

Cool... thanks a lot for the info... i was referring to T1 - prescribed text book.. not sure if these points were mentioned there.. i dont remember reading these rules in the text book..

by ABHAY DUTT PAROHA . - Wednesday, 4 April 2012, 10:21 AM

I came across one example also Source Image and video compression standards: algorithms and architectures By Vasudev Bhaskaran, Konstantinos

Konstantinides

7 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

Concept The prediction residual is computed modulo 2 power 16. The residual is not directly Huffman Coded. Instead, it is expressed as pair of symbols : the category and the magnitude. 1. The first symbol represents the number of bits needed to encode the magnitude. (Only this value is Huffman coded) Example: Prediction value for X is 42, then from table (see at last), we determine that this value belongs to category 6, that is we need an additional 6 bits to uniquely determine the value 42. 2. The prediction residual is then mapped into 2 tuple (6, 6 bit code for 42) 3. Category 6 is Huffman Coded and the compressed representation for the prediction residual consists of this Huffman codeword followed by this 6 bit representation for the magnitude. 4. If the value of residual is positive: then code for magnitude is its direct binary representation. 5. If the value of residual is negative: then code for the magnitude is one's complement of the absolute value Consider ---|---|---|---|--||C|B| ---|---|---|---|--||A|X| ---|---|---|---|--Pixel values A=100, B=191, C=100 and X=180. Let Y = (A+B)/2; (which comes 145.5, but because we are using FLOOR, this will become 145) and the prediction residual is r = 145 - 180 = -35. From Table , belongs to category 6.The binary number for 35 is 100011, and its one's complement is 011100. Thus, is represented as(6,011100). If the Huffman code for six is 1110, then is coded by the

8 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

10-bitcodeword 1110011100. Without entropy coding, would require 16 bits. In the decoder, the category (that is, 6) is extracted first.Thus, the next six bits, 011100, correspond to the magnitude of the residual.Since the most significant bit is zero, the residual is negative. After takingthe one's complement of 011100, the decoded value of the residual r is -35 . The A and B bits have already been decoded; thus Y = 145, as before, and X = Y+35 = 180 Category Prediction Residual

0 1 2

3 4 5

6 7 8

-63, , -32, 32, , 63 -127, ..., -64, 64, , 127 -255, ..., -128, 128, ..., 255

9 10 11

-511, ..., -256, 256, ..., 511 -1023,..., -512, 512, ..., 1023 -2047, ..., -1024, 1024, ..., 2047

12 13

-4095, ..., -2048, 2048, ..., 4095 -8191, ..., -4096, 4096, ..., 8191 -16383, ,-8192, 8192, ..., 16383

14

9 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

15

16

32768

Show parent | Reply

by TUSHAR PAWAR . - Tuesday, 3 April 2012, 06:41 PM

Abhay thanks for solution can u pls explain how u get 17 and 22 after using p6 formula 10 10 10 10 10 17 10 17 22

Show parent | Reply

by ABHAY DUTT PAROHA . - Tuesday, 3 April 2012, 11:42 PM

Show parent | Reply

by SHETH TEJAS NIXIT . - Wednesday, 4 April 2012, 08:17 PM

Show parent | Reply

by SARANG PADMAKAR GAIKI . - Tuesday, 3 April 2012, 11:47 PM

Hello All Thanks for this.Even I was searching for such problems.However I have not understood the concepts. Can some one tell me the source for this.Have you gone thru lectures or it is better illustarted in book.Please let me know. Regards Sarang

Show parent | Reply

by KALLURI RAJESH . - Wednesday, 4 April 2012, 10:33 AM

10 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

abhay, thank you ... I am having only one doubt in the solution about this point ... Point says "it uses only previously encoded neighbors, the very first pixel I(0, 0) will have to use itself. Other pixels at the first row always use P1, at the first column always use P2." By this point ... do we have to apply the formula on predicted values or original values ? In the solution , We are doing on original values only ...

Show parent | Reply

by ABHAY DUTT PAROHA . - Wednesday, 4 April 2012, 10:41 AM

You will apply the formula on original values only. After that, you will get one differt matrix. After this, you need to calculate predictive residuals matrix

Show parent | Reply

by DHEERAJ SHARMA . - Wednesday, 4 April 2012, 11:00 AM

Show parent | Reply

by RAMYA N . - Wednesday, 4 April 2012, 03:07 PM

Show parent | Reply

by PANKAJ RAWAL . - Wednesday, 4 April 2012, 11:10 PM

Hi Abhay, If we need to apply formula only on original values. Then Value @ (0,2) i.e last row first column should apply P2->B prediction so its value as per original values should come as 15 and not 10. Please let me know if i am missing anything. Final result 10 10 10 10 10 17 15 17 22

Show parent | Reply

11 of 12

05-04-2012 02:28

http://taxila.bits-pilani.ac.in/mod/forum/discuss.php?d=4734

An institution deemed to be a University estd. vide Sec.3 of the UGC Act,1956 under notification # F.12-23/63.U-2 of Jun 18,1964 2011-2012 Centre for Software Development,SDET Unit, BITS-Pilani, India. Contact us : taxila@bits-pilani.ac.in

Powered by Moodle

12 of 12

05-04-2012 02:28

- JpegUploaded byYaswanth Ramisetty
- IJCSE11-03-06-090Uploaded byjin11004
- ScribdUploaded byदिनेश मराठवाड्याचा
- Image Compression Using Fourier TechniquesUploaded byEdgar Marca
- OBRT : Lossless Video Compression Using DCT and DWT TechniquesUploaded byseventhsensegroup
- Analysis of Efficient Wavelet Based Volumetric Image CompressionUploaded bykrishna_gbpec
- AhmedUploaded byحماد حسين
- 3d-Mrf Based Video Tracking in the Compressed DomainUploaded byInternational Journal of Research in Engineering and Technology
- %5B2010_TITB%5DHyejungKimUploaded byJubin Jain
- Image Compression FundamentalsUploaded byresmi_ng
- MCA1Uploaded bySuraj Vernekar
- Across Expertise Exploitation Results RealityUploaded bysfofoby
- Huffman CompressionUploaded byMaestroanon
- IJESAT_2012_02_01_12Uploaded byIjesat Journal
- PREPROCESSING FOR PPM: COMPRESSING UTF-8 ENCODED NATURAL LANGUAGE TEXTUploaded byAnonymous Gl4IRRjzN
- UNIT I Unit v e Commerce 2 MarksUploaded byPri YA Jayalakshmi
- Jacquin Fractal Image CompressionUploaded byRajkumar
- Chapter 2.1-Multimedia Storage TechniquesUploaded byhubillanth
- 08 16 Still Image FilesUploaded byMelchor Balolong
- Storage CalcsUploaded byVictor Bitar
- ProEXR ManualUploaded bya4440529
- CP-800_Computer_Audio_Guide.pdfUploaded byTentaciones Maravillosas
- Video Forensic MalaysiaUploaded byRaj Ramachandran
- Sox manualUploaded bymoiibd
- Best Practices to Reduce Existing Volume and Limit Future Growth of Transactional TablesUploaded byReddy
- SpeechUploaded byDavid Ulloa
- 01292602Uploaded bymanabendras_1
- DMM3 SamplerUploaded bySyd Barrett
- Www.techTools.net - Www.thumperDC.comUploaded byBhismo Pasetyo
- 4K Workflow Whitepaper 03-70-00209-00Uploaded byJesús Odremán, El Perro Andaluz 101

- IGCSE Computer Studies Notes on Data Storage (Zafar Ali Khan)Uploaded byEthaniel
- Satellite CommunicationsUploaded byheritage336
- CS Unit 2 2016.pdfUploaded byrobinson123456
- IMAGE-DOCUploaded byVijil Dhas
- Matlab Code for Image Compression Using SPIHT AlgorithmUploaded byArsenalBestly
- ahmed1Uploaded byحماد حسين
- Polycom Video Architecture Overview Sales Guide EnusUploaded byToan Dao
- Rainbow TechnologyUploaded byAbhijeet Mishra
- Nord Sample Editor Manual v2.x (Eng)Uploaded byMarkus Syperek
- Gs Steroids Sgiannec Foss4g2011Uploaded byalfreale744677
- Data CompressionUploaded byPeter Rele
- Lossless Image Compression for Transmitting Over Low Bandwidth LineUploaded byijcsis
- Compression and Information Leakage of PlaintextUploaded byandygen21
- Test Data Compression For Low Power Testing Of VLSI Circuits.pdfUploaded byRobert Theivadas
- Comparative analysis of image compression techniquesUploaded byInternational Journal for Scientific Research and Development - IJSRD
- Compressed Image ProcessingUploaded bysriramecstud
- HowToConvertJPGtoPDFUploaded byJozephyrs
- A Survey: Various Techniques of Image CompressionUploaded byijcsis
- [IJCST-V4I6P24]:Malhar Ujawane, Ashutosh BarveUploaded byEighthSenseGroup
- A Survey on Lossless Compression for Medical ImagesUploaded bykhangtmk
- Image SteganographyUploaded byGeetha Sokkian Rammanohar
- Multimedia Communication vtu unit 3Uploaded byraghudathesh
- A Comparitive Study of Text Compression Algorithms.pdfUploaded byFranz Lorenz Gavera
- Data Compression - Lossless and Lossy TechniquesUploaded byAnonymous vQrJlEN
- Huffman Coding using MATLAB (PoojaS)Uploaded byPooja S
- Improved PrefixSpan Algorithm for Efficient Processing of Large DataUploaded byEditor IJRITCC
- Meridian MLPUploaded bymflemi4
- Mp3 TheoryUploaded bymsatzy
- Basics of Image Processing and AnalysisUploaded byVikrant Viks
- MultimediaUploaded bySenthil R