hugin vingetting calculation

Asked by Sergei Delov

The intent was to create distortion, tca and vingetting data in lensfun database format for DJI Mavic Pro Hasselblad L1D-20c.
tca is unnoticeable on this lens, but distortion/vingetting are really bad. Adobe Convert Raw reads vingetting data from exif; darktable can't.

I followed instructions from here:, though instructions use older hugin UI.


While distortion/tca look visually adequate, vingetting is not.


I'm trying to understand what went wrong. One thing in tutorial is not clear - should I first calculate distortion and with distortion applied calculate vingetting?

I did it both ways, not much changed.

I used hugin 2018.0.0.5abfb4de7961


Question information

English Edit question
Hugin Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
tmodes (tmodes) said :

For vignetting optimization you need partially overlapping images, but no 100 % (or near 100 %) overlap.
The images need to be aligned (position and lens parameters) before vignetting calculation.

Revision history for this message
Sergei Delov (sdelov) said :

Thank you for the response.

I think I did everything you recommended, and still I gnerated wrong vignetting parameters.

Here are link to the .pto file, .dng and corresponding .tiff files (315mb): has troubles with large files, here's the link to .pto/.dng files only (78mb):

I used the following command to convert .dng files to tiff format with sensor's original linear RGB color space: "dcraw -4 -o 0 -M -T *.DNG"

That's what I see in darktable when I apply all lens corrections:

I hope this info will keep you interested.


Revision history for this message
tmodes (tmodes) said :

Before calculating vignetting parameters you need to align the images before. When all images are on top of each other Hugin can't calculate the vignetting parameters.
The second issue: if you feed in linear images you need to specify this. Otherwise Hugin assumes gamma corrected images and the photometric optimizer goes haywire.

Can you help with this problem?

Provide an answer of your own, or ask Sergei Delov for more information if necessary.

To post a message you must log in.