Sigma 2.8 17-50 - wrong distortion correction

Hello there :),

I have a problem with proper distortion correction in RT 5.0.

I took the LCP lens profile for Sigma 2.8 17-50 from Adobe Camera Raw files. And after applying it and ticking “distortion correction” in RT I’m still getting not completely corrected image.

Why am I having this problem? Beacause of RT, because of the wrong LCP file?

Thanks for any hint.

Szy.

@szy

  1. Update to 5.1.
  2. If the problem still persists, show a screenshot and upload the raw file and LCP file. You can use https://filebin.net/ for the upload.
  1. Impossible - I still work on Win XP. But does it really matter in this case?

  2. Filebin | 0h57wltpe7kiib93

Thanks!

Szy.

In the meantime I have checked RT 4.2.1 - exactly the same wrong effect :confused:

Szy.

Windows XP and versions of RawTherapee older than 5.1 are no longer supported.

If you use a LCP you must untick Auto…

@TooWaBoo, thanks, but unticking it still leaves my photo distorted :confused:

Szy.

Hmmm… what auto are you referring to exactly?

Some LCP files can contain multiple correction parameters depending on the focal length, aperture and focus distance. Unfortunately the Adobe tech docs don’t really specify how the matching should actually be done in cases in which there is no exact entry. So one possibility might be that RT simply picks the wrong parameters.
In fact, even if there is an exact entry, currently RT ignores the aperture values anyway.
That might explain why you are getting a wrong correction here – see also another recent thread about the same problem:
https://discuss.pixls.us/t/lcp-file-distortion-correction-backwards

In principle all this could be fixed I suppose, but I’m reluctant to actually do that, because we have already planned to add support to Lensfun, which IMHO will give a better experience in the long run (and because the time I can devote to RT development is limited). But patches are always welcome :slight_smile:

P.S. on any case, there were some bug fixes related to LCP in 5.1, so it might still be worth checking whether this still applies.

1 Like

Auto-fill (see screenshot)

btw: This has nothing todo with the distortion, but why are you using ISO 159 in your image? The base ISO for the Nikon D90 is ISO 200.

Thank you for your help, Guys.

@agriggio, what you mean when writing in the mentioned thread about “the proper values”?

Am I able to find out these “proper values” by myself without specific photo knowledge?

RT was a great discovery for me, but unfortunately I can’t use it with such a failure anymore :(.

Now I have reminded myself, that I had the same problem with Mavic Pro photos, a few days before these Sigma files. But then it wasn’t so important to dig in it.

Maybe the issue with lens correction is bigger that you think?

Anyway - thank you very much for your help here and for the application generally. Great stuff.

Szy.

No specific reason, it was probably my mistake when shooting. I am a cycling tourist, so maybe I have accidentally change it when taking a fast shot :slight_smile:

Szy.

…then it’s not quite true, auto-fill should work fine with LCP profiles. If it doesn’t, it’s a bug.

I mean the right correction coefficients in the LCP file. As I wrote above, in general there are many for different (combinations of) focal length, aperture and focus distance.

Well, you can have a look at the LCP, it’s just an XML file, and see if by removing all the irrelevant entries (i.e. those with wrong apertures, focal length or focus distance) you are able to make RT do the right thing.

Or you can try posting a RAW file and the LCP file that you are using, I can take a look (but that’s all I can promise at the moment).

I am well aware that this can be annoying, and I think I never said that it was not important. What I wrote is that I personally will not have much time to work on this, because I’d like to spend my effort into integrating Lensfun with RT, which I think should provide a better solution for this kind of problems. To be precise, I also wrote that patches are welcome. And, although I don’t have the authority to accept such patches, I would bet that @Morgan_Hardwood agrees with me on this :slight_smile:

1 Like

Thanks a lot again. It was posted here:

https://filebin.net/0h57wltpe7kiib93

Szy.

Maybe it’s fixed now but there was a function in the past which switches of Auto-fill when a LCP was applied.

Thanks. I confirm it’s the problem I mentioned above: RT picks the wrong coefficients. You can check with this LCP profile, where I manually removed all the “wrong” entires. The correction seems to be ok to me.
test.lcp.txt (2.8 KB)

2 Likes

Yes, it used to be the case. It’s not true anymore. (or if it is, please open an issue)

And here’s a very experimental patch that tries to use a different logic for deciding which coefficients to keep. It’s probably not ready for merging, but it seems to work for your case. This is really as far as I can go though :slight_smile:

lcp-alt-matching.patch (15.7 KB)

1 Like

The person who originally implemented LCP support in RawTherapee, Oduis, wrote that LCP files can contain many erroneous control points and Adobe software knows how to identify them and ignore them while RT does not.

You could try making your own LCP file - I already linked you to the documentation on how to do it, it’s easy.

But as @agriggio wrote, Lensfun is the better, more open solution, and it’s in the works. Maybe in RawTherapee 5.2?