lensfun calibration Canon RF50, 24-240

I have calibrated my two Canon RF lenses, the 50mm 1.8 and the 24-240.

Only distortion and tca for now as (a) they were the simplest to do, (b) I couldnt find an appropriate diffuser to also measure vignetting.

I’m attaching here the lensfun.xml file that you can copy to your local lensfun directory ~/.local/share/lensfun (linux). I have also raised on issue on github to have these two lenses added to the official lensfun database.

Thanks to @asn for the how-to guide and Torsten Bronger for his screencast on how to use Hugin for the distortion data.

A couple of additional notes:

  1. I had to use conda to install all the packaged needed and listed https://gitlab.com/cryptomilk/lens_calibrate. Following the given procedure I wasn’t able to install py3exiv2. So if somebody else has the same problem and uses conda that’s what I did:
conda create --name lens_calibrate
conda activate lens_calibrate
conda install -y numpy scipy PyPDF2
pip3 install py3exiv2
  1. I have a bit of a mess in my darktable database now, looking at the collections by lens. The jpgs reports these two lenses as “Canon RF 24-240mm F4-6.3 IS USM” and “Canon RF 50mm F1.2 L USM” – the latter is striking as this is definitely NOT the lens that I’ve bought for about 200 euros – while the raw files report “RF 24-240mm F4-6.3 IS USM” and “RF 50mm F1.8 STM” or “RF50mm F1.8 STM”; see screenshot below:

2021-10-10_23-34

Any idea why that is? As I’m using dt 3.6.1 all my CR3 files are converted to dng; right now I’m using the excellent dnglab, but probably a large number before dnglab were converted with the Adobe dng converter. I would like to have all the photos actually shot with the 50mm for example appear as under one and only lens and not three versions. Should I change manually the lens tag with exiv2 or exiftool? Would this result in a mess or lose the automatic association to the right lens in the lensfun db?


Examples for the most egregious and needed case (the 24mm end on the 24-240):

before

after


before

after

$ exiv2 -pt yourfile.dng |grep -i ‘lens|model|make’

Try a file from Adobe DNG Converter and from DNGLabs.

If you have latest exiv2, also try CR3 file.

Canon RF lenses at Lensfun all have RF and focal length written together.

For vignetting correction, buy this one with 78% light ACRYLGLAS (32 - 60 €/m²) PLEXIGLAS OPAL 78% LD 2 - 4 mm MILCHGLAS SICHTSCHUTZ | eBay