[Sidefx-houdini-list] COPS - Average Colour Luminance in Image

Jeff Wagner jeff at sidefx.com
Mon Apr 23 10:06:48 EDT 2007


Another way to find the average rgb values of an image is to use a Scale
COP and scale it to 1x1 using the pixel filter. Well I had to use two
Scale COPs: one to go to 2x2 and then down to 1x1.


-jeff

On Fri, 2007-20-04 at 16:23 -0400, Mark Alexander wrote:
> > and this has brought the result within a decent range.
> >  
> > (The result is 3.05 for a white image)
> >  
> > - I'm now multiplying by a 'magic' number 
> > to get the results between 0 and 1
> 
> 
> Ah, right. I forgot to mention you should run it through a Mono COP 
> first to change RGB -> lum, and then just read the Red channel into 
> CHOPs. It's 3x higher than normal because of the 3 RGB channels. Sorry, 
> forgot about that :) At least that should reduce the 0.05 error to 
> around ~0.01, which is probably acceptable.
> 
> M.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
-- 
Jeff Wagner, jeff at sidefx.com, Senior Technology Consultant
Side Effects Software, www.sidefx.com, Toronto, Ontario, M5V 3E7
tel: (416) 504-9876, fax: (416) 504-6648

OldSchool Blog:
http://www.sidefx.com/index.php?option=com_content&task=blogcategory&id=115&Itemid=216



More information about the Sidefx-houdini-list mailing list