# Vignetting Correction Using a ULS

Dear List,

I am looking to find a method for correcting vignetting occurring in HDR
images using radiance as part of an undergraduate research study. I am
using a Uniform Luminance Sphere to create a uniformly lit background in
order to create a reference image.

I have used radiance to create the HDR images, and I am wondering if there
is a way to take the HDR image and divide each pixel intensity by that of
its optical center. This would create an image/mask of fractional pixel
values that can be divided into another image to correct for the cameras
specific vignetting.

Other suggestions would be greatly appreciated as well.

Thanks,
Josh

···

--
*Joshua Wilson*

4th year Architectural Engineering Student (Lighting/Electrical)
Durham School of Architectural Engineering and Construction
UNL College of Engineering (Omaha Campus)
[email protected]

Dear Joshua,

the command pcomb allow you to do that. However, there are some caveats to be aware of:

1) The center of the image in the meaning of x_max / 2, y_max / 2 is not (exactly) the centre of the lens. There is no perfectly aligned camera, the optical axis will almost never pass the sensor exactly in its center. So your "zero" coordinates will be at x_max / 2 + x_off, y_max / 2 + y_off.

2) Do you have any information how uniform your sphere actually is? Relying on the uniformity of the source for such calibrations seams to be a bit risky, unless the uncertainties are known.

Neglecting these, with pcomb, you can create an image describing the vignetting such that for each pixel you have the ratio of pixel values pv_observed / pv_uniform, with this ration being expected as one for the centre and decreasing towards the edges. In this example, I avoid all calculations regarding the fall-off from an image center, instead this would simply divide the uncorrected image pixel-wise by the "reference image", with all pixels having the value pv_max. You can get pv_max using e.g. rvu, which allows you to select an area and get the average of the contained pixel values.

1) create a "reference image" of uniform pixel values pv_max as "measured" at the centre of your image, e.g. using rvu (replace <max_x> <max_y> by the resolution of your images, and use your readings at the image centre instead of 1,1,1 when assigning ro, go and bo):

pcomb -x <max_x> -y <max_y> -e 'ro=1; go=1; bo=1' > reference.hdr

2) create a correction frame, where pixel values are pv_observed / pv_max (so ration of observed pixel value when taking a picture of the sphere / pixel value measured at centre):

pcomb -e 'ro=ri(1)/ri(2); go=gi(1)/gi(2); bo=bi(1)/bi(2)' -o observed.hdr -o reference.hdr > correction.hdr

3) you may delete the reference frame now...

rm reference.hdr

4) apply the correction by dividing each uncorrected image you have by the correction frame:

pcomb -e 'ro=ri(1)/ri(2); go=gi(1)/gi(2); bo=bi(1)/bi(2)' -o uncorrected.hdr -o correction.hdr > corrected.hdr

It is a bit paranoid but I got used to add the -o to all calls of pcomb - just in case I had exposure corrections applied to my images. It has been a while that I did such pixel corrections, so I hope I did not do anything wrong here, but basically this approach works well if you can rely on the readings for the image centre.

Cheers, Lars.

···

Dear List,

I am looking to find a method for correcting vignetting occurring in HDR images using radiance as part of an undergraduate research study. I am using a Uniform Luminance Sphere to create a uniformly lit background in order to create a reference image.

I have used radiance to create the HDR images, and I am wondering if there is a way to take the HDR image and divide each pixel intensity by that of its optical center. This would create an image/mask of fractional pixel values that can be divided into another image to correct for the cameras specific vignetting.

Other suggestions would be greatly appreciated as well.

Thanks,
Josh

--
*Joshua Wilson*

4th year Architectural Engineering Student (Lighting/Electrical)
Durham School of Architectural Engineering and Construction
UNL College of Engineering (Omaha Campus)
[email protected] <mailto:[email protected]>