POV-Ray : Newsgroups : povray.off-topic : A question of pure mathematics Server Time
11 Oct 2024 11:12:10 EDT (-0400)
  A question of pure mathematics (Message 6 to 15 of 25)  
<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Warp
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 04:51:30
Message: <4742ae22@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> JPEG compression works by decomposing an image into a set of (2D) cosine 
> waves, and then quantinising the data. In my opinion, cosines are not 
> actually a particularly good choice for this. (Gibb's phenominon is very 
> ugly to look at.) So I'd like to try it with other functions - but first 
> I need to work out how...

  So you are going to reinvent JPEG2000 then?-)

-- 
                                                          - Warp


Post a reply to this message

From: scott
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 04:56:02
Message: <4742af32$1@news.povray.org>
>> This isn't quite true over the reals, even assuming you're only looking 
>> for functions with a given period.  For example the function which is 
>> zero everywhere except being 1 at a single point will generate the same 
>> Fourier representation as the constant zero function since it will have 
>> the same integrals.
>
> O RLY?
>
> My DSP textbook says the Fourier transform of the delta function yields an 
> amplitude of 1 for all frequencies. (Whereas the Fourier transform of a 
> zero signal would be a zero signal.)

A function that is 0 everywhere except for f(0)=1 is not a delta funciton. 
A delta function has f(0)=infinity and when integrated it gives a non-zero 
value (ie it has area, unlike the function Kevin described).

> JPEG compression works by decomposing an image into a set of (2D) cosine 
> waves, and then quantinising the data. In my opinion, cosines are not 
> actually a particularly good choice for this. (Gibb's phenominon is very 
> ugly to look at.) So I'd like to try it with other functions - but first I 
> need to work out how...

Have you read:

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


Post a reply to this message

From: Invisible
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 04:57:29
Message: <4742af89$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> JPEG compression works by decomposing an image into a set of (2D) cosine 
>> waves, and then quantinising the data. In my opinion, cosines are not 
>> actually a particularly good choice for this. (Gibb's phenominon is very 
>> ugly to look at.) So I'd like to try it with other functions - but first 
>> I need to work out how...
> 
>   So you are going to reinvent JPEG2000 then?-)

Nah. JPEG2000 uses wavelets - a technology I have repeatedly failed to 
comprehend. I'm just using a decomposition with a different set of basis 
functions. ;-)

[We casually overlook the fact that JPEG doesn't work in the RGB colour 
space, it works in some weird custom space to better accomodate the 
peculiarities of the human eye. There's also several layers of plain 
ordinary lossless compression happening in addition to the lossy DCT 
quantinisation step. And... basically JPEG is complicated. I'm only 
trying to frobnicate one tiny step in the process.]


Post a reply to this message

From: Invisible
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 05:01:12
Message: <4742b068$1@news.povray.org>
scott wrote:
>>> This isn't quite true over the reals, even assuming you're only 
>>> looking for functions with a given period.  For example the function 
>>> which is zero everywhere except being 1 at a single point will 
>>> generate the same Fourier representation as the constant zero 
>>> function since it will have the same integrals.
>>
>> O RLY?
>>
>> My DSP textbook says the Fourier transform of the delta function 
>> yields an amplitude of 1 for all frequencies. (Whereas the Fourier 
>> transform of a zero signal would be a zero signal.)
> 
> A function that is 0 everywhere except for f(0)=1 is not a delta 
> funciton. A delta function has f(0)=infinity and when integrated it 
> gives a non-zero value (ie it has area, unlike the function Kevin 
> described).

http://en.wikipedia.org/wiki/Kronecker_delta
http://en.wikipedia.org/wiki/Dirac_delta_function

So you see, we are in fact both right, for a suitable definition of 
"delta function". (I'm going by a DSP textbook.)

The Dirac delta doesn't interest me - my signals won't ever contain 
infinity.

> Have you read:
> 
> http://en.wikipedia.org/wiki/Wavelet

I have. Multiple times. I still don't understand.


Post a reply to this message

From: Warp
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 05:05:32
Message: <4742b16c@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> [We casually overlook the fact that JPEG doesn't work in the RGB colour 
> space, it works in some weird custom space to better accomodate the 
> peculiarities of the human eye.

  It's not a "custom space". It's the YCbCr color space, which has been
used in television and video for like 50 years.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 05:13:00
Message: <4742b32c$1@news.povray.org>
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> [We casually overlook the fact that JPEG doesn't work in the RGB colour 
>> space, it works in some weird custom space to better accomodate the 
>> peculiarities of the human eye.
> 
>   It's not a "custom space". It's the YCbCr color space, which has been
> used in television and video for like 50 years.

OK, I rephrase: It looks pretty exotic to me. ;-)


Post a reply to this message

From: scott
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 06:05:22
Message: <4742bf72@news.povray.org>
>> A function that is 0 everywhere except for f(0)=1 is not a delta 
>> funciton. A delta function has f(0)=infinity and when integrated it gives 
>> a non-zero value (ie it has area, unlike the function Kevin described).
>
> http://en.wikipedia.org/wiki/Kronecker_delta
> http://en.wikipedia.org/wiki/Dirac_delta_function
>
> So you see, we are in fact both right, for a suitable definition of "delta 
> function". (I'm going by a DSP textbook.)
>
> The Dirac delta doesn't interest me - my signals won't ever contain 
> infinity.

Ok, well if you are dealing with discrete digital functions then the concept 
of a function having "zero area" doesn't really make any sense, so yes, any 
function can be made from a series of sine and cosines.

>> Have you read:
>>
>> http://en.wikipedia.org/wiki/Wavelet
>
> I have. Multiple times. I still don't understand.

Did you check out some of the links at the bottom?  I just read this one and 
it was ok to understand:

http://users.rowan.edu/~polikar/WAVELETS/WTtutorial.html


Post a reply to this message

From: Invisible
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 06:09:39
Message: <4742c073$1@news.povray.org>
scott wrote:
>> The Dirac delta doesn't interest me - my signals won't ever contain 
>> infinity.
> 
> Ok, well if you are dealing with discrete digital functions then the 
> concept of a function having "zero area" doesn't really make any sense, 
> so yes, any function can be made from a series of sine and cosines.

...and hopefully some other functions too? :-)

>>> Have you read:
>>>
>>> http://en.wikipedia.org/wiki/Wavelet
>>
>> I have. Multiple times. I still don't understand.
> 
> Did you check out some of the links at the bottom?  I just read this one 
> and it was ok to understand:
> 
> http://users.rowan.edu/~polikar/WAVELETS/WTtutorial.html

I read that back in 1997. (Yes, that's how old it is.) I had trouble 
understanding it back then, and having reread it a few times since then, 
I still have trouble comprehending it.

I think essentially wavelets are just too complicated to understand. So 
I'll stick with my original approach...


Post a reply to this message

From: scott
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 06:45:13
Message: <4742c8c9$1@news.povray.org>
>>> [We casually overlook the fact that JPEG doesn't work in the RGB colour 
>>> space, it works in some weird custom space to better accomodate the 
>>> peculiarities of the human eye.
>>
>>   It's not a "custom space". It's the YCbCr color space, which has been
>> used in television and video for like 50 years.
>
> OK, I rephrase: It looks pretty exotic to me. ;-)

It's much better than RGB for two reasons.

1) The Y matches the high resolution bit of your eye, and the CbCr bits 
match the lower resolution color detector bits of your eye.  Thus they can 
be compressed different amounts.

2) Equal distances in the CbCr space give a roughly equal difference in 
colour perception.

If you tried to compress RGB channels separately the same amount as a YCbCr 
signal it would look much worse.


Post a reply to this message

From: Invisible
Subject: Re: A question of pure mathematics
Date: 20 Nov 2007 06:48:14
Message: <4742c97e$1@news.povray.org>
scott wrote:

>> OK, I rephrase: It looks pretty exotic to me. ;-)
> 
> It's much better than RGB for two reasons.
> 
> 1) The Y matches the high resolution bit of your eye, and the CbCr bits 
> match the lower resolution color detector bits of your eye.  Thus they 
> can be compressed different amounts.
> 
> 2) Equal distances in the CbCr space give a roughly equal difference in 
> colour perception.
> 
> If you tried to compress RGB channels separately the same amount as a 
> YCbCr signal it would look much worse.

Yes, I'm sure this is exactly why they use it. Still, it's not very easy 
to comprehend...

(Similarly, almost all known audio codecs don't compress the left and 
right stereo channels seperately; they compress "center and side" 
instead, since usually the side channel will contain very much less 
signal energy - and getting it wrong is far less serious sonically.)

PS. Is this why all MPEG-based algorithms utterly mutilate blue images?


Post a reply to this message

<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.