pcomb to clip specific colors

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 ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

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 <[email protected]>
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 ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

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 <[email protected]>
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 <[email protected]>
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

Thanks for the quick response Greg!

I'm using a specific, specular reflective color on each facade orientation of a building to better understand which curtain wall orientation is contributing to direct solar reflections on the street level. I'm trying to parse from each image in an annual, time lapse series the resultant patterns of reflection on the street separately for each orientation / color.

Running the script you sent I'm getting the following error:
is_yellow: undefined function

Thanks again,
Chris

Christian Humann ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

···

On Jan 16, 2013, at 11:08 AM, Greg Ward wrote:

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 <[email protected]>
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 ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Chris

Not directly responding to your question but here is an alternative
approche:

Instead of assigning different reflective colors to the facades you are
interested in you could just separate each facade direction into a
dedicated octree and run a simulation with white light. Renderings should
be fast if you restrict yourself to a single mirror reflection and no
ambient contribution.

You can then add up all the images for a single time step to get the
combined direct reflection. If you want to highlight a particular part you
can add/mix the individual pictures with a color in the post-process.

Regards,
Thomas

···

On Wed, Jan 16, 2013 at 2:44 PM, Humann Chris <[email protected]> wrote:

Thanks for the quick response Greg!

I'm using a specific, specular reflective color on each facade orientation
of a building to better understand which curtain wall orientation is
contributing to direct solar reflections on the street level. I'm trying to
parse from each image in an annual, time lapse series the resultant
patterns of reflection on the street separately for each orientation /
color.

Running the script you sent I'm getting the following error:
is_yellow: undefined function

Thanks again,
Chris

Christian Humann ~ Associate
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

On Jan 16, 2013, at 11:08 AM, Greg Ward wrote:

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 <[email protected]>
*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 ~ Associate
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general