Help with creating a vignetting cal file

Can anyone point me to resources or articles on how to produce cal files of vignetting curves for my camera/lens/aperture combination?
I’m using Canon 5D Mark IV with Sigma fisheye 8mm f/3.5 lens and the aperture value is 4.

Hi Rania,

The procedure to create a cal file is described in this paper:

You also have an example available on p.198 of this thesis:

Good luck!


Hi Clotilde,

Thanks for sharing these resources with me. The paper explained two methods; in the second method, the authors calculated the vignetting factor for each FOV by dividing the luminance value of a target (a gray card) of that FOV divided by the luminance value of the same target at the center of the fisheye lens. However, the process is unclear to me. For example, the paper mentioned that the process of taking these images is repeated every 5 degrees until the FOV of the lens is covered, is the FOV in my case is 180 degrees? Also, after calculating the ratio of luminance values I mentioned above, how are these ratios used to create a .cal file?. I saw an example of .cal file in the thesis you shared, but again it was not clear where the author came up with the a, b, c, d, and e factors to create the .cal file. I wish there is a step by step guide somewhere :slight_smile:

Hi Rania,

Yes, the field of view in your case is 180°. However, since the lens is supposed to be symmetrical, you can only apply this process for every 5° starting from the center of the FOV to the edge (thus over an angle of 90°).
What you do is you take an HDR image of the target looking straight at it, then you rotate the camera over 5° and you take another HDR image. If the target luminance is stable (meaning the light environment should be stable), then you can look at the ratio between the luminance of the target when it is in the center of the image, and the luminance of the target when it is 5° from the center of your image. Based on these ratio of luminance every 5° over the lens FOV, you can plot it to have an idea of your vignetting at the aperture chosen, and you can also use these ratio values to fit an even-order polynomial that will match as closely as possible your measurements (your vignetting curve). The a, b, c, d, and e in the vignetting cal file just need to be replaced by the parameters of your polynomial regression. Is that clearer?

1 Like

Clotilde, this is awesome! So clear to me now. I just bought a motorized rotating head and I have a good light source in the photo room at our school which is painted all matte black; the perfect setting for this process. I’m guessing that to get the luminance value of the light source, I will have to use Photosphere, am I right? or, do you know any Radiance command that I can use to extract the luminance value of the brightest spot in my combined HDR photos? which in this case would be the light source since everything else in the pictures is black.

Hi Rania!
Yes, once you have merged your LDR images into an HDR image for each angle as explained in the tutorial, you can extract the luminance of the light source in Photosphere or using the command ximage in Radiance with the l option. I would probably take the average luminance over the area of the light source, unless the area of your light source is really small (eg a few pixels). If you need to extract the peak luminance in the HDR image, you can do it with the command pextrem in Radiance. You will then get the darkest and brightest pixels in your HDR image (x, y coordinates and R, G, B values) of which you can calculate the luminance with the formula in the tutorial.

1 Like

Hi Clotilde, AWESOME! your feedback is so helpful. Thanks a lot!
I’ll be taking the pictures tomorrow and then going through the post-processing next week. I will keep you posted!