🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: sci.image.processing
7 messages
7 total messages Started by YewSim Cheah Wed, 06 Jan 1993 07:33
Sorting RGB Palette in Intensity Order. Please Help !
#907
Author: YewSim Cheah
Date: Wed, 06 Jan 1993 07:33
12 lines
789 bytes
Dear Fellow Netters:

I would like to sort an array of RGB Palette in intensity order,
but do not know how.  Does anybody please help ?

Thankyou

-- 
   __     *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  / __\  /_           name: YewSim Cheah.  alias: Xie Yaosen.
 / /__`\//_//   / campus: California State University, Chico. 
/_,__/_//_, \/\/           internet: csyew@ecst.csuchico.edu.
Re: Sorting RGB Palette in Intensity Order. Please Help !
#928
Author: Wayne Rasband
Date: Thu, 07 Jan 1993 15:12
11 lines
877 bytes
In article <1ie20sINNe78@charnel.ecst.csuchico.edu>,
csyew@ecst.csuchico.edu (YewSim Cheah) wrote:
> 
> I would like to sort an array of RGB Palette in intensity order,
> but do not know how.  Does anybody please help ?
> 
NIH Image for the Macintosh can sort RGB palettes in intensity order. It is
available, including complete source, from zippy.nimh.nih.gov, in the
directory /pub/image.

--wayne
Re: Sorting RGB Palette in Intensity Order. Please Help !
#968
Author: smith
Date: Sat, 09 Jan 1993 18:48
11 lines
1119 bytes
> I would like to sort an array of RGB Palette in intensity order,
> but do not know how.  Does anybody please help ?
> 
I sort first by min(r,g,b), then by saturation and then intensity.  The goal 
(I assume) is to get a sorted set of indices that displays reasonably as B&W. 
Intensity=(r+g+b)/3.

+----------------------------------------------------------------------------+
|Ross Smith,  Research Computing Resource, Department of Cell Biology, NYU-MC|
|E-Mail:  SMITH@NYUMED.BITNET (BITNET),   SMITH@MCCLB0.MED.NYU.EDU (Internet)|
+----------------------------------------------------------------------------+
Re: Sorting RGB Palette in Intensity Order. Please Help !
#975
Author: Pigeon Steven
Date: Sun, 10 Jan 1993 03:46
33 lines
1700 bytes
In article <1993Jan9.134848.7175@mcclb0.med.nyu.edu> smith@mcclb0.med.nyu.edu writes:
>> I would like to sort an array of RGB Palette in intensity order,
>> but do not know how.  Does anybody please help ?
>> 
>I sort first by min(r,g,b), then by saturation and then intensity.  The goal 
>(I assume) is to get a sorted set of indices that displays reasonably as B&W. 
>Intensity=(r+g+b)/3.
>
>+----------------------------------------------------------------------------+
>|Ross Smith,  Research Computing Resource, Department of Cell Biology, NYU-MC|
>|E-Mail:  SMITH@NYUMED.BITNET (BITNET),   SMITH@MCCLB0.MED.NYU.EDU (Internet)|
>+----------------------------------------------------------------------------+


NOT! >Intensity=(r+g+b)/3.

The actual Intensity value is:


 Intensity:=(r*0.299)+(g*0.587)+(b*0.114)

giving intensity as [0..1]. These are to a few decimal, but more precise
coeff. are hard to find.

	Regards,
		S.


-- 
------------------------------------------------------------
 STEVEN PIGEON, a.k.a pigeons@jsp.umontral.ca, planet Earth.
==Departement d'informatique et de Recherche Operationnelle=
              == Universite de Montreal==
Re: Sorting RGB Palette in Intensity Order. Please Help !
#1035
Author: Reiner Eschbach
Date: Tue, 12 Jan 1993 13:16
20 lines
1652 bytes
In article <1993Jan9.134848.7175@mcclb0.med.nyu.edu> smith@mcclb0.med.nyu.edu writes:
>I sort first by min(r,g,b), then by saturation and then intensity.  The goal 
>(I assume) is to get a sorted set of indices that displays reasonably as B&W. 
>Intensity=(r+g+b)/3.

I would recommend Y = 0.253r + 0.684g + 0.0634b. Try to display
(r,g,b)=(0,0,127) and = (0,127,0) and tell me whether you think they have the
same intensity.
In general I would recommend to be careful if you have to make any color to
b&w conversions. HSV etc. do a very lousy job and one should stick to
something like YES, YIQ, YCC, XYZ for the intensity part ( those four color
spaces have the same Y component, although I am not absolutely certain for the
Kodak YCC )

Reiner

>+----------------------------------------------------------------------------+
>|Ross Smith,  Research Computing Resource, Department of Cell Biology, NYU-MC|
>|E-Mail:  SMITH@NYUMED.BITNET (BITNET),   SMITH@MCCLB0.MED.NYU.EDU (Internet)|
>+----------------------------------------------------------------------------+
Re: Sorting RGB Palette in Intensity Order. Please Help !
#1014
Author: Lionel Tun
Date: Tue, 12 Jan 1993 14:57
19 lines
1217 bytes
pigeons@JSP.UMontreal.CA (Pigeon Steven) writes:
>NOT! >Intensity=(r+g+b)/3.
>
>The actual Intensity value is:
>
>
> Intensity:=(r*0.299)+(g*0.587)+(b*0.114)

Why is this the case? Is it related to the sensitivity of the eye
for the different primary cones, or is it to do with physics?

Does it mean that green is the 'dimmest' colour and blue is
the 'brightest'? Does it also mean the RGB model is not ideal?

--
  ________  Lionel Tun, lionel@cs.city.ac.uk  ________
 / /_  __/\       Computer Vision Group      /\ \__  _\
/___/_/_/\/ City University, London EC1V 0HB \ \___\_\_\
\___\_\_\/        071-477 8000 ext 3889       \/___/_/_/
Re: Sorting RGB Palette in Intensity Order. Please Help !
#1026
Author: Jeffrey Mulligan
Date: Tue, 12 Jan 1993 22:49
33 lines
1704 bytes
lionel@cs.city.ac.uk (Lionel Tun) writes:

>pigeons@JSP.UMontreal.CA (Pigeon Steven) writes:
>>NOT! >Intensity=(r+g+b)/3.
>>
>>The actual Intensity value is:
>>
>>
>> Intensity:=(r*0.299)+(g*0.587)+(b*0.114)

>Why is this the case? Is it related to the sensitivity of the eye
>for the different primary cones, or is it to do with physics?

Both.  The formula reflects the sensitivity of the eye to different
wavelengths (the luminosity function), in combination with the
physical emission spectra of the standard NTSC phosphors.

There are a lot of phosphors in use besides the "standard" ones,
so if it is important, the weights need to be measured.

Nit:  the above formula is for luminance.  What is "intensity?"

>Does it mean that green is the 'dimmest' colour and blue is
>the 'brightest'? Does it also mean the RGB model is not ideal?

Backwards.  Green has the larges weight because it makes the largest
contribution to luminance.

-- 

	Jeff Mulligan (jbm@vision.arc.nasa.gov)
	NASA/Ames Research Ctr., MS 262-2, Moffett Field CA, 94035-1000
	(415) 604-3745
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads