Sigma lens not recognised by exiv2
Added by Terence Duell over 8 years ago
Hello All,
I am using a Sigma lens which is recognised by exiftool, but not by exiv2.
I access lensfun from Hugin, and Hugin uses exiv2, so my lens isn't known.
Is there a way to get exiv2 to recognise my lens?
Here is some data...
[terry@localhost Gelli5]$ exiv2 -pt IMGP0267.JPG | grep -i lens
Exif.PentaxDng.LensType Byte 4 Unknown (0x081b)
Exif.PentaxDng.LensInfo Undefined 80 0 184 144 114 0 27 1 164 0 0 0 0 0 0 0 0 40 86 43 106 64 0 9 109 85 154 113 24 1 74 108 251 255 255 255 255 41 64 0 9 0 136 8 97 0 0 0 0 191 254 27 240 0 0 144 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[terry@localhost Gelli5]$ exiftool IMGP0267.JPG | grep -i lens
Lens Type : Sigma 18-200mm F3.5-6.3 II DC HSM
Lens F Stops : 8.5
Lens ID : Sigma 18-200mm F3.5-6.3 II DC HSM
Cheers,
Terry
Replies (32)
RE: Sigma lens not recognised by exiv2 - Added by Abhinav Badola over 8 years ago
Terence Duell wrote:
Hello All,
I am using a Sigma lens which is recognised by exiftool, but not by exiv2.
I access lensfun from Hugin, and Hugin uses exiv2, so my lens isn't known.
Is there a way to get exiv2 to recognise my lens?
Hi Terence,
I will see to it and patch Exiv2 with the required Lens info soon.
I hope you use Exiv2 via trunk.
If you are in the middle of testing something and want immediate response from Exiv2 executable, then you can follow the following steps.
[1]
Download exiv2 source code from -
http://www.exiv2.org/download.html
[2]
Then in the source file -
trunk/src/pentaxmn.cpp
add the following line at line number 885
{ 0x081b, "Sigma 18-200mm F3.5-6.3 II DC HSM" },
[3]
Compile and install.
I hope this will helps.
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Sorry for the late response. I did reply earlier but it doesn't seem to have made it to the forum.
Unfortunately I use the Exiv2 package from the Fedora repository.
I was hoping that you used a data files for this, which would obviate the need to rebuild.
Looks like I have to wait on an update eventually appearing in the Fedora repo.
Thanks for your help.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Niels Kristian Bech Jensen over 8 years ago
This lens is supported in the trunk already.
Regards,
Niels Kristian
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Terry
The suggestion to have a datafile to hold updates to the maker notes has been suggested - and it's a good idea. We wouldn't change our primary architecture of having this "baked into the library", however it's a good idea to have a file such as exiv2.ini with additions.
However, as you know, there are many more good ideas than we have time to pursue. If you, or any of your friends, would like to join the team and develop this, you will be most welcome. The wages aren't very good, but the rewards are great.
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
It isn't supported by exiv2-0.23-3.fc18.x86_64.
This is the version I have installed and used with my builds of Hugin, and the lens isn't recognised, as demonstrated in my original post.
Are you sure it wasn't added subsequent to my post?
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
The wages aren't very good on any of the open source projects :-)
My skills in making suggestions are much more highly developed that any skills I have in software development, particularly with the modern languages.
I currently do quite a bit of testing for Hugin, by building a Fedora package of the trunk and then testing the how it all works.
I'm not sure how much use it would be to you if I were to do Fedora test builds of the trunk, but that is a possibility.
I'll have a try at doing that and see how I go, it might be a way of checking out the support for my lens.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Have a look at the code. I didn't write it so I can say it is well structured, clear and beautiful without blushing. Andreas and others have done a very good job.
Building and running the test suite on Linux is quick and easy. Tuan, a clever young guy in Singapore, wants to join us through Google Summer of Code and set up an Ubunu server last weekend on AWS. So we're hoping to automate that shortly. Building on Windows is'nt difficult, however it's very time consuming.
So have a look at the code and let me know your thoughts. I'm happy to help you for the usual fee!
If you are interested, please see the project spec for GSoC. We're working on something cooool.
http://dev.exiv2.org/projects/exiv2/wiki/GSoC_2013_%22Cloud_Ready%22_Project_Specification
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
OK, I've got the trunk from the svn repo.
Using cmake, the makefile doesn't provide the option for "make package_source"...which would normally make a tgz or bz2 archive.
I need an archive for a Fedora rpmbuild.
Is there another way of doing this? Does a download get the current trunk, or just give you the latest release version?
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Hello Robin,
Our posts just crossed.
Not much point in me looking at the code. I should have been more straightforward...most modern languages (such as cpp) are Greek to me :-)
I'll stick to test builds for Fedora, but I have to get an archive of the current trunk first.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
No problem. Don't worry about the code. I've just exported and zipped up the trunk (r3020) and put it at:
http://clanmills.com/files/terry.zip (11mb - mostly test files)
You should be able to build with cmake or the autotools:
1) CMake
$ cd terry
$ cmake .
$ make
$ make tests
$ sudo make install
2) autotools
$ make config
$ ./configure
$ make
$ sudo make install
$ make samples
$ make tests
There are longer notes on the wiki at: http://dev.exiv2.org/projects/exiv2/wiki/How_do_I_build_Exiv2_on_the_XYZ_platform
If you're stuck, puzzled or (gosh, there couldn't be anything wrong on our wiki) you find an error in the docs - please come back and let me help you.
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Hello Robin,
I have the archive terry.zip, thanks.
You may have misunderstood what I have been saying.
I am going to try to build the current trunk within the Fedora rpmbuild environment, which will require an archive of the current trunk.
On this occasion I may be able to make that work with the archive terry.zip, but the usual approach to this would be for me to get the current trunk whenever there has been an change (update my local repo), then do
cd build
cmake ..
make package_source
then move the exiv2xxx.bz2 to my rpmbuild environment, update my .spec file and do an rpmbuild.
I have no use for any builds that do not produce a Fedora package, and hence cannot be installed/unistalled/ etc by the package manager.
I'll see how I go.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Ah. I'm not too sure what an rpmbuild is. You can checkout the trunk with svn - and update/build to your heart's content.
Our young friend Nehal in Hyderabad uses Fedora 17. I'll ask him to join this thread if he's familiar with rpmbuilds
$ svn checkout svn://dev.exiv2.org/svn/trunk
see http://exiv2.org/download.html and the "How To Build ... XYX platform"
There are lots of nice SVN client's available if you don't like the command line. Mind you if you know how to build, I'm sure you good in Konsole/Terminal/Xterm or whatever. Just thought of a good name for a product "X term inator"
Last shameless plug for our "hot project of 2013". Have a little look. You'll be impressed:
http://dev.exiv2.org/projects/exiv2/wiki/GSoC_2013_%22Cloud_Ready%22_Project_Specification
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
The current build system doesn't support a "make package_source", which is the vital missing bit.
I know all else about rpmbuild...I just need the exiv2 cmake (probably Makefile.in, not sure) to ensure the appropriate stuff is put in the Makefile, and I don't know how to make the required changes to do that.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Terry
I suspect you're on the West Coast like me. I'm in San Jose, CA. Let's call it a night. Nehal answered a private email and said "I'll see what I can do.". So let's sleep on this and re-engage this tomorrow. If Nehal can't unpuzzle this, I'll try to help you when I get home from work.
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
OK.
(completely different TZ...Melbourne Aus.)
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Ah. As a student, I was an intern in Melbourne and have friends in Geelong.
So it's morning for you and afternoon in Hyderabad. For sure it's bed-time for me (23:04).
Good Luck. Speak later.
Robin
RE: Sigma lens not recognised by exiv2 - Added by Nehal J Wani over 8 years ago
Hi Terry!
From what I have understood from your earlier posts, I believe that you want the archive of the latest source code and then give it to the rpmbuild environment.
You don't have to always update your local repo, build a source tarball and give it to rpmbuild, because the required archived source is already available on the exiv2.org site. The most current (23/04/13) working version is available here: [[http://www.exiv2.org/exiv2-0.23.tar.gz]]. It is updated regularly. For all the previous versions, visit [[http://www.exiv2.org/archive.html]] Now you can give this archive to the rpmbuild environment.
RE: Sigma lens not recognised by exiv2 - Added by Nehal J Wani over 8 years ago
Terry, I have attached the exiv2.spec file that was used to build exiv2-0.22-6.fc17.x86_64.
Now, to build the rpms, I changed two values in the spec file.
(i) Line 9: "Version: 0.22" -> "Version: 0.23"
(ii) Line 104: "%{_libdir}/libexiv2.so.11*" -> "%{_libdir}/libexiv2.so.12*"
Then issued the following commands:
$ mkdir test ; cd test $ rpmdev-setuptree $ cp ~/exiv2_old.spec ./rpmbuild/SPECS/exiv2.spec $ cd ./rpmbuild/SPECS/ $ rpmlint exiv2.spec $ rpmbuild -ba exiv2.spec $ cd ../ $ ls ../RPMS/x86_64/ exiv2-0.23-6.fc17.x86_64.rpm exiv2-debuginfo-0.23-6.fc17.x86_64.rpm exiv2-devel-0.23-6.fc17.x86_64.rpm exiv2-libs-0.23-6.fc17.x86_64.rpm $ ls ../SRPMS/ exiv2-0.23-6.fc17.src.rpm $ #Successful!
exiv2_old.spec (5.45 KB) exiv2_old.spec |
RE: Sigma lens not recognised by exiv2 - Added by Nehal J Wani over 8 years ago
Pardon me, I forgot add these (before rpmbuild):
$ cd ~/rpmbuild/SOURCES/ $ wget http://www.exiv2.org/exiv2-0.23.tar.gz ; cd ../SPECS
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Hello Nehal,
Thanks for the info, that has answered my previous question re the status of the download source. Often the download is the latest release version, not the current trunk, but in this case it seems it is the trunk. Hence I will use the download source tarball to build my Fedora rpm.
Updating your local repo and building a source tarball from that has the advantage that there is no confusion about the identity (version/release) of the source, which should be reflected in the rpm name to ensure updates are handled correctly by the package manager. An alternate is to build the download date into the release number, as we do with snapshots of the Hugin default trunk, as follows...
Version: 2013.1.0
Release: 0.1.20130421hg%{?dist}
I already have the .spec file and everything else I need, thanks
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Hello Nehal,
I got the working version you suggested [[http://www.exiv2.org/exiv2-0.23.tar.gz]]., and built a Fedora rpm OK, but that source isn't up-to-date.
It doesn't have the updated Pentax Sigma lens data.
Unless the download source is Really up to date (ie always built after every source change) then grabbing the download isn't a viable solution for building up-to-date binary packages.
I'll revert to attempting a build using the source code tarball that Robin provided.
I still think that the best long term solution is a change to the Makefile, which provides a "make package_source" option, which allows a tarball to be built from a local (updated) svn.
Unfortunately I really don't know enough about this business to make the necessary changes, which would probably be to config/Makefile.in and/or config/config.mk.in.
I can provide guidance via the Makefile that is generated for the Hugin project, which contains the following...
- Special rule for the target package_source
package_source:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..."
/usr/bin/cpack --config ./CPackSourceConfig.cmake /home/terry/Hugin/trunk/BUILD/CPackSourceConfig.cmake
.PHONY : package_source
but that isn't the whole story, there are some instructions somewhere put all this together out of some rules...but haven't been able to find them, yet!
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
This is all "up the creek" !
The archive Robin sent me (terry.zip) is incomplete (no configure) hence rpmbuild throws an error.
The download source is out of date, i.e. doesn't reflect recent changes. Robin's archive includes a pentaxmn.cpp, which includes the Sigma lens I am interested in, was modified on 13 Apr. The current download doesn't include that update, and the pentaxmn.cpp is dated 23 Mar 2012.
Thanks to all for your help, but I think I'll give it all a miss.
Cheers,
Terry
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
The tar ball is not incomplete. You should do $ make config (as I documented above) to generate the configure script. terry.zip is svn3020. Top of trunk.
rmills@rmills-imac:~/temp/terry $ ls -alt ~/gnu/exiv2/trunk/src/pentaxmn.cpp -rw-r--r-- 1 rmills staff 59596 Apr 19 09:47 /Users/rmills/gnu/exiv2/trunk/src/pentaxmn.cpp rmills@rmills-imac:~/temp/terry $ ls -alt src/pentaxmn.cpp -rw-r--r-- 1 rmills staff 59596 Apr 13 20:34 src/pentaxmn.cpp rmills@rmills-imac:~/temp/terry $ diff src/pentaxmn.cpp ~/gnu/exiv2/trunk/src/pentaxmn.cpp rmills@rmills-imac:~/temp/terry $ wc src/pentaxmn.cpp ~/gnu/exiv2/trunk/src/pentaxmn.cpp 1352 6804 59596 src/pentaxmn.cpp 1352 6804 59596 /Users/rmills/gnu/exiv2/trunk/src/pentaxmn.cpp 2704 13608 119192 total rmills@rmills-imac:~/temp/terry $ md5 src/pentaxmn.cpp ~/gnu/exiv2/trunk/src/pentaxmn.cpp MD5 (src/pentaxmn.cpp) = f60757d7b9f716735a7eb5962fd7114e MD5 (/Users/rmills/gnu/exiv2/trunk/src/pentaxmn.cpp) = f60757d7b9f716735a7eb5962fd7114e rmills@rmills-imac:~/temp/terry $
Robin
RE: Sigma lens not recognised by exiv2 - Added by Robin Mills over 8 years ago
Team (Abhinav, Nehal and Neils)
I've very proud of how you have contributed to this thread. You'll see Terry has thanked us for trying to help him. And we have helped him. It's mid-night in Melbourne and Terry's clearly tired and frustrated. My clock tells me he's been at this for about 20 hours. A "bit of a stint", eh?
Nehal:
I see you're a wizard on Fedora (which I've never used). Is it possible to create a fresh top-of-trunk tar-ball - complete with ./configure. With a little bit of good fortune, Terry will be up in running easily.
Terry:
Can we regroup at the weekend and help you? Perhaps one of us can "talk you down" on Skype with some screen sharing if necessary.
Robin
RE: Sigma lens not recognised by exiv2 - Added by Terence Duell over 8 years ago
Hello Robin,
Robin Mills wrote:
Team (Abhinav, Nehal and Neils)
I've very proud of how you have contributed to this thread. You'll see Terry has thanked us for trying to help him. And we have helped him. It's mid-night in Melbourne and Terry's clearly tired and frustrated. My clock tells me he's been at this for about 20 hours. A "bit of a stint", eh?
I am very appreciative of the help that has been provided.
Nehal:
I see you're a wizard on Fedora (which I've never used). Is it possible to create a fresh top-of-trunk tar-ball - complete with ./configure. With a little bit of good fortune, Terry will be up in running easily.
On this point, as I have said, I think it is important for users to be able to get an up-to-date source tarball, to be able to build binary packages, as you currently do not have any way of incorporating updated/new lens data without a rebuild.
Terry:
Can we regroup at the weekend and help you? Perhaps one of us can "talk you down" on Skype with some screen sharing if necessary.
I have now managed to successfully build Fedora rpms which install and appear to work OK on Fedora 18 x86_64.
I don't use anything other than basic email, so not much point in thinking about Skype. I don't think there is much more that I can, or need to do, at this stage.
You probably know all this...I think that the 'data file' approach would be great step forward. With the current arrangement, users who rely on installing Exiv2 from a distro repository, and I suspect that would be a lot of ordinary Linux users, can't take advantage of data updates until the distro releases an updated binary package, and that usually means someone has to give that process a nudge for it to happen and can take quite a while.
The ability to simply build a source tarball from a local trunk is a step towards simplifying the build of binary packages, which might be made available as 'snapshots'.
I would be happy to build Fedora rpms of snapshots to help the ordinary user, if there were somewhere that they could be hosted. I note that Fedora provide this site <http://repos.fedorapeople.org/repos>, but not quite sure how it all works, and suspect this may be where Fedora engineering get their material for package updates. Other distros probably do similar.
A side issues. I find the forum a bit difficult to work with. Email notifications of postings don't turn up until many hours after the post. Have you considered something like Google groups?
Cheers,
Terry