Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #5387

Re: darkening colour

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Bartc <bc@freeuk.com>
Newsgroups comp.programming
Subject Re: darkening colour
Date Mon, 06 Apr 2015 14:39:41 +0100
Organization A noiseless patient Spider
Lines 34
Message-ID <mfu298$71p$1@dont-email.me> (permalink)
References <7b8397af-4857-4de4-828f-a1ebe1b83ae1@googlegroups.com> <ti6kvne8w9v.11mahuf4ewkii$.dlg@40tude.net> <c4f6823f-25e4-4a41-b999-25015a70fa68@googlegroups.com> <mfu0vj$2cm$1@dont-email.me> <c9464ca8-40fe-41b5-812b-03099f1e3915@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Mon, 6 Apr 2015 13:38:48 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="cf45b3961a050227b1103bebc3cbc15a"; logging-data="7225"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dZkaQgh1k8W2S3OVethfz"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
In-Reply-To <c9464ca8-40fe-41b5-812b-03099f1e3915@googlegroups.com>
Cancel-Lock sha1:+fpVPScGwSLHnz1XJu1vVjq8iC8=
Xref csiph.com comp.programming:5387

Show key headers only | View raw


On 06/04/2015 14:27, fir wrote:
> W dniu poniedziałek, 6 kwietnia 2015 15:17:32 UTC+2 użytkownik Bart napisał:
>> On 06/04/2015 12:38, fir wrote:

>>> ps for desaturation i use such code
>>>
>>>      float r = color.r;
>>>      float g = color.g;
>>>      float b = color.b;
>>>
>>> float p = sqrt( r*r*.299 + g*g*.587 + b*b*.114 ) ;
>>
>> Where is that formula from? Colour TV used to use:
>>
>>    Y = r*0.3 + g*0.6 +b*0.1
>>
>
> bnot sure uf you dont see that those two are the same (i found it as a random junk in google

If the two formulae do the same thing, then you're going a long way 
about it! Working out squares and square roots...

> http://alienryderflex.com/saturation.html

That doesn't explain it either. Why don't you just try the simpler 
formula and see it if makes a visible difference? If not, then you can 
try and see if a table lookup is quicker.

(I would say that most people wouldn't be able to tell if the colour 
balance is not quite right on a partly desaturated image. Such an image 
is unnatural anyway.)

-- 
Bartc

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 01:12 -0700
  Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-06 10:52 +0200
    Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 11:21 +0100
      Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-06 12:44 +0200
        Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 12:54 +0100
          Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-06 14:27 +0200
          Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 05:51 -0700
    Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 04:38 -0700
      Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-06 14:52 +0200
        Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 06:25 -0700
          Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-06 17:02 +0200
            Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 09:36 -0700
              Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-07 10:52 +0200
                Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-07 02:10 -0700
                Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-07 11:30 +0200
                Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-07 03:24 -0700
                Re: darkening colour "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2015-04-07 13:00 +0200
      Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 14:17 +0100
        Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 06:27 -0700
          Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 14:39 +0100
            Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 06:48 -0700
              Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 16:02 +0100
                Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-06 09:44 -0700
                Re: darkening colour Bartc <bc@freeuk.com> - 2015-04-06 21:05 +0100
                Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-07 00:51 -0700
                Re: darkening colour fir <profesor.fir@gmail.com> - 2015-04-07 01:12 -0700

csiph-web