Project

General

Profile

Incorrect lens name

Added by Rafael Linux User almost 4 years ago

I buyed a new Panasonic lens for my camera. In the lense case and the lense, it appears HS35100 and in the Panasonic web this is the info that appears:
LUMIX G X Vario Lens, 35-100mm, F2.8 ASPH., Professional Micro Four Thirds, POWER Optical I.S. - H-*HS35100*

However, Digikam and Darktable doesn't apply any lens correction, cause my lens is identified incorrectly as "Lumix G Vario 35-100/F2.8" (I guess is the FS35100K model), as you can read in the output of the command "exiv2 -pt _1000731.RW2 | grep -i 'lens\|model\|make'"
Exif.PanasonicRaw.Make Ascii 10 Panasonic
Exif.PanasonicRaw.Model Ascii 8 DMC-GX8
Exif.Image.Make Ascii 10 Panasonic
Exif.Image.Model Ascii 8 DMC-GX8
Exif.Photo.MakerNote Undefined 28904 (Binary value suppressed)
Exif.MakerNote.Offset Long 1 1320
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.Panasonic.ConversionLens Short 1 Off
Exif.Panasonic.LensType Ascii 34 LUMIX G VARIO 35-100/F2.8
Exif.Panasonic.LensSerialNumber Ascii 14 0JE6GH001416
Exif.Panasonic.LensFirmwareVersion Undefined 4 0 1 3 0
Exif.Panasonic.MakerNoteVersion Undefined 4 1.51

The mistake is easy to make, cause there are three models of Panasonic very, very similar: FS35100K, HS35100 and HSA35100
LUMIX G X Vario Lens, 35-100mm, F2.8 ASPH., Professional Micro Four Thirds, POWER Optical I.S. - H-HS35100
LUMIX G X VARIO Professional Lens, 35-100mm, F2.8 II ASPH., Mirrorless Micro Four Thirds Mount, POWER Optical I.S. - H-HSA35100
LUMIX G VARIO Ultra Compact Zoom 35-100mm / F4.0-5.6 H-FS35100K

even I don't know the difference between the first and second lens, but one of them is $200 more expensive.

Please, I need this lens to avoid big distortion (see attached image) in my photos when export RAW files in Linux.

Could you fix it?

Thank you


Replies (15)

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

You can fix this for yourself. In Exiv2 v0.26, you can put the name of your lens into the file ~/.exiv2 This is discussed here. http://dev.exiv2.org/issues/1328

If you have any difficulty with this please attach a test image taken with your camera and lens.

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

Well, I tried to do what I read in the link you included. Despite I tried to fix the problem, I discovered in Darktable that my camera (Panasonic DMC-GX8) is NOT recognized, is not appearing in the list of cameras, so I guess is not recognized in Darktable, but IS in exiv2 (as you can see in the output I included in my post).

So, what's the problem? Why Darktable/Digikam are not showing my camera? What can I do now?

Thank you again

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

We have to take a 2 step approach:

1) Please attach a test image taken with your camera and lens.
I would like to test that the correct setting in ~/.exiv2 will enable your lens to be recognised.

2) The ~/.exiv2 feature is new in Exiv2 v0.26. We'll have to be certain that you are using Exiv2 v0.26 in darktable and digiKam
Please let me know the platform (Linux, MacOS-X, etc) and version of the application

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

exiv2 -pa _1000731.RW2 | grep -i 'lens\|model\|make'_1000731.RW2Exif.PanasonicRaw.Make Ascii 10 Panasonic

Exif.PanasonicRaw.Model Ascii 8 DMC-GX8
Exif.Image.Make Ascii 10 Panasonic
Exif.Image.Model Ascii 8 DMC-GX8
Exif.Photo.MakerNote Undefined 28904 (Binary value suppressed)
Exif.MakerNote.Offset Long 1 1320
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.Panasonic.ConversionLens Short 1 Off
Exif.Panasonic.LensType Ascii 34 LUMIX G VARIO 35-100/F2.8
Exif.Panasonic.LensSerialNumber Ascii 14 0JE6GH001416
Exif.Panasonic.LensFirmwareVersion Undefined 4 0 1 3 0
: Exif.Panasonic.MakerNoteVersion Undefined 4 1.51
(No XMP data found in the file)

exiv2 -pv _1000731.RW2 | grep -i 'lens\|model\|make'0x010f PanasonicRaw Make Ascii 10 Panasonic

0x0110 PanasonicRaw Model Ascii 8 DMC-GX8
0x010f Image Make Ascii 10 Panasonic
0x0110 Image Model Ascii 8 DMC-GX8
0x927c Photo MakerNote Undefined 28904 (Binary value suppressed)
0x0001 MakerNote Offset Long 1 1320
0x0002 MakerNote ByteOrder Ascii 3 II
0x0035 Panasonic ConversionLens Short 1 1
0x0051 Panasonic LensType Ascii 34 LUMIX G VARIO 35-100/F2.8
0x0052 Panasonic LensSerialNumber Ascii 14 0JE6GH001416
0x0060 Panasonic LensFirmwareVersion Undefined 4 0 1 3 0
0x8000 Panasonic MakerNoteVersion Undefined 4 48 49 53 49

The RAW file is exceed 20MiB, so the link to it is https://drive.google.com/open?id=1v6OlhYP3OtS6QIBWNrvl9lzzxWIZJQ2L (sorry, I think you'll need a Google account to download the file).

The ".exiv2" file I wrote had this text:
[panasonic]
34=LUMIX G X Vario Lens, 35-100mm, F2.8 ASPH

but it didn't worked, surely cause it "exiv2 0.25 001900 (64 bit build)".

I'm using Digikam 5.5.0 on OpenSUSE 42.3 x64

Thank you

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

Update: I forgot to mention that I even did an "lensfun-update-data" but nothing changed.

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

The work-around only applies to Exiv2 v0.26 and later. There is no fix for v0.25. You should upgrade your version of DigiKam to one using Exiv2 v0.26.

Can I ask you to please attach a test image taken with your camera and lens. I want to be quite certain that ~/exiv2 is effective for your camera/lens with v0.26.

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

I attached a link to a RAW file. I check the link and is working. Is not what you want? All RAW files are bigger than 20MiB in my case.

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

Apologies, Rafael. I failed to notice the link. Thanks, I have your file.

Regrettably your proposed code in ~/.exiv2 is ineffective on v0.26. So waiting for v0.26 will not resolve this.

Studying the metadata in your file, I see:

715 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ exiv2 -pv --grep lens/i ~/Downloads/_1020302.RW2
0x0035 Panasonic    ConversionLens              Short       1  1
0x0051 Panasonic    LensType                    Ascii      34  LUMIX G VARIO 12-35/F2.8  <--- This is an ASCII string (of 34 bytes)
0x0052 Panasonic    LensSerialNumber            Ascii      14  16111200561
0x0060 Panasonic    LensFirmwareVersion         Undefined   4  0 1 3 0
716 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ 

The way in which ~/.exiv2 works is to translate the "lensID" into a string by calling Internal::readExiv2Config(). This isn't used by src/pentaxmn_int.cpp because the Pentax image does not contain a LensID. Canon, Nikon and other manufacturers identify the lens with an integer, not a string. However, it appears that Pentax have stored an Ascii string of 34 bytes "LUMIX G VARIO 12-35/F2.8" in the image.

I could consider using ~/.exiv2 to convert the string "LUMIX G VARIO 12-35/F2.8" (or the LensSerialNumber) into the correct lens name in v0.27. However for the moment, there is no workaround for this issue in any version of Exiv2.

You have also asked me to explain why DigiKam/darktable do not list your camera. I don't know.

I recommend that you discuss this with the people at Panasonic or LensFun or DigiKam. At this moment I do not believe Exiv2 can offer you a workaround.

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

I guess that when you talk about Pentax, you mean Panasonic ... Anyway, I was thinking that the ASCII string was generated by exiv2, not from the RAW file, but I was wrong. But that could be a minor issue if at least DK and DT read correctly that the file is from a GX8 camera ... this is being a headhache, certainly.
I wish you get at least to fix the lens detection, and exiv2 detect my X Vario as it.

Thank you again

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

Correct. I wrote that about 6am in England. You're right. I meant Panasonic (and not pentax). I fixed something in src/pentaxmn_int.cpp for somebody this morning and my brain/fingers aren't correctly in sync! Perhaps my old brain will work better in 2018 (when I'll be 67 on January 18).

So, what is our conclusion? As far as I can see, both v0.25 and v0.26 identify the camera correctly:

743 rmills@rmillsmbp:~/gnu/exiv2/0.25 $ sudo make install > /dev/null 2>/dev/null
744 rmills@rmillsmbp:~/gnu/exiv2/0.25 $ exiv2 -pa --grep Make --grep Model ~/Downloads/_1020302.RW2 
Exif.PanasonicRaw.Make                       Ascii      10  Panasonic
Exif.PanasonicRaw.Model                      Ascii       8  DMC-GX8
Exif.Image.Make                              Ascii      10  Panasonic
Exif.Image.Model                             Ascii       8  DMC-GX8
Exif.Photo.MakerNote                         Undefined 28904  (Binary value suppressed)
Exif.MakerNote.Offset                        Long        1  1320
Exif.MakerNote.ByteOrder                     Ascii       3  II
Exif.Panasonic.MakerNoteVersion              Undefined   4  1.51
745 rmills@rmillsmbp:~/gnu/exiv2/0.25 $ cd ../0.26
746 rmills@rmillsmbp:~/gnu/exiv2/0.25 $ sudo make install > /dev/null 2>/dev/null
747 rmills@rmillsmbp:~/gnu/exiv2/0.26 $ exiv2 -pa --grep Make --grep Model ~/Downloads/_1020302.RW2 
RW2 IMAGE
Exif.PanasonicRaw.Make                       Ascii      10  Panasonic
Exif.PanasonicRaw.Model                      Ascii       8  DMC-GX8
Exif.Image.Make                              Ascii      10  Panasonic
Exif.Image.Model                             Ascii       8  DMC-GX8
Exif.Photo.MakerNote                         Undefined 28904  (Binary value suppressed)
Exif.MakerNote.Offset                        Long        1  1320
Exif.MakerNote.ByteOrder                     Ascii       3  II
Exif.Panasonic.MakerNoteVersion              Undefined   4  1.51
748 rmills@rmillsmbp:~/gnu/exiv2/0.26 $ 
I don't use either DT or DK, although I have a working relationship with the developers. I can't see any reason why they cannot identify the camera as a Panasonic DMC-GX8. The Lens string was written into the file by Panasonic:
750 rmills@rmillsmbp:~/gnu/exiv2/0.26 $ exiv2 -pa --grep Lens ~/Downloads/_1020302.RW2 
RW2 IMAGE
Exif.Panasonic.ConversionLens                Short       1  Off
Exif.Panasonic.LensType                      Ascii      34  LUMIX G VARIO 12-35/F2.8 
Exif.Panasonic.LensSerialNumber              Ascii      14  16111200561
Exif.Panasonic.LensFirmwareVersion           Undefined   4  0 1 3 0
751 rmills@rmillsmbp:~/gnu/exiv2/0.26 $

Is there something that you expect me to do, or can we consider this closed?

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

I didn't imagine you were so close to me (I'm UTC+1, hahaha). I was thinking you were replying me from USA so, in first place THANK YOU again, for your quick replies.
On the other hand, as you, I can't understand why DT do not show my camera body so I'm talking with developers about this.
Finally, I think I'll write to Panasonic too, cause is a non sense that they put the same string in RAW format for FS35100K and HS35100 lens.

Have a happy end-year departure and a better new year.

Thank you for your contribution to the community.

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

I suspected that you are in France, so UTC+1. Great. Happy New Year.

I am very surprised that DT/DK do not identify the Camera Model correctly. Both applications use Exiv2 and the tags involved have been in Exiv2 for at least 10 years.

I'll be interested to learn anything from Panasonic. If the camera was released before the lens, they'll argue that it's impossible for the camera to know the lens. I can't imagine why the camera/lens interface can't communicate the lens definition. The ~/.exiv2 feature was added because manufacturers use the same lensID for different lenses. Additionally, the "compatible" lens manufacturers (eg Tamron and Sigma) frequently overload the same lensID. Some lensIDs are used by up to 20 different lenses. This is a support headache for me and is one (of several reasons) to add this feature.

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

I'm in Spain, but you were close to guess the country.

Just now I'm talking with DT/DK developers, and ask me about lensfun version, but I told them I updated the database with "lensfun-update-data", cause "lensfun" in my system in not an "installable" package, it must be libraries included in DT/DK installation.

If I receive any info about Panasonic, I'll tell you about it, for sure. It's crazy the way they name equally distinct lens. I can't imagine how private software solves this problem, cause it will confuse even the user. I understand perfectly why you added that feature.

RE: Incorrect lens name - Added by Rafael Linux User almost 4 years ago

I have news, and I think you would like to know a curious thing about the solution.

Maik Qualmann suggested me in Digikam bugs forum, to copy the files from the directory "$HOME/.local/share/lensfun/updates/version_1/" one directory higher. Then, DigiKam and even DarkTable not only detect my GX8, but they show the exact model on the lens mounted. That's, while exiv2 continue showing that the lens is "Lumix G Vario 35-100/F2.8", somehow, DK and DT are showing the exact model, "Lumix G X Vario 35-100/F2.8 Power OIS". You can see what I say in attached image.

So now I don't understand which is the relation between DK/DT and lensfun/exiv2 ...

P.D.: Happy new year!!!!!

RE: Incorrect lens name - Added by Robin Mills almost 4 years ago

Well this is a pleasant surprise. Maybe 2018 will be a magic year in which every issue reported with disappear without effort. Seems unlikely.

Happy New Year.

    (1-15/15)