On 16 Okt., 15:12, "T. Modes" <[email protected]> wrote: > Hi all, > > I added code to display the lens in the GUI. It is using the > information stored in the EXIF section to identify the lens (via the > exiv2 lib). With this information it would be possible to > automatically set the correct projection when adding images to Hugin. > But to implement this I need more information. > > I need the lens type/name (as reported by hugin or exiv2) and the > projection you are using for this lens.
Thomas, I'm manually patching the name of my Samyang fisheye into the EXIF data, since it's a manual lens and the body knows nothing of it. When I do that, I can set the Lens Model by assigning -LensModel="Walimex Pro Fisheye 8mm" but I cannot find a way of setting the Lens Type. I have the suspicion that the Lens type is an integral number pertaining only to Canon Lenses, and whatever string I pass it comes out 0. In exiv2 I get IMG_3928.tif Exif.CanonCs.LensType Short 1 (0) IMG_3928.tif Exif.CanonCs.Lens Short 3 9.0 mm IMG_3928.tif Exif.Canon.LensModel Ascii 24 Walimex Pro Fisheye 8mm when I do what you propose: > The lens name can be read inside Hugin (images tab) or you are using > exiv2 (run "exiv2 -pt image.jpg | grep Lens" and search for lens name > in the output, depending on the maker a different tag is shown). Which tag does your code look up? In the hugin images tab, I get Lens (0), as if the code was looking at the Lens Type tag. > PS: If the lens is not recognized by exiv2 (and therefore by hugin), > this will not work. In this case it needs to be fixed in exiv2 or the > lens information is not stored inside the EXIF header, e.g. for some > manual lenses. This can't be fixed by Hugin. This is why I patch the lens info with exiftool. I am using this command: exiftool -FNumber=8.0 -ApertureValue=8.0 -FocalLength="9.35 mm" - LensModel="Walimex Pro Fisheye 8mm" -ShortFocal="9.35 mm" - LongFocal="9.35 mm" -Lens="9.35 mm" -FocusDistanceLower="0.45 mm" - FocusDistanceUpper="inf" -FocalLengthIn35mmFormat="14.96 mm" <myimage.CR2> maybe looking at the Lens Type tag is wrong, and the Lens Model tag, which actually contains a string, so you can search against it in a database, is better? Or is this only so with Canon bodies? And, while I'm at it, I never got an echo on my proposals to autoload lens.ini files based on the Lens Model EXIF tag. Maybe you didn't look at my postings concerning the matter, they're in this thread just a few up from here. Kay -- 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
