Bug 500739

Summary: Lens correction tools seems not working
Product: [Applications] digikam Reporter: Antonio <antonio.angelo>
Component: Plugin-Editor-LensCorrectionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.5.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.6.0
Sentry Crash Report:
Attachments: Automatic lens correction settings

Description Antonio 2025-02-25 17:11:13 UTC
Created attachment 178874 [details]
Automatic lens correction settings

SUMMARY
Editing photos taken with the following camera:
-Canon
-EOS 60D
-Canon EF-S 17-55mm f/2.8 IS USM
automatic lens correction seems not working (it was OK with DK 8.3) when set to use metadata.
Warning: "partial corresponding"
Nothing is shown in drop-down menu (that are inhibited).
When "use metadata" is disabled, the only field editable are Focal length, Aperture, Distance; no way to specify camera or lens.

STEPS TO REPRODUCE
1. Select a photo
2. Image editor
3. Convert to 16 bit >OK
4. Automatic lens correction >OK 

OBSERVED RESULT
No change in final image (and no difference in preview, between "before" and "after")

EXPECTED RESULT
Some (small) deformation between before and after.

SOFTWARE/OS VERSIONS
Ubuntu 22.04.5 LTS
graphic system: Wayland

ADDITIONAL INFORMATION
Hardware: HP HP Laptop 15-da0xxx
RAM: 8GB
Comment 1 Maik Qualmann 2025-02-25 18:52:57 UTC
We need the image, if not public to my private email.

Maik
Comment 2 Maik Qualmann 2025-02-26 08:54:36 UTC
After searching on the web I found this image in the camera and lens combination.

https://www.dpreview.com/sample-galleries/2274629080/canon-eos-60d-preview-samples/9070040242

Tested here with the Windows version of digiKam-8.6.0, no problems. Full recognition via the metadata and visible correction.
Your Lensfun database may not be up to date. Otherwise run "lensfun-update-data" in a terminal.

Maik
Comment 3 caulier.gilles 2025-02-26 09:59:51 UTC
Note : if you use the digiKam appimage bundle for Linux that we prodides, the LensFun database is up-to-date...
Comment 4 Antonio 2025-02-26 10:15:07 UTC
Running "lensfun-update-data", I get the following warning: 
"
Comando «lensfun-update-data» non trovato, ma può essere installato con:
sudo apt install liblensfun-bin
"
Is it correct running "sudo apt install liblensfun-bin"?
--
Antonio Angelo



mercoledì 26 febbraio 2025 09:54, Maik Qualmann <bugzilla_noreply@kde.org> ha scritto:

> https://bugs.kde.org/show_bug.cgi?id=500739
> 
> --- Comment #2 from Maik Qualmann metzpinguin@gmail.com ---
> 
> After searching on the web I found this image in the camera and lens
> combination.
> 
> https://www.dpreview.com/sample-galleries/2274629080/canon-eos-60d-preview-samples/9070040242
> 
> Tested here with the Windows version of digiKam-8.6.0, no problems. Full
> recognition via the metadata and visible correction.
> Your Lensfun database may not be up to date. Otherwise run
> "lensfun-update-data" in a terminal.
> 
> Maik
> 
> --
> You are receiving this mail because:
> You reported the bug.


Two weeks ago I fully reinstall Ubuntu 20.04.6, the upgraded to Ubuntu 22.
--
Antonio Angelo
Comment 5 Maik Qualmann 2025-02-26 10:46:11 UTC
Yes, that's correct, you need to install "liblensfun-bin". I assume you are using the digiKam Snap package under Ubuntu with sandbox. The Snap package is actually useless, I also suspect that it does not contain the lensfun data. Updating with "lensfun-update-data" installed a copy of the data in your home directory. However, as Gilles already wrote, we strongly recommend using the AppImage.

Maik
Comment 6 Antonio 2025-02-26 11:10:37 UTC
Some informations:
- I am running digiKam-8.5.0-Qt6-x86-64.appimage
- I just installed "sudo apt install liblensfun-bin"
- I also update with "lensfun-update-data"
- I re-run digikam but the behaviour seems to be exactly the same than before.

I looked in my Home directory (/home/antonio) but I cannot (find/)recognize any lensfun data.
--
Antonio Angelo

Inviato con l'email sicura Proton Mail.

mercoledì 26 febbraio 2025 11:46, Maik Qualmann <bugzilla_noreply@kde.org> ha scritto:

> https://bugs.kde.org/show_bug.cgi?id=500739
> 
> --- Comment #5 from Maik Qualmann metzpinguin@gmail.com ---
> 
> Yes, that's correct, you need to install "liblensfun-bin". I assume you are
> using the digiKam Snap package under Ubuntu with sandbox. The Snap package is
> actually useless, I also suspect that it does not contain the lensfun data.
> Updating with "lensfun-update-data" installed a copy of the data in your home
> directory. However, as Gilles already wrote, we strongly recommend using the
> AppImage.
> 
> Maik
> 
> --
> You are receiving this mail because:
> You reported the bug.
Comment 7 Antonio 2025-02-26 11:16:07 UTC
OOPS!

I have many xml files, all with date 24/02/2025 inside:
/home/antonio/.local/share/lensfun/updates/version_1

--
Antonio Angelo

Inviato con l'email sicura Proton Mail.

mercoledì 26 febbraio 2025 12:10, Antonio Angelo <antonio.angelo@protonmail.com> ha scritto:

> Some informations:
> - I am running digiKam-8.5.0-Qt6-x86-64.appimage
> - I just installed "sudo apt install liblensfun-bin"
> - I also update with "lensfun-update-data"
> - I re-run digikam but the behaviour seems to be exactly the same than before.
> 
> I looked in my Home directory (/home/antonio) but I cannot (find/)recognize any lensfun data.
> 
> --
> Antonio Angelo
> 
> Inviato con l'email sicura Proton Mail.
> 
> 
> mercoledì 26 febbraio 2025 11:46, Maik Qualmann bugzilla_noreply@kde.org ha scritto:
> 
> > https://bugs.kde.org/show_bug.cgi?id=500739
> > 
> > --- Comment #5 from Maik Qualmann metzpinguin@gmail.com ---
> > 
> > Yes, that's correct, you need to install "liblensfun-bin". I assume you are
> > using the digiKam Snap package under Ubuntu with sandbox. The Snap package is
> > actually useless, I also suspect that it does not contain the lensfun data.
> > Updating with "lensfun-update-data" installed a copy of the data in your home
> > directory. However, as Gilles already wrote, we strongly recommend using the
> > AppImage.
> > 
> > Maik
> > 
> > --
> > You are receiving this mail because:
> > You reported the bug.
Comment 8 Maik Qualmann 2025-02-26 11:46:07 UTC
Ok, Lensfun can actually malfunction in the AppImage. We are using a pre-release version of lensfun there. In this case, the lensfun folder must not exist in the home directory, because the data is no longer compatible.

Maik
Comment 9 Antonio 2025-02-27 16:13:03 UTC
Well, but can I correct something in order to have lensfun working, or I have to wait for a new release? 
And new release of digikam and/or lensfun? 
--
Antonio Angelo

Inviato da Proton Mail Android


-------- Messaggio originale --------
26/02/25 12:46, Maik Qualmann <bugzilla_noreply@kde.org> ha scritto:

>  https://bugs.kde.org/show_bug.cgi?id=500739
>  
>  --- Comment #8 from Maik Qualmann <metzpinguin@gmail.com> ---
>  Ok, Lensfun can actually malfunction in the AppImage. We are using a
>  pre-release version of lensfun there. In this case, the lensfun folder must not
>  exist in the home directory, because the data is no longer compatible.
>  
>  Maik
>  
>  --
>  You are receiving this mail because:
>  You reported the bug.
Comment 10 Maik Qualmann 2025-02-27 17:39:30 UTC
The reason is that the AppImage finds an older version of the Lensfun database in the system and does not use its own in the AppImage. I'll take a look at this for the digiKam-8.6.0 release.

Maik
Comment 11 Maik Qualmann 2025-02-27 20:40:45 UTC
Git commit 95a30e7fd43e1477ea34e7bb198a279e07754994 by Maik Qualmann.
Committed on 27/02/2025 at 20:33.
Pushed by mqualmann into branch 'master'.

fix detection of paths for Lensfun data

M  +38   -16   core/libs/dimg/filters/lens/lensfuniface.cpp

https://invent.kde.org/graphics/digikam/-/commit/95a30e7fd43e1477ea34e7bb198a279e07754994
Comment 12 Maik Qualmann 2025-02-28 22:07:50 UTC
Please test the current pre-release digiKam-8.6.0 AppImage from here:

https://files.kde.org/digikam/

The lens correction should now work again.

Maik
Comment 13 Antonio 2025-03-02 11:05:05 UTC
Hello!

I downloaded 
digiKam-8.6.0-20250301T190107-Qt6-x86-64-debug.appimage

run it and downloaded all the sw for faces recognizing.
I edited the same image I sent you and now lens correction is clearly visible.
Both lens and camera are fully recognized from metadata.

Wonderful!
Thank you!
--
Antonio Angelo

Inviato con l'email sicura Proton Mail.

domenica 2 marzo 2025 08:40, Maik Qualmann <bugzilla_noreply@kde.org> ha scritto:

> https://bugs.kde.org/show_bug.cgi?id=500739
> 
> Maik Qualmann metzpinguin@gmail.com changed:
> 
> 
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|REPORTED |RESOLVED
> Resolution|--- |FIXED
> Version Fixed In| |8.6.0
> 
> --
> You are receiving this mail because:
> You reported the bug.