|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>>> [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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |