How to use pcomb to turn the outside border black?

I have been using the pcomb to apply a fisheye .cal file to my HDR images. Here is how I use it:

pcomb -f fisheye_corr.cal img.hdr > corr_img.hdr

However, I read somewhere on this forum that pcomb can be also used to turn the border black. Does anyone know how to do this without applying a fisheye correction file?

Hi Rania,

You already have started a thread on HDR capture vignetting. It’s better to add to that thread than create a new one if you have questions on the same subject.

Anyway, your question is confusing, because the fisheye_corr.cal file is to adjust distortion, not vignetting. You also started a topic on distortion correction. Again, it is better to add to an existing post, so the same people can respond.

Creating a circular clipping zone in pcomb is fairly straightforward, if that is all you want. Something like:

pcomb -e 'Cx:xres/2;Cy:yres/2;R:min(Cx,Cy)' -e 'cf=if((x-Cx)*(x-Cx)+(y-Cy)*(y-Cy)-R*R,0,1)' -e 'ro=cf*ri(1);go=cf*gi(1);bo=cf*bi(1)' input.hdr > clipped.hdr

should work. If you want the circular area to be smaller or larger, you can adjust the R constant.

-Greg

Thank you Greg for your help again. I didn’t mean to write vignetting! I meant fisheye projection correction. I updated the post!! sorry for the confusion, I think my brain doesn’t function well when I don’t sleep enough for a couple of days in row :slight_smile:

I will try the command line you suggested when I get back to the office tomorrow. Thanks again!