Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing lenses #46

Closed
pfjason opened this issue Aug 16, 2021 · 4 comments
Closed

Add missing lenses #46

pfjason opened this issue Aug 16, 2021 · 4 comments

Comments

@pfjason
Copy link
Contributor

pfjason commented Aug 16, 2021

Missing Lenses:
Sigma 18-300mm F3.5-6.3 DC MACRO OS HSM | Contemporary 014
Canon EF-S24mm f/2.8 STM

I don't know enough rust to find an answer, but what is the purpose of the toml table full of lenses? Why not just copy the information from existing exif data? Are the other parameters used somewhere I haven't seen in the code?

@cytrinox
Copy link
Contributor

The relevant information is not available in the raw CR3 file. Maybe what you mean by EXIF data is what you see in the output from exiftool or exiv2. These tools have internal lens tables as well and often try to guess which lens was acutally used.

@pfjason
Copy link
Contributor Author

pfjason commented Aug 16, 2021

I mean wherever you're pulling the identifier string "Sigma 18-300mm F3.5-6.3 DC MACRO OS HSM | Contemporary 014" to print the message that dnglab is missing the lens somehow already has at least that information. I don't know a lot about the raw format, I just know that when I shoot in raw+jpg the data is populated straight from the camera in the jpg, so I have to assume it's also written somewhere in the raw by the camera, I assumed in metadata fields. I didn't realize they were guessing based on other available information. I'm curious to know how the other fields are used if the range doesn't actually matter.

  • Great work by the way, I'm using it because my workflow is all open source and going straight from the camera in CR3 to RawTherapee or Darktable causes me to lose all the metadata.

@cytrinox
Copy link
Contributor

Yes, some lenses provide pretty good information and the camera, but thats not always the case. For example, Canon writes into the CR3 file for their RF lenses something like "RF70-200mm F4 L IS USM". But the name used by exiv2 and exiftool is "RF 70-200mm F4L IS USM". So if nobody maps the name, tools like darktable won't find the correct lens correction profile. I've talked to the exiv2 developers, but the situation is "as is" and most is based on guesses. For example, Adobe DNG may choose another lens name as exiv2 and so on. While working on dnglab, I've decided that the best for my case is that I already handle the mapping inside dnglab (which is different from Adobe DNG). I map to names used by exiv2 and exiftool, so there are high chances that in an FOSS workflow (dnglab + darktable + lensfun, for example) there should be no problems.
Some lesser known models like Zeiss or Voigtlaender sometimes only write the min/max aperature and the used focal length. You find a lot of guessing code inside exiftool to detect the correct lens. Canon lenses, Sigma and Tokina provides afaik the best information.
The string you see in the dnglab output is taken from a single CR3 lens info text field. For some of my lenses from Walimex, this string is just empty, I've not added the guessing code yet.

So the conclusion is: even if the raw file may contain all information, that may not be the case for another format, for example CR3 vs. CR2 with the same lens but another body. So I go with hardcoded lens database.

@pfjason
Copy link
Contributor Author

pfjason commented Aug 16, 2021

This is what happens in closed/proprietary systems... nobody standardizes, or the bare minimum standardization happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants