We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › PImage.mask() -- Why use Blue
Page Index Toggle Pages: 1
PImage.mask() -- Why use Blue? (Read 372 times)
PImage.mask() -- Why use Blue?
Apr 26th, 2006, 8:10pm
 
Why does mask reference the blue instead of brightness?  Is this standard for image masks?  Does brightness actually do a bunch of calculation with R, G, and B so blue is faster?
Re: PImage.mask() -- Why use Blue?
Reply #1 - Apr 27th, 2006, 3:19am
 
just cuz it's cheap and easy and works well enough most of the time. if you want more accurate, use filter(GRAY) on the image first, which will do a proper luminance calculation. or if you want brightness, you can iterate through the pixels and take max(r, g, b). we should probably add that to the reference if it's not there already.
Page Index Toggle Pages: 1