Sigma 2.8 17-50 - wrong distortion correction

Hopefully but that still won’t support windows xp :wink:

The only actively maintained things with great support of Windows XP are exploits. ;]

5 Likes

Alberto, thanks a lot for your good will :), but unfortunately it is still far from perfect. It looks like I need to hurry up with leaving Windows XP ;), but probably you should also take a closer look at this issue.

The proper correction by PT Lens:

… and the RT’s job (with the test LCP file you have provided)

Can’t use it :frowning:

Thank you!

Szy.

I think there was a misunderstanding. the “fixed” LCP file I provided was meant to be good only for your first pic. that is because I left only one entry in it, the one that should be good for your previous pic. it is not surprising that it doesn’t work for other pictures. it was not meant to be a solution, the purpose was to demonstrate what goes wrong in the current version of RT.

btw, I did take a closer look, in fact I provided a (experimental) patch that tries to fix the issue. but since I am not seeing those problems on the lenses I use, the only hope to see the patch getting integrated into a future RT release is for users to help and test it (hint…) :wink: that means that you will have to compile RT yourself (probably in a virtual machine if you are stuck on XP). I know this can be annoying, but I have no Windows machine so I’m afraid I can’t help here…

@agriggio If you think useful,I can try to make a gtk2 patched build tonight when back home.

@gaaned92 thanks! I suppose it can be helpful, but you need to ask the interested users. as I wrote, the current RT works fine for my lenses. I will do more testing to see that the patch doesn’t break the LCP support for the lenses I have, but I don’t have many :slight_smile: this is really a case where we need help from the community!

I can ask for help on Google+ once we have a build (not gtk2). @agriggio can you define how best to test? What sort of info should the raw file have or not have?

I have changed the logic for finding the right distortion coefficients in the LCP files. basically we should look for two things:

  1. 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

  2. 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.

@Morgan_Hardwood how does this sound?

@agriggio it’s good. I’ll put it up as soon as we have a build.

@Morgan_Hardwood great. In the meantime, I put the patch into a proper branch lcp-distortion-alt-match on github

1 Like

I’ve testet the lcp-distortion-alt-match branch and it works great. For some of my lenses I get a better result. Great job. :thumbsup:

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.

Keep up the great work!

I don’t know how the pic is supposed to look, but here are the results with the above branch:

no distortion correction

distortion correction with the given LCP file

how does it look?

1 Like

@TooWaBoo thanks for testing! Two questions:

  • can you tell us which cameras/lenses you tested with?
  • any chance you could provide a windows build so that other people can test? :slight_smile:

Looks great, seems really nicely corrected. Before your patch, corners were really fuzzy!

Thank you!

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.

@agriggio
I’ve tested:

Nikon D90
Nikon AF-S 18-55 VRII, Nikon AF-S 18-105 VR, Tokina 12-24, Samyang 8mm Fish-Eye

Nikon COOLPIX P330

1 Like

Pulled down and tested _lcp build. Works, but over-corrects distortion on my test. Pentax Scenario is here:
https://discuss.pixls.us/t/lcp-file-distortion-correction-backwards/4241

I’m thinking the over-correction could be in the adobe LCP file, but don’t have lightroom to test it further.

Hi @dvan, thanks for testing! I also don’t have lightroom, but I’ll try to import the LCP in lensfun and see whether it behaves differently from RT.

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 :slight_smile: 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

@agriggio
I’ve tested your latest mod and I’m not happy with it. It overcorrects my images.