I have changed the logic for finding the right distortion coefficients in the LCP files. basically we should look for two things:
no regressions. if you are using LCP for your lenses and you are happy with the results, please check that it is still the case with this patch
better results for problematic lenses. if you have a lens with an LCP that is supposed to work (e.g. coming from Adobe) but RT does a poor job with it, please check if the situation improves with this patch.
in both cases, if possible test with as many apertures, focal lengths and focus distances as possible.
I agree that lensfun solution would be better, still about lcp handling in this github issue there is a link to a previously “bad” lcp and an image that showed problems, together with the exported jpeg with a previous rt version: Lens distorsion correction · Issue #2944 · Beep6581/RawTherapee · GitHub
Unfortunatly i’m still using ubuntu 14.04 so i can’t compile from latest, but maybe it could be interesting to try.
A compiled test version for Windows (x64. Gtk3.22-15) can be downloaded from here:
No installer included. Extract the folder “RawTherapee_lcp” to e.g. your Desktop and run “rawtherapee.exe” inside this folder.
Cache and settings are saved into “localappdata\RawTherapee-lcp”. It leaves your existing installation untouched.
update: I’ve tweaked the matching logic a bit more, essentially copying what lensfun is doing when converting LCP profiles. although unfortunately the pic of @dvan is still not properly corrected (now it undercorrects inserted of overcorrecting), the new logic makes more sense than my previous attempt and it seems to be equally good for the other problematic pictures that have been posted here.
so, I’d like to ask all interested people to test this new version. if there are no regressions, I’d like to merge this asap so that it is included in 5.2 and I can move on to integrating lensfun
@TooWaBoo thanks for the quick turnaround. I will revert to the previous method then! if no more issues arise, I’ll try to merge in a couple of weeks (just to see whether something else pops up in the meantime)
No installer included. Extract the folder “RawTherapee_lcp2” to e.g. your Desktop and run “rawtherapee.exe” inside this folder.
Cache and settings are saved into “localappdata\RawTherapee-lpc”. It leaves your existing installation untouched.
given that @TooWaBoo reported regressions with the latest changes, I reverted them yesterday. so the current code is the first version of my “fix”. I still hope it works better than dev though