1. Welcome to Mu-43.com—a friendly Micro 4/3 camera & photography discussion forum!

    If you are thinking of buying a camera or need help with your photos, you will find our forum members full of advice! Click here to join for free!

LensFun

Discussion in 'Image Processing' started by ArizonaMike, Jul 12, 2018.

  1. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    Only one of the photo editors I have on my Mac (Dxo's PhotoLab) actually seems to do automatic lens corrections. Several of the others say that they do, but either require manual correction or do not handle my Olympus 8mm FE properly. Because of that I decided to look into LensFun with the idea of using it as a plugin for some of my pixel editors.

    When I visited the LensFun website all that they seemed to have was a source download and some 'makefiles' to create the tool on my system, but no real information on how to use it. I thought there might be some information about that on this forum, but a search did not show me anything that answered my questions and I decided to ask specific questions. Perhaps someone has looked into this and can tell me.

    1) Does the LensFun make produce a usable stand-alone tool? Either a console app or a GUI?

    2) If so, can it be called as a plugin from a pixel editor?

    3) If not, what does the make give you? Perhaps I can build a 'swift' wrapper around it.

    4) And, perhaps most important, is there a downloaded version of LensFun that is already built? I am not sure I have the proper libraries on my system to build it, and am not sure I want to install what I might need.

    Thank you for any information you can give me.
     
  2. tkbslc

    tkbslc Super Moderator

    It's more of a lens correction database and programming API that you can use with your app if you are a developer of an editing program. I beleive RAWTherapee incorporates that database for providing lens corrections, for example.
     
    • Agree Agree x 1
  3. RyanM

    RyanM Mu-43 Veteran

    265
    Jun 16, 2017
    darktable also uses the lensfun database. AFAIK, there is no standalone program, but I could be wrong there.
     
  4. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    I have Darktable on my system but could find no distortion correction tab or link to use. Could you tell me where it is?
     
  5. RyanM

    RyanM Mu-43 Veteran

    265
    Jun 16, 2017
    The tab is called "lens correction," in the correction tab/group.
     
  6. Lcrunyon

    Lcrunyon Mu-43 All-Pro Subscribing Member

    Jun 4, 2014
    Maryland
    Loren
    I am just curious, as a user of Lightroom where Oly lens corrections are supposed to be applied automatically. (At least, I always click the checkmark to apply them whether that’s necessary or not, though I never really see any difference, so maybe the corrections had already been applied anyways). But, what is it that you aren’t seeing handled correctly with the 8mm FE (or other lenses)?
     
  7. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    Thank you. I was looking for 'corrections' and 'distortion', but not 'lens".

    Also the label text is so small on my system that I just could not easily read any of them, but when you specified where to look I did find it.
     
  8. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    I have LR 6 (the old non-CC version) and I use it occasionally. Here are some two images taken at Zion National Park (Utah, US) with an Olympus 8mm Fisheye and loaded into LR 6. One was processed with the Lens Corrections turned on and the other with it turned off and it is easy to see that LR is doing distortion correction. It is not very good correction in my opinion, and differs greatly from what I get with Dxo's PhotoLab, but it is being done.

    If there is any question about whether or not there is a difference just take a close look at my shadow at the bottom left and the trees in the middle right.

    Corrections OFF:

    LensCorrectionOFF.jpg
    Subscribe to see EXIF info for this image (if available)


    Corrections ON:

    LensCorrectionON.jpg
    Subscribe to see EXIF info for this image (if available)
     
    • Informative Informative x 1
  9. mcasan

    mcasan Mu-43 All-Pro

    Feb 26, 2014
    Atlanta
    Lightroom Develop and Adobe Camera Raw both do m43 corrections using the info in the raw files. That is why you will not seem lists of m43 lenses. DxO does lens corrections from their own database of lens testing results. That is why in DxO Photolab you download modules for each combination of camera body and lens you have. Two very different approaches to lens corrections.

    And the 3rd approach, use a third party like Lensfun. The last time I looked, they still did not support the Olympus 300mm Pro lens that has been out for years.
     
  10. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    Yes, that is right.

    I have the trial version of PhotoLine's new release that supports LensFun distortion correction. Loading an image now gives you a list of all of the supported lenses and the Olympus 300mm lens is not on that list.

    Here is a screen shot of what M.Zuiko lenses are supported, at least for the E-M1.2

    SupportedLenses.jpg
    Subscribe to see EXIF info for this image (if available)
     
  11. Lcrunyon

    Lcrunyon Mu-43 All-Pro Subscribing Member

    Jun 4, 2014
    Maryland
    Loren
    I just learned something, thanks.... It isn’t whether you have the checkmark applied, but whether the whole lens correction section is switched on or off, that toggles the automatic corrections for Oly raw files. I hadn’t tried that. I hadn’t even realized that my FE images were being automatically defished (even if only partially). That’s not something I’d necessarily want to happen all the time. I wonder if Photoshop CC would do a better job...
     
    • Wow Wow x 1
  12. JLGF1

    JLGF1 Mu-43 Veteran

    362
    Oct 20, 2017
    Jerry
    LensFun_Topaz_Studio.JPG
    Subscribe to see EXIF info for this image (if available)
     
  13. mcasan

    mcasan Mu-43 All-Pro

    Feb 26, 2014
    Atlanta
    Photoshop does not do any lens corrections to a raw file. It uses Adobe Camera Raw to handle the initial raw file processing. ACR is the same engine as Lightroom Develop module.
     
    • Agree Agree x 1
  14. mcasan

    mcasan Mu-43 All-Pro

    Feb 26, 2014
    Atlanta
    That is why I use Lr for the raw processing, including lens corrections, and then use Studio for any needed effects.
     
  15. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    I am reasonably sure that LR and PS both use the same lens correction algorithms, so I would suspect that the results would be the same for each.

    As for sometimes having the de-fishing done and sometimes not, you could easily create two presets, one with the lens correction on and one with it off. Then switching between turning LC on and off would simply be applying a preset.

    Another option would be for you to use an external app to do the de-fishing and then only export those images you want de-fished to that external app. There are various apps that will do that with PTLens probably being the best known.
     
  16. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    Yes, but since PS calls ACR as a pre-processor I think of them as separate items in the same workflow. I know you can replace ACR with another pre-processor, and I have tried that, but I think most people just leave it as it was when installed.
     
  17. Lcrunyon

    Lcrunyon Mu-43 All-Pro Subscribing Member

    Jun 4, 2014
    Maryland
    Loren
    I’m going to look into this today, why I never see any difference with my automatic corrections. I thought that since I wasn’t noticing anything I might have had the Lens Correction section toggled off, but that shouldn’t be the case because whenever I do manual edits for defringing (the automatic corrections don’t seem to get rid of purple fringing either), I see an immediate difference. Same with the manual distortion slider (which I rarely use).

    The other thing that is baffling me is that I have played with the de-fishing feature on the E-M1 MkII with the 8mm FE. The feature provides both a de-fished and a fisheye version, and the differences are clear to see on LR. My FE images still look FE...

    Could it be that my automatic corrections are somehow not being applied? This is the problem with trying to learn this stuff by myself... It’s hard to know what I don’t know...

    Sorry to hijack the thread...
     
  18. Lcrunyon

    Lcrunyon Mu-43 All-Pro Subscribing Member

    Jun 4, 2014
    Maryland
    Loren
    I’m getting closer to solving my problem. As far as I can tell, Lightroom Classic CC isn’t automatically doing distortion corrections on the Olympus Pro lenses I’ve looked at so far. This is why I haven’t noticed any de-fishing. It is, however, correcting for chromatic aberration. The info button says it’s applying built in CA correction for the specific lenses, but it doesn’t say anything about distortion correction. In any case, I’ve oftentimes have had to manually do even more CA correction for purple fringing.

    I wonder if perhaps older versions of Lightroom were doing automatic distortion corrections but not anymore (perhaps if there were complaints such as the OP has?), or if there is some setting I need to change to implement automatic distortion correction.

    Edit: Some of the Pro lenses do have distortion correction, after all. For example, Lightroom identifies the 7-14mm and 17mm as having both types, while the 8mm FE and 25mm only have CA correction. That said, at least in the images I’ve looked at so far, I can’t see any changes in distortion correction no matter how I toggle the settings, even at 7mm! Either I can’t turn them off, or the differences are imperceptible, or... no idea...
     
    Last edited: Jul 14, 2018
  19. ArizonaMike

    ArizonaMike Mu-43 Top Veteran

    590
    Jan 19, 2018
    Arizona, USA
    I am unsure exactly what you mean when you say "My FE images still look FE...". Do you mean that the raws (which are not de-fished in camera) still look FE in LR? Or are you saying that the jpgs still look FE?

    As for me, I was so pleased with the results from the in-camera de-fishing of the Olympus 8mm lens that I decided I no longer needed my Olympus 9-18mm lens and sent it off for a quote from Roberts Camera. I have to use the jpgs instead of the raws, that that is OK as well, at least for me.
     
  20. Lcrunyon

    Lcrunyon Mu-43 All-Pro Subscribing Member

    Jun 4, 2014
    Maryland
    Loren
    The JPEG images de-fished in the camera look nicely de-fished (I’m pleased with it too) and the RAW files that were not de-fished still have the full fisheye distortion in Lightroom, regardless of whether the automatic distortion correction is checked. But that makes sense, because I’ve learned that on at least my version of Lightroom Classic CC, there is no Olympus built-in correction for de-fishing the 8mm Pro fisheye.

    What I’m confused about is why I still can’t see any effect from Lightroom automatic distortion correction from Oly lens profiles that are indicated as having such settings built in to the RAW files. I can clearly see the effect when I use the manual distortion slider, so why am I not seeing anything from the auto correct?
     
    Last edited: Jul 14, 2018
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.