Vous êtes sur la page 1sur 3

S2-11_EAZC473: DCT Calculation in EC3

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

WILP

S2-11_EAZC473 Forums General Discussion Forum DCT Calculation in EC3

DCT Calculation in EC3


by DHEERAJ SHARMA . - Wednesday, 28 March 2012, 12:12 AM

I am unable to use the 2D DCT equation to solve old question papers. Its a very lengthy equation. Any smart guy knows how to find the DCT for a 3x3 block with given quantization table.

Re: DCT Calculation in EC3


by ROSHNA A K . - Wednesday, 28 March 2012, 10:52 AM

There is no other choice but to use the lengthy equation

DCT and IDCT is a tedious process especially if its a 8 x 8 matrix.

Frankly speaking the marks donot justify the time we spend solving the question.
Show parent | Reply

Re: DCT Calculation in EC3


by DHEERAJ SHARMA . - Wednesday, 28 March 2012, 12:23 PM

Thanks Roshna for a reconfirmation.


Show parent | Reply

Re: DCT Calculation in EC3


by RACHNA AGARWAL . - Wednesday, 28 March 2012, 04:57 PM

Hi Roshan , Could you please share an approach to apply it. Regards, Rachna
Show parent | Reply

Re: DCT Calculation in EC3


by ROSHNA A K . - Wednesday, 28 March 2012, 08:36 PM

Rachna, there is no approach as such. You have to substitute the values from the matrix in the formula and calculate the values. What approach are you looking for specifically?
Show parent | Reply

1 of 3

05-04-2012 02:27

S2-11_EAZC473: DCT Calculation in EC3

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

Re: DCT Calculation in EC3


by ABHAY DUTT PAROHA . - Wednesday, 28 March 2012, 04:50 PM

I have one doubt. Can we apply the same 2D DCT equation here which we generally use for 8X8 blocks? (because we have 3X3 blocks, so what would be value of N which denotes size)
Show parent | Reply

Re: DCT Calculation in EC3


by DHEERAJ SHARMA . - Wednesday, 28 March 2012, 04:52 PM

N,M would be 3,3


Show parent | Reply

Re: DCT Calculation in EC3


by ROSHNA A K . - Wednesday, 28 March 2012, 08:38 PM

M x N is the order of the matrix. so for 8 x 8, M = 8 and N=8 for 3 x 3, M=3 and N=3.
Show parent | Reply

Re: DCT Calculation in EC3


by DHEERAJ SHARMA . - Wednesday, 28 March 2012, 08:53 PM

Roshna, I am having trouble to expand the equation and in substitution of values. would it be possible for you to give an example solution by expanding the eqaution for a 3x3 table.(having trouble substituing the values in equation and ultimately using calculator). Your help would be really appreciable by all who are struggling with this problem.

Show parent | Reply

Re: DCT Calculation in EC3


by ROSHNA A K . - Wednesday, 28 March 2012, 09:19 PM

Ok am not a pro, but i'll try. I couldn't do this in EC-2

Learnt it now for Open book

1. First do the range shifting by subtracting 128 from each value of the matrix. Ex. at (0,0) 70-128 = -58. This is value of f(0,0). Do the same for all other values. 2. Apply DCT for all values of the matrix by substituting values. Ex. H(0,0)=2/root(8*8) * C(0) * C(0) * [f(0,0) * cos 0 * cos 0 + f(0,1) * cos 0 * cos 0 + f(0,2) * cos 0 * cos 0 + f(1,0) * cos 0 * cos 0 + f(1,1) * cos 0 * cos 0 + f(1,2) * cos 0 * cos 0 + f(2,0) * cos 0 * cos 0 + f(2,1) * cos 0 * cos 0 + f(2,2) * cos 0 * cos 0] Here C(0) = 1/root(2) because index is 0. all the cos terms are cos 0 because both u and v are 0. (According to the equation) It's tough to explain by typing the solution. Hope you understood.
Show parent | Reply

Re: DCT Calculation in EC3


by OMAARATHI S . - Thursday, 29 March 2012, 11:28 PM

hey Roshna very good effort and explained ur best and got the prb thq for it
Show parent | Reply

Re: DCT Calculation in EC3


by RUPAYAN DUTTA . - Saturday, 31 March 2012, 09:06 PM

Hi Roshna, Thanks for giving the hint but I have a doubt. Why are we doing 2/root(8*8) instead of 2/root(3*3)? Please correct me if I am wrong. Regards Ruapayn
Show parent | Reply

Re: DCT Calculation in EC3


by ROSHNA A K . - Sunday, 1 April 2012, 05:40 PM

you are right. sorry it should be 3 x 3. Thanks for pointing it out


Show parent | Reply

Re: DCT Calculation in EC3


by DHEERAJ SHARMA . - Friday, 30 March 2012, 02:11 AM

Folks solving this mathematically using the DCT 2D equation in exam would take mote than 1 hour. Anybody has a better idea. please help as this is a real important question. If somebody could throw some light please.
Show parent | Reply

Re: DCT Calculation in EC3


by SOUNAV MAIKAP . - Saturday, 31 March 2012, 12:19 AM

There is no better way. The solution as follows (exactly like ROSANA): (a) Sub 128 from each element of the matrix (getting a new matrix say M) (b) Use the matrix like below: a = .3536 b = .4904 c = .4157 d = .2778

2 of 3

05-04-2012 02:27

S2-11_EAZC473: DCT Calculation in EC3

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

e = .0975 f = .4619 g = .1913 use a 8x8 a a b c f g c -e T = a -a d -b g -f e -d matrix (for a a a a d e -e -d -g -f -f -g -b -d d b -a a a -a e c -c -e f -g -g f c -b b -c real JPEG problems) or use a 4 x 4 for the problem in question a a -c -b g f e -c -a a b -d -f g d -e

The reason why I am proposing the above hard core values, is that if you compute according to ROSANA using calculator you will end with a different value than the one mentioned (I did). You need to use Taylor series for proper precision (http://en.wikipedia.org /wiki/Taylor_series). Otherwise remember the hard core values for time limitation. (c) Compute the product D = TMT' (T' is the transpose) (d) Quantization requires you divide each element of D by the corresponding element in the Quantization matrix Attaching with dct.pdf Hope the above helps
Show parent | Reply

Re: DCT Calculation in EC3


by DHEERAJ SHARMA . - Saturday, 31 March 2012, 10:39 AM

Sounav, Thanks for a breakthrough for this problem.Just one question. Can we use a 4X4 matrix as T even is the table input is 3X3 as in the above question.
Show parent | Reply

Re: DCT Calculation in EC3


by SOUNAV MAIKAP . - Sunday, 1 April 2012, 04:59 PM

whatever is the input crop T to that. In this case (I some how missed the 3x3 matrix) 3x3 should be OK for the value of T.
Show parent | Reply

Re: DCT Calculation in EC3


by ANU . - Monday, 2 April 2012, 02:15 PM

Can you please attach the dct.pdf again. I didnt find the attachment. Thanks
Show parent | Reply

Re: DCT Calculation in EC3


by HARIHARA PRASAD MUVVALA . - Tuesday, 3 April 2012, 07:42 AM

Hi Sounav, Could you please re-attach the dct.pdf. Thanks Hari Hara
Show parent | Reply

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

3 of 3

05-04-2012 02:27

Vous aimerez peut-être aussi