Lens correction :-(

Laowa makes great lenses for a a really good price. They have quite a few zero-distortion lenses. However, the 15mm F/4 isn’t one of them.

That’s an original image:

This lens is not included in the darktable lens correction module or in Lensfun. I can sort of straighten it out with the lens correction module (see settings in image), but I am losing something like 40% of the image.

But maybe my settings are totally wrong anyway, here in big:

The proper way would be of course adding them myself to Lensfun. But so far I failed with the Linux setup.

If somebody likes a try, here is original help file:

Link to RAW file (24Mb)

Update:
Nice, Laowa/Venuslens has profiles for quite a few of their lenses, including mine. Now need to check how to get the *.cpl file into Darktable.

Update 2:
I had a look at the misc.xml in program files/darktable/share/lensfun/version_1. I added an entry for the Laowa 15mm f/4 and twiggled with the numbers. Took a while because every time you change a value you need to restart darktable. First it didn’t really work, I could get the center nice and flat, but near the edges there was still distortion. Then I changed from poly3 to poly5 and added a k2 value – that did the trick! This comes quite close:

<lens>
<maker>Venus</maker>
<model>Laowa 15mm f/4</model>
<mount>Sony Alpha</mount>
<mount>Sony E</mount>
<cropfactor>1</cropfactor>
<calibration>
<distortion model="poly5" focal="15" k1="-0.052" k2="0.010" />
</calibration>
</lens>

Looks nicer now!

Update 3:
I wasn’t too satisfied with the guessing and tried Hugin, another open source image tool. The Panorama Editor (don’t get confused by the name, it has a lens correction function) didn’t work for me at all – but the Hugin Calibration GUI (it’s included in the download) did. You need to have the right quality images with long, unbroken straight lines. I did my guessing with the ‘poly5’ model, but the GUI uses the ptlens model. Anyway, it worked also well the line is:

<distortion model=”ptlens” focal=”15″ a=”0.04042″ b=”-0.07985″ c=”-0.03884″ />

Image looks the same as my guessed one though.

If you have a comment, you can simple paste an image in the message field. All messages need approval though, too much SPAM around unfortunately…

Leave a Comment

Do NOT follow this link or you will be banned from the site!