-
Notifications
You must be signed in to change notification settings - Fork 281
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
Mismatch lens detection with Canon RF 24-105 versions (STM / USM) in darktable #2057
Comments
Looking at the source code, there is an entry for:
If Exiv2 incorrectly identifies a lens then there are two solutions:
|
Thank you @postscript-dev , As I am using Windows and can't figure out, how to use exiv2, maybe you can check the lens detection of exiv2? Thank you so much at this point |
@GitHubbero: Usually in posts like yours, the lens value is missing and it is a simple case of adding an entry and a test file. However, this time it is different, as your lens is already defined in Exiv2. The Exiv2 sample program mentioned in https://www.exiv2.org/manpage.html, is a small command line tool that enables viewing and editing of image metadata. I can use this to output the lens tag from your test file:
Although the lens is defined in Exiv2, it is currently not being found and this is something that I will fix. However, even if I submitted this today, due to release dates, it could still take more than 6 months before arriving in darktable. There is another solution though, that will only take a couple of minutes for you to complete. If you add a lens configuration file to your computer then this will fix the problem on your machine. To do this in Windows:
If I rerun the test from above, you can see that the output has changed.
To make the correct value appear in darktable:
I don't use darktable much, so there may be a simpler way to refresh the files than what I have shown. |
Thank you for your great work. |
I should be corrected by #1692 👍 (at least, the Canon RF 50mm F1.8 version is now correctly identified while it was identified as the F1.2 version with exiv2 0.27.5) Note that all Canon RF lenses have the same LensType=61182. |
Thank you @EC1000 . I knew that the RF lenses have all the same type, but they are different with the addition e.g. //2 aren't they? I found exiv2.mo files in my share folder of darktable. I assume i have to exchange them with the new one, am I right? |
I have no experience with Canon cameras or lenses, so this is helpful.
The
Out of interest, what are your other lenses? |
There is the RF24-240 4-6.3 and RF 100-400 5.6-8 |
What exiv2 version are you using? If you have three RF lenses that are not identified, you can find a possible solution here (set All should be ok with future exiv2 V1.00 version :) |
On the funny side, my 100-400 lens is identified correctly (couldn't figure out how it's with the 24-240 because it's just on my wishlist by now) I couldn't find out which version I am using, because I just have darktable installed. But it should be 0.27.5, at least 0.27.4. |
It's very likely that the darktable "About" box (or preference panel) will list the version of every library. |
It's really weird, because there is no "about" box in darktable. I searched for it before, and also now but i can't find something like that. Nor anything like this in the options/preferences |
Some of the darktable folks are on the Exiv2 chat server and they'll advise. When I retired from Exiv2 last year, I left the chat room. Time for me to leave Exiv2 to other great young guys like @postscript-dev. |
@GitHubbero: Sorry for the delay replying, I needed to finish some other jobs first. I don't have much free time this week but your issue is the next task that I intend to work on. |
@postscript-dev Thanks for getting involved with this, Peter. I know you're doing lots of good stuff for Exiv2 AND you have a life to live! I'm sure @GitHubbero appreciates your efforts. @GitHubbero I've thought of other ways to check the version of exiv2 being used by darktable.
539 rmills@rmillsm1-ubuntu:~/gnu/github/exiv2/0.27-maintenance/build/lib $ ls -l
total 4616
lrwxrwxrwx 1 rmills rmills 14 Feb 6 11:18 libexiv2.so -> libexiv2.so.27
-rwxrwxr-x 1 rmills rmills 3675944 Feb 6 11:18 libexiv2.so.0.27.5
lrwxrwxrwx 1 rmills rmills 18 Feb 6 11:18 libexiv2.so.27 -> libexiv2.so.0.27.5
-rw-rw-r-- 1 rmills rmills 1046168 Feb 6 11:17 libexiv2-xmp.a
540 rmills@rmillsm1-ubuntu:~/gnu/github/exiv2/0.27-maintenance/build/lib $ grep 0.27.5 libexiv2.so.0.27.5
Binary file libexiv2.so.0.27.5 matches
541 rmills@rmillsm1-ubuntu:~/gnu/github/exiv2/0.27-maintenance/build/lib $ grep 0.27.4 libexiv2.so.0.27.5
542 rmills@rmillsm1-ubuntu:~/gnu/github/exiv2/0.27-maintenance/build/lib $ |
@postscript-dev I appreciate definitely you effort. And there is no pressure by my side. And thank you @clanmills for your thoughts, but I use Windows as platform and so it's always a bit harder around the darktable environment. Sorry for that. |
@GitHubbero I forgot you're using Windows. BTW I like Windows (but don't tell anybody). Use procexp.exe to determine which exiv2.dll is being used. https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer We'll have to update the exiv2 build to add a public "version" to the DLL properties which would be visible in procexp.exe If your version of darktable supports BMFF (Canon .CR3, Apple .HEIC), then it's using exiv2 v0.27.4 or later. Using grep, or dumpbin will probably reveal the version string baked into exiv2.dll. |
Yes I am working with .CR3 and darktable shows me correctly the image data. Except the lens data of RF 24-105 |
@GitHubbero: @hassec: Lines 2781 to 2784 in b2b6d83
where does the |
@postscript-dev you don't have to apologize. I am glad that you take the trouble to solve the problem. |
Previously, when translating `Exif.CanonCs.LensType`, `Exif.CanonCs.MaxAperture` was used as the upper bound to find a potential match. In Exiv2#2057, the test file produced a value outside of that range and the lens was not identified. The fix uses `Exif.CanonCs.MinAperture` instead.
@GitHubbero: I have submitted a PR to fix your problem (#2235) which will now output: $ exiv2 --Print kyyvt --key Exif.CanonCs.LensType Canon_RF_24-105_F4-7.1_IS_STM.jpg
Exif.CanonCs.LensType Short 61182 Canon RF 24-105mm F4L IS USM *OR* Canon RF 24-105mm F4-7.1 IS STM Providing a list of these two lenses is the best we can do at the moment. When the PR is merged, the issue will be fixed on the Thanks again. |
FWIW, I have dropped using |
This reverts commit d8d5a3a. Revert to fix the lens detection in a different way.
The `Canon RF 24-105 F4-7.1 IS STM` lens is reported as using an `Exif.CanonCs.MaxAperture` of `F7.3` instead of `F7.1`. As a result, the translation of `Exif.CanonCs.LensType` is missing. Fix updates the `CanonEV()` decode function to provide the correct value.
I apologize, if the issue is already on GitHub, but i couldn't find anything.
While working with darktable, i saw it detects my lens wrong.
I used for the photo the Canon RF 24-105 F4-7.1 IS STM
but darktable detects it as Canon RF 24-105 F4L IS USM
I am sorry, if the problem is minor, but i can't work properly with exiv2 to check it myself. So i thought the problem of the lens detection have to be from exiv2 and its tags, because the lens in the exif-data is correctly (checked with exiftool and DPP4).
Hope you could help me. And if there is something unclear, text me.
Thank you all.
The text was updated successfully, but these errors were encountered: