Version: 0.10.0-rc1 (using KDE 4.2.0) OS: Linux Installed from: Slackware Packages When I open the picture in showfoto and try to fix the lens distortion showfoto didnt select the correct lens.. "always" show "Nikon 24-85mm" didnt fill the Lens model correctl the option "Use Metadata" is ON.
And what lens should be displayed? For me it is working fine (Nikon D50 and Panasonic DMC-FZ3).
In my case should display Nikon 17-55 lens.. and always show 24-85mm, the machine model no problem..
Can you attach an example image? If you don't want to provide it here, you can sent it to me by mail. Andi
Right now I can't tell if it is a bug in digiKam or lensfun, but it doesn't work for my Nikkor 18-55mm, 1:3,5-5.6G ED AF S-DX, too. If you take a look at the image properties tab, you see a strange lens name: 48 50 48 49 118 202 103 220 10 206 242 106 190 40 168 204 136 249 18 222 49 194 47 38 240 43 86 109 114 111 86 I don't think this is correct :-) Need to do further investigations. Andi
Nikon lens name is extracted to makernote using Exiv2. Nikon is know to encrypt informations (:=(((. I remember a topic about in Exiv2 bugzilla. I don't know if it's solved now. Gilles
Right, mostly all Nikon lens seem to fail, but there are fixes for 0.18.1. I will check the SVN version and see if it is working in there.
Created attachment 31476 [details] lens data I compiled latest trunk and at least your lens is detected by the command line tool, see the attachment. Mine is still not recognized :-( But digiKam / showFoto still displays the strange number code in the Photograph Information tab. Why? I recompiled libkexiv2 etc and digiKam, but it is not read properly... I know digikam uses db for this data, too, but I tested also with showFoto and no lens data is available. Gilles, any idea?
Sound like something is missing in libkexiv2 to decode these informations. Andreas, There is something special in Exiv2 command line tool to decode Nikon Lens info ? Gilles
Gilles, No, the command line tool doesn't do anything special, this is done in the library. But what about this: http://uk.groups.yahoo.com/group/exiv2/message/1408 Decrypting only works if digiKam/libkexiv2 use the new method to call the pretty-print function.
Andi, I've updated the Nikon lens list to the latest version (this database is a separate project maintained by Robert Rottmerhusen). Can you svn update and try again? If your lens is still not recognized, please send me an image together with the exact lens name (see the list near the end of nikonmn.cpp file for details/comparison). Andreas
Andreas, somehow it seems to work now and then, I'm using the SVN built from 4 days ago. Error: Directory NikonPreview with 8224 entries considered invalid; not read. Exif.Nikon3.LensType Byte 1 D G Exif.Nikon3.Lens Rational 4 18-55mm F3.5-5.6 Exif.Nikon3.LensFStops Undefined 4 5.33333 Exif.Nikon3.LensData Undefined 31 Nikon AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED The first error message is weird... but at least the lens is detected. Sometimes it happens that it only reads those numbers again. I will compile latest trunk later on, right now I'm too busy. Still in digiKam it is not working, but that seems to be our fault then. Andi
Andi, Andreas, Code relevant to Lens detection is here : http://lxr.kde.org/source/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp#558 Gilles
Ok. I suggest this fix in KExiv2::getExifTagString (kexiv2exif.cpp, line 679): Just replace 684 Exiv2::ExifData exifData(d->exifMetadata); ... 688 std::ostringstream os; 689 os << *it; 690 QString tagValue = QString::fromLocal8Bit(os.str().c_str()); with 684 const Exiv2::ExifData& exifData(d->exifMetadata); ... 688 std::string val = it->print(&exifData); 689 QString tagValue = QString::fromLocal8Bit(val.str().c_str()); or is there a particular reason why the Exif metadata container must be copied in line 684? Andreas
Andreas >or is there a particular reason why the Exif metadata container must be copied >in line 684? With older Exiv2 (< 0.14), yes to prevent crash with mutithreading. With recent Exiv2, it work fine. Gilles
Andreas, QString tagValue = QString::fromLocal8Bit(val.str().c_str()); must be : QString tagValue = QString::fromLocal8Bit(val.c_str()); ... else it doesn't compile : [ 11%] Building CXX object libs/libkexiv2/libkexiv2/CMakeFiles/kexiv2.dir/kexiv2exif.o /home/gilles/Documents/devel/SVN/trunk/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2exif.cpp: In member function ‘QString KExiv2Iface::KExiv2::getExifTagString(const char*, bool) const’: /home/gilles/Documents/devel/SVN/trunk/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2exif.cpp:690: error: ‘struct std::string’ has no member named ‘str’ Gilles
SVN commit 929807 by cgilles: patch exiv2 with Andreas tip. Need to be tested. CCBUGS: 184156 M +5 -5 kexiv2exif.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=929807
Andi, libkexiv2 from trunk is patched. can you try again ? Gilles
Andreas, it->print() function exists since which Exiv2 version ? Gilles
Gilles, it is working in showFoto, but not in digiKam. I guess the lens value is saved in the database. Lensfun still selects the wrong lens, but I guess they have their own database.
Created attachment 31536 [details] lens display in showFoto
>lens display in showFoto ok. this is want mean that patch work fine. >it is working in showFoto, but not in digiKam. I guess the lens value is saved >in the database. yes it's stored in DB. you must sync again DB with photo metadata >Lensfun still selects the wrong lens, but I guess they have their own database. yes, if lensfun do not have an entry relevant of your lens, nothing special will be done. At least a message in plugin must be displayed if lens is not found... Gilles
> it->print() function exists since which Exiv2 version ? std::string print(const ExifData* pMetadata =0) const; in class Exiv2::Metadatum exists since 0.18-pre2. Before that it was print() without any argument. Andreas
*** Bug 169214 has been marked as a duplicate of this bug. ***
Created attachment 31993 [details] lensfun -> showfoto: different lens names? I don't know if this is an issue, but I compared a lot of images now (taken with different cameras of course) and lensfun always displays another lens name then showfoto / exiv2. Because of this everytime the first item in the camera lens combobox of lensfun plugin is selected, although the lens name is listed in the combobox. In this screenshot you can see that the first lens in the list was chosen, but the actual lens is listed in the combobox, too. There seem to be significant differences in the names from lensfun and exiv2, this is why the lenses are never selected correctly. I can remember that my lens was displayed as "Nikkor 18-55mm Lens...." in showfoto some weeks ago, but not it only reads "18-55mm F3.5-5.6", so maybe this is the reason lensfun auto detection is not working at all. Did exiv2 change the name resolution in some way? Andi
> I can remember that my lens was displayed as "Nikkor 18-55mm Lens...." in > showfoto some weeks ago, but not it only reads "18-55mm F3.5-5.6", so maybe > this is the reason lensfun auto detection is not working at all. > > Did exiv2 change the name resolution in some way? No it should still be the same, although I've updated the Nikon lens list recently - http://dev.exiv2.org/repositories/revision/exiv2/1751 Is there a difference between showfoto+exiv2-SVN and exiv2-SVN output? Or between exiv2-SVN and exiv2-0.18? Andreas
I can't see any differences. But maybe lensfun is expecting the LensData field? Exif.Nikon3.LensType Byte 1 D G Exif.Nikon3.Lens Rational 4 18-55mm F3.5-5.6 Exif.Nikon3.LensFStops Undefined 4 5.33333 Exif.Nikon3.LensData Undefined 31 Nikon AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED This looks more like the string in lensfun then the Lens value we seem to use.
Andi, Whats news there ? It's Exiv2 or lensfun issue ? Solved with last version ? Gilles Caulier
Hmm don't know what's wrong here, but I can still reproduce it.
I added some additional lensfun search in rev1111465. Andi, others: can you please try it again? The one of my nikon lenses that is in lensfun db is found and selected. Jens
SVN commit 1114931 by jmueller: do lensfun search not only for lenses, do it also for make and model CCBUGS: 184156 M +26 -2 lensfuncameraselector.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1114931
Jens, I work hard to improve metadata parsing and detect better lens type to pass on LensFun. I fully rewritten the code about in trunk. Please take a look The goal of this work is to provide a new BQM tool to fix lens distorsion... The tool must be able to apply correction automatically... Note : in digikam/libs/dimg/filters/lens, there is a new small command line test program to parse an image and detect lens type. All is printed to the console. The program is to hack parsing metadata code from digiKam lensfuniface... Gilles Caulier
For BQM lensfun tool, take a look there : https://bugs.kde.org/show_bug.cgi?id=216353 Gilles Caulier
Jens, The new code to parse metadata is not in lensfun widget anymore. I migrarted it to lensfun iface, to make a BQM tool more easily. Look this method : http://lxr.kde.org/source/extragear/graphics/digikam/libs/dimg/filters/lens/lensfuniface.cpp#103 Please, test, hack, and report. I need help there. Thanks in advance Gilles Caulier
With a fresh svn checkout, the automatic lens distortion correction crashes as soon as I select it from the menu. In the console I read digikam(19485)/digikam (core) Digikam::EditorToolThreaded::slotEffect: Preview "Linsenautokorrektur" started... digikam: symbol lookup error: /usr/lib/kde4/digikamimageplugin_enhance.so: undefined symbol: _ZN7Digikam12LensFunIface17setFilterSettingsERKNS_16LensFunContainerE
Make clean all, and recompile/install whole digiKam. Gilles Caulier
SVN commit 1180943 by cgilles: deal with Canon Lens and LensType tags when Lensfun search lens description from metadata If Exiv2 cannot decrypt lens data, it will return a number, not a string. CCBUGS: 184156 M +2 -1 dmetadata.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1180943
The lenscorrection has improved a lot already, thank you! My favourite camera/lens combination is now correctly detected. However, many lenses are still not detected corrected automatically, although they are available in the list. Correctly detected: Camera: Canon EOS 7D Lenses: Canon EF-S 17-55mm f/2.8 IS USM Not correctly detected: Camera: Canon EOS Kiss Digital X (=400D) Lenses: Canon EF-S 18-55mm f/3.5-4.5 USM Canon EF 100mm f/2.8 Macro Sigma 10-20mm f/4-5.6 Sigma 30mm f/1.4 DC HSM Canon 70-300 mm f/4-5.6 IS USM
Gandalf, For all lens not detected, i need sample images to test. Please send me files by mail. Thanks in advance Gilles Caulier
(In reply to comment #38) > Gandalf, > > For all lens not detected, i need sample images to test. Please send me files > by mail. Ok, I send you some images. Gandalf > > Thanks in advance > > Gilles Caulier
SVN commit 1184220 by cgilles: wrap around Canon 400D camera to query lensfun DB properly. CCBUGS: 184156 M +14 -4 lensfuniface.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1184220
What's news in this file ? Can someone update sate of this entry using current code from svn (not 1.6.0). in trunk i sync lensfun code again with new profiled camera lens. Anyway, i think it can be closed now. Future work will be done in lensfun library as well, not in digiKam & co Gilles Caulier
Regarding comment #37, Canon EOS Kiss Digital X (=400D) Canon EF-S 18-55mm f/3.5-4.5 USM Sigma 10-20mm f/4-5.6 Sigma 30mm f/1.4 DC HSM now seem to be correctly detected. What's not working for me yet are the lenses Canon EF 100mm f/2.8 Macro Canon 70-300 mm f/4-5.6 IS USM The 70-300mm is not in the list, but the 100mm is, but still the lenscorrection tool likes to pick some wide angle canon lens instead. Gandalf
Williams, This file still valid using digiKam 2.4 ? Gilles Caulier
Following comment #42, and my personal tests, I cannot reproduce the problem with current implementation from git/master (next 3.0.0). If lens identification still missing, please report to Exiv2 project to patch maker lens database relevant. If lens profile still missing, please report to LensFun project to patch database relevant. Gilles Caulier