I started to create distortion corrections for my new OnePlus 10 Pro 5G. I have my first set (draft) set of parameters defined for the super wide (2.3mm) and wide angle lenses (6.1mm). It seems that the only indication of the lens used is the focal length, as exiv2 doesn’t return any lens name information and exiftool reports Unique Camera Model : NE2213-OnePlus-OnePlus. dt recognizes the camera, but defaults always to the 2.3mm lens (maybe because it is the first in my config file).
Have I missed something in the configuration file, or is this just something that cannot be solved automatically? You can find below my configuration file, if there are obvious errors there. Also, how should I define the cropfactor as the different lenses have different cropfactors?
Here are the raw files. There is also another issue, when I have a lensfun.xml in C:\Users\<user>\AppData\Local\lensfun, dt detects only the OnePlus camera, nothing else. I thought the definitions in my personal folder are on top of the standard definitions, not replacing them, but have I misunderstood?
When I copied my OnePlus settings into the same folder where all the other lensfun xml files reside, I have now all the original camera/lens combinations available and my OnePlus test file.
Since DT recognizes the correct focal length it then should choose the corresponding correction data.
And I think crop factor doesn’t matter in your case as long as you insert the same number for cam and lens.
**And my lensfun data is in C:\Program Files\darktable\share\lensfun\version_1, so I wonder about your AppData folder. ** Edit: Got what you mean. I don’t know about this AppData folder.
Thanks for the tip, but unfortunately it didn’t work. I still get the 2.3mm lens as the default choise.
AppData in Win is the same as ~/.local/share in Linux. At least in Windows, it seems to replace the full lensfun database, and not append the contents to the global database.
Yes, it works also for me. I had forgotten to restart dt.
For the 6.1mm lens, I had forgotten to change the projection to rectlinear, so that’s why the coefficients were totally off.
The difference for the ultrawide lens corrections in Hugin and in dt is interesting. When I looked at the image in dt, I thought that my quick shot was not perfect, and the error was caused by my inaccurate parameters. But as you @apostel338 noticed, it’s quite good in Hugin, but clearly off in dt.
I also added the parameters for the tele, so the full definitions are here.
I suspect to be something in the process of creating the lens profile. But I’m not getting any better result out of this photo. Would you mind making a photo for the 2.3 with a clear seperate line at the top border over the whole width?
I tried also to change the definition to fisheye, but it didn’t change the outcome. I will shoot another image and share it. When I shot the image, I didn’t know that the phone screen doesn’t show the full image, only what would be included into the JPEG. This is what I believed I captured.
Here is a new take from the same place. The window in the picture is quite small, so I had to stand pretty close. I’ll try to define new correction parameters later today. For the “production quality” corrections I have to find a better target.
This is what I get out of your photo. I recognized that I have to set the focal in the xml to something like 2.15 to get comparable results in DT. (Maybe tweak between ~ 2.14 - 2.17 to find your favourite result)
The issue was that I had the aspect-ratio tag missing from my definitions. Now it looks correct with correct focal length. I got help, when I opened the issue in lensfun github. https://github.com/lensfun/lensfun/issues/1887