FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   luminance==brightness() ???
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: luminance==brightness() ???  (Read 402 times)
sspboyd


luminance==brightness() ???
« on: Apr 28th, 2004, 1:20am »

I just spent a wack of time writing some code to sort a bunch of image slices according to their average luminance values (luminance=0.3*R+0.6*G+0.1B, http://cnx.rice.edu/content/m11084/latest/ ).
 
Having done this, I am wondering what the difference is (if any) between calculating the luminance of a pixel versus getting it's brightness with the brightness() function (or is it a method, I don't know).
 
How is brightness calculated with brightness()?
 
thanks,
steve
 

gmail.com w/ sspboyd username
Quasimondo

WWW Email
Re: luminance==brightness() ???
« Reply #1 on: Apr 28th, 2004, 10:57am »

If you convert RGB to HSV (Hue/Saturation/Value, also called HSB, B for Brightness), the Brightness is defined as:
 
max (red, green, blue);
 

Mario Klingemann | Quasimondo | Incubator | côdeazur
fry


WWW
Re: luminance==brightness() ???
« Reply #2 on: Apr 28th, 2004, 1:37pm »

yep, and that's how the brightness() calculation is done (since it's part of the hsb calc). luminosity is in fact different, though their intent/use is often identical.
 
Pages: 1 

« Previous topic | Next topic »