Thread Subject: Dummies guide to DCT

Subject: Dummies guide to DCT

From: James Turner

Date: 16 Nov, 2006 17:15:00

Message: 1 of 7

Hi,

I was wondering if someone could explain to me the Discrete Cosine
Transform, in as simple as possible English. I have attempted to
read many webpages and books on the transform but this is the first
time I have ever touched upon watermarking and malipulating images,
and I have no previous knowledge of ANY form of watermarking or
manipulating images. I really can't get my head around the process
of the DCT.

Any form of explanation that I may understand over my other sources
would be great (for example, I have tried reading <http://en.wikipedia.org/wiki/Discrete_cosine_transform>
ut I just can't make sense of it).

Many thanks,

James

Subject: Dummies guide to DCT

From: sturlamolden

Date: 16 Nov, 2006 14:29:07

Message: 2 of 7


James Turner wrote:

> I was wondering if someone could explain to me the Discrete Cosine
> Transform, in as simple as possible English.

In the DCT the signal is decomposed into a sum of cosines, as opposed
to the Discrete Fourier transform (DFT) where the signal is decomposed
into a sum of sines and cosines.

Subject: Dummies guide to DCT

From: Greg von Winckel

Date: 16 Nov, 2006 17:42:10

Message: 3 of 7

James Turner wrote:
>
>
> Hi,
>
> I was wondering if someone could explain to me the Discrete Cosine
> Transform, in as simple as possible English. I have attempted to
> read many webpages and books on the transform but this is the first
> time I have ever touched upon watermarking and malipulating images,
> and I have no previous knowledge of ANY form of watermarking or
> manipulating images. I really can't get my head around the process
> of the DCT.
>
> Any form of explanation that I may understand over my other sources
> would be great (for example, I have tried reading <http://en.wikipedia.org/wiki/Discrete_cosine_transform>
> ut I just can't make sense of it).
>
> Many thanks,
>
> James
  

You might want to take a look at my code for transforming between
Chebyshev polynomials and pointspace values. It is effectively a DCT.

 <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4591&objectType=file>

HTH,

Greg

Subject: Dummies guide to DCT

From: James Turner

Date: 16 Nov, 2006 18:35:30

Message: 4 of 7

sturlamolden wrote:
>
>
>
> James Turner wrote:
>
>> I was wondering if someone could explain to me the Discrete
> Cosine
>> Transform, in as simple as possible English.
>
> In the DCT the signal is decomposed into a sum of cosines, as
> opposed
> to the Discrete Fourier transform (DFT) where the signal is
> decomposed
> into a sum of sines and cosines.
>
>
  

Thanks for the respone guys, but I think I need even more reading. I
am lost at "the signal is decomposed into a sum of cosines". I don't
understand what a sum of cosines is! Is there not a way of explaining
DCT assuming that a person ONLY understands what a digital image is
(i.e. a collection of pixels described using bits)? I'm talking
simple so a kid could understand it kind of stuff!

Subject: Dummies guide to DCT

From: Ken Davis

Date: 16 Nov, 2006 18:46:18

Message: 5 of 7

"James Turner" <james_turner_81@hotmail.co.uk> wrote in message
news:ef462d4.2@webcrossing.raydaftYaTP...
> sturlamolden wrote:
>>
>>
>>
>> James Turner wrote:
>>
>>> I was wondering if someone could explain to me the Discrete
>> Cosine
>>> Transform, in as simple as possible English.
>>
>> In the DCT the signal is decomposed into a sum of cosines, as
>> opposed
>> to the Discrete Fourier transform (DFT) where the signal is
>> decomposed
>> into a sum of sines and cosines.
>>
>>
>
>
> Thanks for the respone guys, but I think I need even more reading. I
> am lost at "the signal is decomposed into a sum of cosines". I don't
> understand what a sum of cosines is! Is there not a way of explaining
> DCT assuming that a person ONLY understands what a digital image is
> (i.e. a collection of pixels described using bits)? I'm talking
> simple so a kid could understand it kind of stuff!

I fear you may be in over your head. You really need a little linear algebra
and maybe a little signal/image processing to understand this stuff.

That said, the short answer is that you decompose your image into a weighted
sum of "primitive" images. These primitive images are just sinusoidal waves
of different frequencies in both the x and y directions. When you do a DCT
you are calculating what the values of the weights are. You can transmit the
complete set of weights (or a selected subset of them) and reconstruct the
original image by applying the weights to the appropriate primitive images
and adding them all together.

When you encode information into an image by perturbing the weights, the
effect of the perturbation may be very difficult to see in the reconstructed
image.

Subject: Dummies guide to DCT

From: Rune Allnor

Date: 16 Nov, 2006 15:56:56

Message: 6 of 7


James Turner skrev:
> sturlamolden wrote:
> >
> >
> >
> > James Turner wrote:
> >
> >> I was wondering if someone could explain to me the Discrete
> > Cosine
> >> Transform, in as simple as possible English.
> >
> > In the DCT the signal is decomposed into a sum of cosines, as
> > opposed
> > to the Discrete Fourier transform (DFT) where the signal is
> > decomposed
> > into a sum of sines and cosines.
> >
> >
>
>
> Thanks for the respone guys, but I think I need even more reading. I
> am lost at "the signal is decomposed into a sum of cosines". I don't
> understand what a sum of cosines is! Is there not a way of explaining
> DCT assuming that a person ONLY understands what a digital image is
> (i.e. a collection of pixels described using bits)? I'm talking
> simple so a kid could understand it kind of stuff!

Why do you expect anybody to be able to do that? The DCT is
usually taught in the 3rd or 4th year in university, after at least
two years priming with basic maths and some intro image
processing and DSP courses.

There is a reason why the DCT is not taught to kids.

Rune

Subject: Dummies guide to DCT

From: James Turner

Date: 17 Nov, 2006 04:40:02

Message: 7 of 7

Ken Davis wrote:
>
>
> "James Turner" <james_turner_81@hotmail.co.uk> wrote in
message
> news:ef462d4.2@webcrossing.raydaftYaTP...
>> sturlamolden wrote:
>>>
>>>
>>>
>>> James Turner wrote:
>>>
>>>> I was wondering if someone could explain to me the
Discrete
>>> Cosine
>>>> Transform, in as simple as possible English.
>>>
>>> In the DCT the signal is decomposed into a sum of cosines,
as
>>> opposed
>>> to the Discrete Fourier transform (DFT) where the signal is
>>> decomposed
>>> into a sum of sines and cosines.
>>>
>>>
>>
>>
>> Thanks for the respone guys, but I think I need even more
> reading. I
>> am lost at "the signal is decomposed into a sum of cosines". I
> don't
>> understand what a sum of cosines is! Is there not a way of
> explaining
>> DCT assuming that a person ONLY understands what a digital
image
> is
>> (i.e. a collection of pixels described using bits)? I'm talking
>> simple so a kid could understand it kind of stuff!
>
> I fear you may be in over your head. You really need a little
> linear algebra
> and maybe a little signal/image processing to understand this
> stuff.
>
> That said, the short answer is that you decompose your image into a
> weighted
> sum of "primitive" images. These primitive images are just
> sinusoidal waves
> of different frequencies in both the x and y directions. When you
> do a DCT
> you are calculating what the values of the weights are. You can
> transmit the
> complete set of weights (or a selected subset of them) and
> reconstruct the
> original image by applying the weights to the appropriate primitive
> images
> and adding them all together.
>
> When you encode information into an image by perturbing the
> weights, the
> effect of the perturbation may be very difficult to see in the
> reconstructed
> image.
>
>
>
  

Thank you for your helpful response Ken. Your explanation definitly
helps, and you are right, I need to do more reading. I can't expect
to understand the DCT straight out without understanding the basics
:)

Regards,

James

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com