Cleaning the HDR image with pcomb

Hi,

I have some HDR images captured by a fisheye lens, and I want to clean it
up to only show the circular image in a black background.
Can anyone help me with the pcomb command to mask off the circular image.

Thanks,
Leyla

Something like:

  pcomb -e 'Cx:xmax/2;Cy:ymax/2;R:if(Cx-Cy,Cy,Cx);sq(x):x*x' -e 'inC=sq(R)-sq(x-Cx)-sq(y-Cy)' \
      -e 'ro=if(inC,ri(1),0);go=if(inC,gi(1),0);bo=if(inC,bi(1),0)' -o input.hdr > cropped.hdr

You may have to adjust the definitions of R and/or Cx and Cy if your circle doesn't completely fill one dimension of the image.

Best,
-Greg

···

From: Leyla Sanati <[email protected]>
Date: February 19, 2013 9:51:12 AM PST

Hi,

I have some HDR images captured by a fisheye lens, and I want to clean it up to only show the circular image in a black background.
Can anyone help me with the pcomb command to mask off the circular image.

Thanks,
Leyla

Leyla,

There may be a better way, but I generally will open a single image into
my Photoshop to create my mask. Create an image with the fisheye portion
you want to keep black and the part you want masked out white. Save this
as a .tiff file in your working directory.

In Radiance, you will first need to convert the tiff into an hdr. This
is done by the following command: ra_tiff -r filename.tiff mask.hdr

To mask out your captured hdr using pcomb, this should work: pcomb
captured.hdr -s -1000 mask.hdr > output.hdr (or pipe to another
process).

The "-s -1000" portion of the pcomb command should be sufficient, but if
you have some remaining pixels in the masked area, try a different
scaling factor (-10000, etc).

Good luck.

Chris

Chris Coulter

Senior Lighting Designer
Buro Happold Consulting Engineers

100 Broadway, 23rd Floor

New York, NY 10005

Tel: 212.334.2025

Direct: 212.616.0254

Email: [email protected]

Website: www.burohappold.com

···

From: Leyla Sanati [mailto:[email protected]]
Sent: Tuesday, February 19, 2013 12:51 PM
To: [email protected]
Subject: [HDRI] Cleaning the HDR image with pcomb

Hi,

I have some HDR images captured by a fisheye lens, and I want to clean
it up to only show the circular image in a black background.

Can anyone help me with the pcomb command to mask off the circular
image.

Thanks,

Leyla