Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.79k stars 316 forks source link

Improve implementation of lensfun data #6464

Open rebio opened 2 years ago

rebio commented 2 years ago

Several suggestion to improve how lensfun data is handled in RT.

Based on:

SUGGESTIONS Nr. Suggestion Reason
1 Better UI for selecting the camera/lens While trying to find out what RT didn't like in mil-samyang.xml I often had to scroll through the entire list of manufacturer just to get to the bottom. That was boring and is no where near user friendly.
2 Device search function In such a huge list, a search function would be god mode. A well sorted list with a good UI is a good step in the right direction, but a search bar would of course be really nice to have
3 Button to re-read the database One of the most boring parts was to close and re-open RT after changing a small part of the calibration file. I certainly know that this not be needed for the average user, but it would have helped here A LOT. Since the average user does not need it, I would be fine with having it hidden in some 'developer tools' section
4 More information about camera+lens combination I was going through the lensfun calibration files a lot and the calibration data is not the same everywhere. There is a difference in crop factor, lens mount and the calibration data itself. If you don't "study" the calibration data you don't know. The little tickboxed below the selection will not help the average user a lot. There is no information that could help them along. I am pretty sure that nobody really wants to search. If they want to search, they don't know where. And if they know where I would question if they really want to bother doing so. I came across the data by accident.
5 version "1" vs "2" The current database files say <lensdatabase version="1"> at the top. If the version is "2", RT will not use the file. I don't know what changed, but it would certainly be good if RT would know how to use version 2. For the mentioned bug I just copied the (version 2) data without any problems.
6 Set a path for lensfun calibration data in settings menu (If there is such a setting, please forgive my rant and let me know - I wasn't able to find it.) For some reason I switched over to Linux (must be because of some exotic fetish). I installed RT through flatpak. The install location of the lensfun database is /var/lib/flatpak/app/com.rawtherapee.RawTherapee/x86_64/stable/ d59173dcaab32fb352ca200ef3ea05b5e249f33ca3de481dc4ea3db22d67e94a/ files/share/lensfun/version_1/*. Maybe this is because of KDE/Dolphin, but I can not rename or add files in this folder. I can edit the content of the file, but not it's place within the folder. Rawpedia says that there is a "lensfun-update-data" executable. This sounds much like a hassle to me - Linux and it's habits is enough for now for me. A user who is new to Linux will have an even worse time. I know that RawPedia says that the path of the lensfun database can be adjusted in ~/.config/RawTherapee* - the folder does not exist. I know, I could create it, add a file etc. but the bottom line is that it's again pretty user un-friendly. To be able to set a path from within the settings would be nice. I would love if I could set it to the folder of lensfun's git repo on my system. The latest updates are only a git pull away. People who don't use git could download the latest lensfun release, extract the files from the archive and set the link to the database folder.
7 Tiny log on demand to check for errors Again a 'developer tool' that would have made debugging a lot easier. A button (hidden by default) that fetches calibration data and tells you what it does. There probably is a log somewhere that also lists all the other things RT is doing. Since this log would be only for lens data I thought about it to be more case specific and have a better layout of what it does and can and can not import.
8 Better naming Some lenses have good names and follow a pattern. Some lenses do not. Eg. (with the latest updates applied for samyang): "Samyang SAMYANG AF 12mm F2.0" "Canon EF28mmf/2.8". I know that bad name formats is not something RT can fix, but is caused by lensfun. But maybe there is a bit of room for improvements (eg. if the manufacturer is the first part of the lens name, do not include it twice)
9 Camera Class separation and auto camera+lens combinations lensfun does not only support cameras with interchangeable lens, but also one with a fixed lens (eg. smartphones, drones, compact cameras, etc.). It is just an extra step that I have to select the camera and then lens. Again not sure how much RT can really do here since much is based on lensfun's calibration files

I probably forgot a thing or two that I can not remember right now. I'll add them later when I come across them again.

Lawrence37 commented 2 years ago
  1. Camera/lens selection: What do you suggest here? Drop-downs are reasonable. Unfortunately, GKT drop-downs are weird and there's nothing we can customize as far as I know.
  2. Search: I like this idea.
  3. Refresh: There's very little utility for most users so it's not worth a developer's time.
  4. More information: I'm not sure what this one is about. The lensfun files aren't meant to be viewed by the casual user and RawTherapee displays all the relevant information (lens/camera name and a warning if the chosen lens is designed for a camera with a smaller sensor than the selected one).
  5. Version: I'm pretty sure this is the lensfun database version. Version 2 is for the next version of lensfun which is currently in beta (v0.95). The version 2 files should work if you re-link RawTherapee with that version of lensfun (probably hard or impossible with a Flatpak unless you bundle your own).
  6. Path: Flatpaks are self-contained bundles. If you want to move files around, read the documentation for Flatpaks to see if and how it can be done. I thought there was a way to set the lensfun directory from preferences, but I guess that was just my imagination. There should be no need to create the options file. RawTherapee will create it for you. Since it is not there, the Flatpak must have been configured to place it somewhere else. You might need to ask whoever created the Flatpak.
  7. Log: In the options file, you can set Verbose under the [General] section to true. RawTherapee will print many messages if you run it from a terminal. I don't know what "calibration data" you are referring to, but it sounds like it concerns lensfun more than RawTherapee.
  8. Naming: You are probably right that it's a lensfun thing. The repeated manufacturer name may be easily fixed in RawTherapee. I think it is already trying to remove duplicates, but failed in this case because the capitalization is different.
  9. Camera-lens pairing: This will require a database of camera-lens pairs and will need to be updated as new cameras are added to lensfun. I'm not sure how beneficial this will be because the automatic selection should eliminate the need to manually select a camera in the first place.
rebio commented 2 years ago

I thought of some UI designs that are maybe more or less possible, but since my "reports are based on a false assumption" anyway I do my self a favour and spend the countless hours that would have gone into this for something else

Thanatomanic commented 2 years ago

Eh, sorry if I offended you, but I also replied "Notwithstanding general issues with handling lensfun" acknowledging that whatever we do with automated lens correction can definitely be improved. I would say that (1), (2), (4) and (6) are very reasonable improvements to work on.