# basic questions on jpeg compression

Started by April 12, 2012
```robert bristow-johnson <rbj@audioimagination.com> wrote:

(snip, I wrote)

>> It seems to me that you could also quantize a continuous time signal,
>> though the result wouldn't be contiguous (in the mathematical sense).

> hmmm.  what'sa mathematically contiguous result?  another hmmm
> i don't understand yet.

One you can draw without lifting the pencil off the paper.

-- glen

```
```On 4/12/12 5:59 PM, glen herrmannsfeldt wrote:
> robert bristow-johnson<rbj@audioimagination.com>  wrote:
>
> (snip, I wrote)
>
>>> It seems to me that you could also quantize a continuous time signal,
>>> though the result wouldn't be contiguous (in the mathematical sense).
>
>> hmmm.  what'sa mathematically contiguous result?  another hmmm
>> i don't understand yet.
>
> One you can draw without lifting the pencil off the paper.

can you move the pencil vertically (like a staircase function)?

and the word i might have used is "continuous".  if you're in mathland
and say "continuous" as a property, i think of what you're saying about
not needing to lift the pencil.  but when you say "contiguous" i think
of adjacent regions in a domain that touch each other with no space in
between.

--

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."

```
```robert bristow-johnson <rbj@audioimagination.com> wrote:
(snip, I wrote)

>>>> It seems to me that you could also quantize a continuous time signal,
>>>> though the result wouldn't be contiguous (in the mathematical sense).

(snip)
> and the word i might have used is "continuous".

Oh, yes, I meant continuous. I don't know how that happened. It is
right in one line, and not the next.

> if you're in mathland and say "continuous" as a property,
> i think of what you're saying about not needing to lift
> the pencil.  but when you say "contiguous" i think of adjacent
> regions in a domain that touch each other with no space in between.

And I didn't even notice when you asked that I wrote the wrong one.

-- glen
```
```On 12 Apr., 19:10, Tim Wescott <t...@seemywebsite.com> wrote:

snip
> Do this simple experiment:
>
> Go harvest a picture of something of aesthetic value off of the Internet
> (I'm trying to get my mind out of the gutter, so I won't suggest porn --
> directly).
>
snip

The most famous picture ever in image processing is the Playmate from
November 1972
Lena S&#2013266166;derberg

;)

-Lasse
```
```On Fri, 13 Apr 2012 13:55:20 -0700, langwadt@fonz.dk wrote:

> On 12 Apr., 19:10, Tim Wescott <t...@seemywebsite.com> wrote:
>
> snip
>> Do this simple experiment:
>>
>> Go harvest a picture of something of aesthetic value off of the
>> Internet (I'm trying to get my mind out of the gutter, so I won't
>> suggest porn -- directly).
>>
> snip
>
> The most famous picture ever in image processing is the Playmate from
> November 1972
> Lena S&ouml;derberg

I know.  And then they went and cropped it at her shoulder.  :(

http://en.wikipedia.org/wiki/Lenna

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com
```
```On Fri, 13 Apr 2012 16:12:41 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Fri, 13 Apr 2012 13:55:20 -0700, langwadt@fonz.dk wrote:
>
>> On 12 Apr., 19:10, Tim Wescott <t...@seemywebsite.com> wrote:
>>
>> snip
>>> Do this simple experiment:
>>>
>>> Go harvest a picture of something of aesthetic value off of the
>>> Internet (I'm trying to get my mind out of the gutter, so I won't
>>> suggest porn -- directly).
>>>
>> snip
>>
>> The most famous picture ever in image processing is the Playmate from
>> November 1972
>> Lena S&ouml;derberg
>
>I know.  And then they went and cropped it at her shoulder.  :(
>
>http://en.wikipedia.org/wiki/Lenna
>
>--
>My liberal friends think I'm a conservative kook.
>My conservative friends think I'm a liberal kook.
>Why am I not happy that they have found common ground?
>
>Tim Wescott, Communications, Control, Circuits & Software
>http://www.wescottdesign.com

My fave bit was that she was a guest at and spoke at the 50th annual
ICT conference ni 1997:

http://en.wikipedia.org/wiki/Lena_S%C3%B6derberg

Eric Jacobsen
Anchor Hill Communications
www.anchorhill.com
```
```On 12.04.2012 11:43, manishp wrote:
> Folks,
>
> I have few basic questions on related to compression used in JPEG.
>
>   1. Is the DCT applied over Y, CB and CR separately?

Yes.

>   2. Is there a specific reason why DCT is chosen over DFT?

The way I look at it this is basically because the DCT is a real to real
transformation, whereas DFT creates complex (but symmetric) numbers.

>   3. Can quantization step be roughly seen as a filter since it basically
> tones down high frequency components?

Not really. The quantization causes distortion as already mentioned. DCT
is picked because it is for natural images close to the transformation
that decorrelates the signal, i.e. it is almost the KLT. Under a certain
abstraction quantization in the DCT domain is then (almost) optimal in
the rate-distortion sense. (This is actually not precisely true, but it
would be true if the transformed data would be Gaussian).
>   4. Another related question is, in an earlier question I had asked if
>   filters really need conversion from time to frequency domain before they
> can operate. The response was that filters are designed to operate directly
> on time domain inputs and no conversion is normally needed.

There is no need to make a precise time (or spacial) to frequency domain
transformation. Rather, you want to run a transformation that makes the
signal components afterwards independent (ideally) to maximize the
rate-distortion performance of the overall lossy transformation. KLT
creates only uncorrelated components (not the same, only for Gaussians
this is the same), and the DCT is neither exactly the KLT (though it
would if the image would consist of data whose correlation only depends
on the pixel position difference).

Greetings,
Thomas

```
```On 4/13/2012 8:43 PM, Eric Jacobsen wrote:
> On Fri, 13 Apr 2012 16:12:41 -0500, Tim Wescott<tim@seemywebsite.com>
> wrote:
>
>> On Fri, 13 Apr 2012 13:55:20 -0700, langwadt@fonz.dk wrote:
>>
>>> On 12 Apr., 19:10, Tim Wescott<t...@seemywebsite.com>  wrote:
>>>
>>> snip
>>>> Do this simple experiment:
>>>>
>>>> Go harvest a picture of something of aesthetic value off of the
>>>> Internet (I'm trying to get my mind out of the gutter, so I won't
>>>> suggest porn -- directly).
>>>>
>>> snip
>>>
>>> The most famous picture ever in image processing is the Playmate from
>>> November 1972
>>> Lena S&ouml;derberg
>>
>> I know.  And then they went and cropped it at her shoulder.  :(
>>
>> http://en.wikipedia.org/wiki/Lenna
>>
>> --
>> My liberal friends think I'm a conservative kook.
>> My conservative friends think I'm a liberal kook.
>> Why am I not happy that they have found common ground?
>>
>> Tim Wescott, Communications, Control, Circuits&  Software
>> http://www.wescottdesign.com
>
> My fave bit was that she was a guest at and spoke at the 50th annual
> ICT conference ni 1997:
>
> http://en.wikipedia.org/wiki/Lena_S%C3%B6derberg

She was a grandmother by then, still strikingly beautiful. Her English
is delightful.

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```