| View previous topic :: View next topic |
| Author |
Message |
Stefano Brocchi Guest
|
Posted: Thu Jun 19, 2008 2:23 pm Post subject: Re: Why channel decorrelation can improve compression? |
|
|
On Jun 18, 12:04 pm, danilobrambi...@tiscali.it wrote:
[quote](r + 2g + b) / 4 -> y
b - y -> cb
r - y -> cr
[/quote]
Hi,
consider that you will have to use an extra bit to the y channel to
make the transform completely reversible, otherwise you could lose a
bit in the g channel. For example (r=0, g=0, b=0) and (r=0, g=1, b=0)
both map to (0,0,0): in one of the two cases when reversing the
transform a value will be worng.
So long,
Stefano |
|
| |
|
Back to top |
Thomas Richter Guest
|
Posted: Thu Jun 19, 2008 8:10 pm Post subject: Re: Why channel decorrelation can improve compression? |
|
|
Thomas Richter schrieb:
[quote]smithxjohn@gmail.com wrote:
On Jun 17, 8:39 pm, Thomas Richter <t...@math.tu-berlin.de> wrote:
danilobrambi...@tiscali.it wrote:
Hi,
I am trying to understand why channel decorrelation can improve
compression in RGB24 images. Why in general (G, R-G, B-G) would
compress better than (R,G,B)? Can you suggest me any book/web site
where I can read about this?
One can give two reasons, depending on your definition of "compression".
One reason is that it is a property of natural images, i.e. color
channels are highly correlated because typically colors are not very
extreme, and most pixels lie inside the color gammut, showing mostly
variation in luminance, but not very extreme variation in color. One
might say that this is probably because the dyes of nature are never
"perfect" and do not generate pure colors.
Color differencing doesn>t always works nicely. Are there better
methods when goal is just lossless compression?
Sure. One option is the RCT of JPEG2000 which uses better "color
weights", namely
(r + 2g + b) / 4 -> y
b - y -> cb
r - y -> cr
[/quote]
Sorry, my fault. This should be
b - g -> cb
and
r - g -> cr
So long,
Thomas |
|
| |
|
Back to top |
cr88192 Guest
|
Posted: Fri Jun 20, 2008 12:21 pm Post subject: Re: Why channel decorrelation can improve compression? |
|
|
"Thomas Richter" <thor@math.tu-berlin.de> wrote in message
news:g3dsic$62u$1@infosun2.rus.uni-stuttgart.de...
[quote]Thomas Richter schrieb:
smithxjohn@gmail.com wrote:
[/quote]
<snip>
[quote]
Sure. One option is the RCT of JPEG2000 which uses better "color
weights", namely
(r + 2g + b) / 4 -> y
b - y -> cb
r - y -> cr
Sorry, my fault. This should be
b - g -> cb
and
r - g -> cr
[/quote]
hmm:
y = (r + 2g + b) / 4
cb = b - g
cr = r - g
inverting:
g = (4y - cb - cr) / 4
r = cr + g
b = cb + g
ok, would still need to verify that this works though...
[quote]So long,
Thomas[/quote] |
|
| |
|
Back to top |
Guest
|
Posted: Mon Jun 23, 2008 9:55 am Post subject: Re: Why channel decorrelation can improve compression? |
|
|
[quote]This one works far better than (G, R-G, B-G) for my algorithm.
[/quote]
Yes, of corse it is no more lossless, as sayd below :-( |
|
| |
|
Back to top |
|