[Radiance-general] pcomb to clip specific colors

Greg Ward gregoryjward at gmail.com
Wed Jan 16 11:43:56 PST 2013


Whoops -- bad edit on that line.  Try this one:

	pcomb -e 'and(a,b):if(a,b,a)' -e 'ypix=and(.01*ri(1)-bi(1),.01*gi(1)-bi(1))'  \
			-e 'ro=if(ypix,1,0);go=if(ypix,1,0);bo=0' input.hdr > output.hdr


> From: Greg Ward <gregoryjward at gmail.com>
> Date: January 16, 2013 11:08:09 AM PST
> 
> Hi Chris,
> 
> I'm not sure I understand what  you're after, exactly.  The following will turn all pixels black except those with a nearly-zero blue channel and non-zero red and green channels:
> 
> 	pcomb -e 'and(a,b):if(a,b,a)' -e 'ypix=and(.01*ri(1)-bi(1),.01*gi(1)-bi(1))' -e 'ypix=is_yellow(ri(1),gi(1),bi(1))' \
> 			-e 'ro=if(ypix,1,0);go=if(ypix,1,0);bo=0' input.hdr > output.hdr
> 
> The and() expression returns positive if both red and green channels are more than 100 times the blue channel.  We can't compare blue to zero due to limitations in the accuracy of RGBE pixel values.
> 
> -Greg
> 
>> From: Humann Chris <chris at coolshadow.com>
>> Date: January 16, 2013 10:47:38 AM PST
>> 
>> Dear group,
>> 
>> I would like to use 'pcomb' to clip yellow reflections (r,g,b=1,1,0) coming off of the same colored mirrored glass on a facade system and write to a new image such that only these reflections are shown.  I thought I'd pestered the group enough times on 'pcomb' matters to figure this out using the many great responses I've received over the years, but the right syntax is eluding me now.
>> 
>> As always,
>> Thanks!!
>> 
>> Christian Humann 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20130116/9b70472a/attachment-0001.html>


More information about the Radiance-general mailing list