> Thomas, the new code doesn't work for me. Hugin crashes as soon as I
> open a project or try to load an image. Console output tells me that:
>
> terminate called after throwing an instance of
> 'Exiv2::BasicError<char>'
>   what():  Ungültiger Feldname oder IFD-ID `LensModel', IFD-ID 5
> Abgebrochen
>
> This is correct. There is no such tag. In SrcPanoImage.cpp I found (in
> line 375):

That's only partially correct. Your exiv2 is too old. It is defined in
current version 0.22.
I committed a patch for exiv2 versions prior to 0.22

> the tag which should be read, in my case, is Exif.Canon.LensModel, and
> when I modify the code to
>
> if(getExiv2Value(exifData,"Exif.Canon.LensModel",lensName))
> ...
>
> it works fine for me and the lens name I've patched into the EXIF data
> shows correctly. But that is me, using a Canon Camera. Nevertheless, I
> suppose that the important bit is that "Exif.Canon.LensModel" a valid
> tag identifier string recognized by exiv2, and if the image isn't done
> with a Canon camera, I suppose it'll just not find any value for it.
> Maybe there are analogous tags in the maker-specific parts for other
> manufacturers? Omitting the prefixes, i.e. only look for "LensModel"
> instead of the fully qualified string, doesn't work (crashes as well).

Have you read my mail? And have you understood it?
The handling of the different makernote variants should be handled by
exiv2 and not by Hugin.
So Hugin is now using the general tag Lens Model (tag id 0xa434) - in
the general Exif header, available only with Exif 2.3 (Exif 2.2 is
missing this tag, if you don't trust, read the spec. Software which is
2.3 aware can read this tag, even if the exif version in the file
states a version prior to 2.3 (e.g. 2.21 in your case) - but there
could be programs, which check the exifversion in the file and read
only the tags which are available in this version -> so my comment
about updating also the exif version tag.).
This approach can be used for images of all manufacturers in the same
tag/tag id.

The tag Lens Model (tag id 0x0095, or Exif.Canon.LensModel) is
specific to Canon cameras and would only be necessary for manual
lenses (the other lenses are automatically identified by exiv2 by the
numeric tag Exif.CanonCs.LensType). Using Exif.Canon.LensModel would
be too specific. And it would require further patches for cameras of
other manufacturers.

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to