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
Sigma 24-70mm F2,8 DG OS HSM Art not detected #743
Comments
Thanks for letting us know about this. And I'm glad to hear that ~/.exiv2 is working for you. I added that in Exiv2 v0.26 because it enables users to immediately update the lens recognition without waiting for a software update. And the other reason to add this feature was to reduce the work for me to deal many requests for new lenses. We had a very good contributor dealing with lens recognition. He left the project to return to college and that's when I decided to add ~/.exiv2 to enable users and reduce my work-load. I don't know how the tables in src/nikonmn_int.cpp work. The documentation concerning the table is at the top. I don't believe every field is used by Exiv2 to determine the lens, however the table was "bought in" without modification.
Here's the raw data from my Nikon/Sigma lens, and your sample.
I've copied and modified the record for my Sigma/Nikon Lens, however this hasn't been successful.
I'm going to ask @FreddieWitherden as he worked on that code last year. If Freddie is unable to help you, I cannot be of further help. However, your lens is being recognised by the entry in ~/.exiv2, so you have a fix. It is regrettable that Exiv2 became involved with lens recognition because the lens type isn't stored in the metadata. It is deduced from the metadata. Deducing the lens type has created a code maintenance issue as new lenses are released with great frequency. |
So the underlying problem is that the Nikon lens IDs are not sufficient to uniquely identify a lens. (This is because some third party lenses have IDs which conflict with those of Nikon lenses.) To this end additional data such as the focal length range and aperture is used to help disambiguate lenses with duplicate IDs. Thus in order for everything to work I believe you need to change more than just the ID. I am still trying to unpick some aspects of the table and am not currently in a position where I know how to construct an entry from scratch. However, my suggestion would be to see if you can e-mail Robert Rottmerhusen and see what is going on with his site (which until recently was well maintained and updated). The good news, going forwards at least, is that more modern mounts enable the lens to transmit its full name (as opposed to just an ID) to the camera body so that it is no longer the problem of libraries such as exiv2. |
I have googled a bit and have no clue of his email adress). I can contact
him when I have that adress.
Am Fr., 15. März 2019 um 02:14 Uhr schrieb Freddie Witherden <
notifications@github.com>:
… So the underlying problem is that the Nikon lens IDs are not sufficient to
uniquely identify a lens. (This is because some third party lenses have IDs
which conflict with those of Nikon lenses.) To this end additional data
such as the focal length range and aperture is used to help disambiguate
lenses with duplicate IDs. Thus in order for everything to work I believe
you need to change more than just the ID.
I am still trying to unpick some aspects of the table and am not currently
in a position where I know how to construct an entry from scratch. However,
my suggestion would be to see if you can e-mail Robert Rottmerhusen and see
what is going on with his site (which until recently was well maintained
and updated).
The good news, going forwards at least, is that more modern mounts enable
the lens to transmit its full name (as opposed to just an ID) to the camera
body so that it is no longer the problem of libraries such as exiv2.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#743 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC7uOURaau3K6-KrR0ehKXDr8ki_7jeoks5vWvP7gaJpZM4b1ODl>
.
|
@FreddieWitherden Thanks for stepping into this. Your thoughts are the same as mine. I modified 5 entries in:
I guess I'm going to have to debug fmountlens in src/nikonmn_int.cpp and discover the exact metadata required to match the lens.
Today is the scheduled date for Exiv2 v0.27.1 RC1 and I'm not ready. Probably in for a 12 hour day with that. |
Gentlemen: I wasn't able to get the release out today. Ran into a documentation obstacle which I'll fix next week. So, to finish the week on a high, I had another look at this. The correct entry in the table is:
I discovered this by tweaking this code (locally, on my machine):
which nicely recognises the lens (with yesterday's record) and tells us that:
A little higher in the code, we have:
So, here's the raw information:
I'll submit a PR with an update to the test suite to include the metadata from Dave's image. With the record above, the existing test suite passes and the output from Dave's image is:
The fix isn't urgent and will not go into v0.27.1 as Dave uses the ~/.exiv2 work-around. I'll assign this issue to Milestone 0.27.2 which is due at the end of Q2 = 30 June 2019. |
Thanks a lot guys! Looks very promising.
I finally have understood how to add the lens to the database and tested
your findings. The line of code works perfectly on my side.
Thank you all for your very good support!
Long life OSS!
Cheers
Dave
Am Fr., 15. März 2019 um 20:14 Uhr schrieb Robin Mills <
notifications@github.com>:
… Gentlemen:
I wasn't able to get the release out today. Ran into a documentation
obstacle which I'll fix next week. So, to finish the week on a high, I had
another look at this. The correct entry in the table is:
{0xc9,0x48,0x37,0x5c,0x24,0x24,0x4b,0x4E,0x01,0x00,0x00, "Sigma", "", "24-70mm F2,8 DG OS HSM Art"},
I discovered this by tweaking this code (locally, on my machine):
if ( raw[0] == fmountlens[i].lid
// stps varies with focal length for some Sigma zoom lenses.
&&(raw[1] == fmountlens[i].stps || strcmp(fmountlens[i].manuf, "Sigma") == 0)
&& raw[2] == fmountlens[i].focs
&& raw[3] == fmountlens[i].focl
// && raw[4] == fmountlens[i].aps
// && raw[5] == fmountlens[i].apl
// && raw[6] == fmountlens[i].lfw
&& raw[7] == fmountlens[i].ltype) {
// Lens found in database
std::cout << "raw[4] = " << (int) raw[4]
<< " raw[5] = " << (int) raw[5]
<< " raw[6] = " << (int) raw[6]
<< std::endl;
return os << fmountlens[i].manuf << " " << fmountlens[i].lensname;
}
which nicely recognises the lens (with yesterday's record) and tells us
that:
658 ***@***.***:~/gnu/github/exiv2/0.27-maintenance/build $ bin/exiv2 -pa --grep lens/i ~/Downloads/54391258-9632c000-46a4-11e9-87fc-d7db6a5e99dd.JPG
Exif.Nikon3.LensType Byte 1 D G VR
Exif.Nikon3.Lens Rational 4 24-70mm F2.8
Exif.Nikon3.LensFStops Undefined 4 6
Exif.NikonLd3.LensIDNumber Byte 1 raw[4] = 36 raw[5] = 36 raw[6] = 75
Sigma Sigma 24-70mm F2,8 DG OS HSM Art
Exif.NikonLd3.LensFStops Byte 1 F6.0
A little higher in the code, we have:
static const char* tags[] = {
"LensIDNumber",
"LensFStops",
"MinFocalLength",
"MaxFocalLength",
"MaxApertureAtMinFocal",
"MaxApertureAtMaxFocal",
"MCUVersion"
};
So, here's the raw information:
$ exiv2 -pv --grep focal/i --grep lens/i --grep mcu/i ~/Downloads/54391258-9632c000-46a4-11e9-87fc-d7db6a5e99dd.JPG
0x920a Photo FocalLength Rational 1 240/10
0x0083 Nikon3 LensType Byte 1 78
0x0084 Nikon3 Lens Rational 4 240/10 700/10 28/10 28/10
0x008b Nikon3 LensFStops Undefined 4 72 1 12 0
0x000b NikonLd3 FocalLength Byte 1 55
0x000c NikonLd3 LensIDNumber Byte 1 201
0x000d NikonLd3 LensFStops Byte 1 72
0x000e NikonLd3 MinFocalLength Byte 1 55
0x000f NikonLd3 MaxFocalLength Byte 1 92
0x0010 NikonLd3 MaxApertureAtMinFocal Byte 1 36
0x0011 NikonLd3 MaxApertureAtMaxFocal Byte 1 36
0x0012 NikonLd3 MCUVersion Byte 1 75
0xa405 Photo FocalLengthIn35mmFilm Short 1 24
$
I'll edit this note over the weekend into a nice little table. And then
submit a PR with an update to the test suite to include the the metadata
from Dave's image.
With the record above, the existing test suite passes and the output from
Dave's image is:
$ bin/exiv2 -pa --grep lens/i ~/Downloads/54391258-9632c000-46a4-11e9-87fc-d7db6a5e99dd.JPG
Exif.Nikon3.LensType Byte 1 D G VR
Exif.Nikon3.Lens Rational 4 24-70mm F2.8
Exif.Nikon3.LensFStops Undefined 4 6
Exif.NikonLd3.LensIDNumber Byte 1 Sigma 24-70mm F2,8 DG OS HSM Art
Exif.NikonLd3.LensFStops Byte 1 F6.0
$
The fix isn't going into v0.27.1. This isn't urgent as Dave is using the
~/.exiv2 fix. I'll assign it to Milestone 0.27.2 (due at the end of Q2 =
June 2019).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#743 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC7uOch5SpAa90445LlHZ4KnugGFUWeoks5vW_ERgaJpZM4b1ODl>
.
|
PR with code and update to the test suite has been submitted to branch 0.27-maintenance #886 Fix will be included in Exiv2 v0.27.2 which is on schedule for release on 2019-06-30. The fix will be ported to 'master' and included in Exiv2 v0.28 which we hope to release in 2020. |
Hi, I have a Sigma Lens which I do not find supported yet. Though the entry
cat ~/.exiv2
[nikon]
201=Sigma 24-70mm F2,8 DG OS HSM Art
is working fine I hope I can help others to have an automatic support. As described at 3. Contributing Lens Data I shot a small JPG with caps-on that is unmodified and attached to this case.
I would love to make a pr, but I have no idea and did not find any documentation how to create and interprete the data required for fmountlens[].
Btw, these links are dead (from src/nikonmn_int.cpp):
//------------------------------------------------------------------------------
//
//
// Created by Robert Rottmerhusen 2005 - 2018
// http://www.rottmerhusen.com (lens_id@rottmerhusen.com)
//
// For contributor info and more visit my online list:
// http://www.rottmerhusen.com/objektives/lensid/thirdparty.html
Kind regards
Dave
The text was updated successfully, but these errors were encountered: