Main Menu

GUI 3.41 and new Lens tags

Started by arthurb, August 26, 2010, 07:09:08 PM

Previous topic - Next topic

arthurb

Bogdan,
          thank you for the new release (and for all of the continuing development), and in particular for the edit boxes for the new Lens Make and Model tags, it was just what I needed.

Are these tags new additions to the Exif standards, and if so are they generally supported?

Thanks again for an excellent addition to Phil's incredible achievement with ET.

Kronk

#1
Hi ,

(sorry arthurb... not so sure if I should be replying or start a new thread)  ..anyway I'm replying as I though my query comes under the same heading

It's about those LensInfo, LensMake, LensModel fields.  The fields for me are all shown w/ " - "
I have a Nikon D700 (and D40) and using "PhotoME 0.79R17" or the "PhotoME 0.8 beta 2" the Lens fields are in the Manufacturer notes.  In 'exiftool' there is a 'Nikon.pm' file where it shows a set of HEX numbers 93 48 37 5C 24 24 95 06 for my Nikon AF-S Nikkor 24-70mm f/2.8g ED lens (as shown on the Lens Box) ..the input from the Nikon.pm shows AF-S Zoom-Nikkor 24-70mm f/2.8G ED.

Soo... I was going to input for:
   LensInfo   - [93 48 37 5C 24 24 95 06] ..too long only 4
   LensMake  - Nikon
   LensModel -  AF-S Zoom-Nikkor 24-70mm f/2.8G ED  ..use Nikon.pm's entry rather than info on the Box

What am I supposed to enter in the LensInfo field?  LensMake & LensModel took/were inserted OK
Comparing it now w/PhotoME those fields are now showing up in whats labeled as 'CAMERA'
??? | Nikon                                           | A433  |TagName Empty | ASCII(6)
??? |  AF-S Zoom-Nikkor 24-70 f/2.8G ED  | A434  | "             "       | ASCII(35)


Oops, thre question marks got me a HappyFace Thingy  that was supposed to be what is listed in the fieldname's name

BogdanH

#2
Hi,

for arthurb:
Yes, these new Lens related tags are standardized by Exif v2.3 published in 2010. I don't know if they are supported by most other software right now, but they should be in near future. The question is, to what degree they will be supported. In short:
-I don't believe camera makers will start to use/populate these tags when taking photos (see https://exiftool.org/forum/index.php/topic,2789.0.html).
-serious (photo related) software should be able to recognize/show them, but it's hard to predict how much they will make use of them (allowing edit or search/sort photos by these tag values, etc.).

for Kronk:
Tags having/showing value "-" inside GUI's edit box means, that tag doesn't exist (isn't defined) inside file.
You should distinguish between Lens data written directly in Exif area (which is new since 2010) and data written into MakerNote section (which is done by camera maker). For example: both, Nikon and Canon are writting lens data into MakerNote, but even they describe (almost) the same things, data structure is totally different. And very important: data inside MakerNote was never published/standardized and shouldn't be modified by user.
Exif is another story: there's officially specified how and where data must be stored, thus, there's no risk of damage and if these new tags exist inside file, everyone know where to find and how to read them.
In GUI's Exif edit box, when you move mouse over particular (lens) field, there's short example on very bottom (status bar) how's data supposed be entered. Some examples for Exif LensInfo:

24 70 2.8 2.8  -for 24-70mm f/2.8 lens
18 55 3.5 5.6  -for 18-55mm f/3.4-5.6 lens
50 50 1.8 1.8  -for 50mm f/1.8 (prime) lens

-as you can see, values entered allready describe particular lens (which has nothing to do with Nikon's values written inside MakerNote).

I haven't tried to copy Lens data from MakerNote to Exif section, by using Exiftool directly -this would be very usable in cases when user wish to delete complete MakerNote section, but wish to keep lens data.
I hope this was of some help.

Added: About copying lens data from MakerNote to Exif

I've tried on some CR2, NEF and PEF raw files and it can be done by using Exiftool direct button in GUI (or by using Exiftool pure, of course). What you need to type into Command field is:
-Exif:LensModel<LensID
-and press Execute.
As you can see, info is taken from "composite" LensID tag and written into Exif:LensModel. Canon owners could use:
-Exif:LensModel<Canon:LensModel
-to achieve similar result. This time data is taken directly from Makenote section, but such command might not work for other cameras (i.e. Nikon doesn't have LensModel tag).

Then there's Exif:LensInfo tag. I find this tag quite usefull, because it makes possible to find/sort files according to lens focal range and/or aperture specification.
But as it seems, only Nikon makes possible to populate LensInfo tag directly/automatically. Thus, for Nikon image files, you can use following command:
-Exif:LensInfo<Nikon:Lens
-which reads data from Makernote section and write into Exif. This command can't be used on Canon files, because Canon:Lens tag doesn't exist. In Canon files, only Focal range data exist, but not max apertures range. Still, we (Canon owners) can solve the problem partially, by using command:
-n "-Exif:LensInfo<$Canon:ShortFocal $Canon:LongFocal 0 0"
-this will obviously automatically populate only focal range data. Of course, instead of "0 0" you can write actual aperture data... but then, you can enter manually all data as well. Anyway, by writting "0 0" for aperture values, Exiftool displays "ugly" f/0.0 after focal range data.

Bogdan

Kronk

Just a word of thanks, THANKS

> 24 70 2.8 2.8  -for 24-70mm f/2.8 lens
> 18 55 3.5 5.6  -for 18-55mm f/3.4-5.6 lens
> 50 50 1.8 1.8  -for 50mm f/1.8 (prime) lens
>
> -as you can see, values entered allready describe particular lens (which has nothing to do with Nikon's values written inside MakerNote

I saw the status-tooltip line & completely missed the fact there were Decimal points in there for the Aperture values.  I'd been just looking at the values from Exiftool's "Nikon.pm" ...thought the entry was supposed to be the same..  D'oh.

> Added: About copying lens data from MakerNote to Exif

Thanks for this as well.  I'm not all that familar with the various syntaxes of exiftool.  This should help.
Kronk

Phil Harvey

Quote from: BogdanH on August 27, 2010, 04:21:02 AM
But as it seems, only Nikon makes possible to populate LensInfo tag directly/automatically. Thus, for Nikon image files, you can use following command:
-Exif:LensInfo<Nikon:Lens
-which reads data from Makernote section and write into Exif. This command can't be used on Canon files, because Canon:Lens tag doesn't exist.

This will work for a wide range of DSLR makes (including Canon):

exiftool "-exif:lensinfo<lensid" ...

The LensInfo tag will accept a full lens model name (and the LensID tag is designed to provide just that for all makes).  The inverse conversion logic for EXIF:LensInfo is smart enough to extract the focal range and aperture range from the model name.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Bruce

This is exactly the reason I want to use ExifTool. I have a Leica M8 and use some lenses without 6 bit coding. Do I have to add the information image by image (that will be a task!) or is there a way to select all the photos taken with, say, my Canon 35 mm f2 lens and modify the Exif data for the whole bunch at one time?

BogdanH

Hi Bruce,

No, you can insert lens data in batch, that is: for all files you select (in GUI) or specify (when using Exiftool directly). Anyway, it is of benefit if you know which photos have been taken with "unknown" lens -meaning: you can select them without thinking further.
If you have mixed image files (some have been taken with "known" lens and some with "unknown"), then you shoud probably use some if statement, so only images with "unknown" lens will be affected. I can't give you example, because I don't know about Leica image files.
I'm sure, in this regard, Phil can help you better than I can.

Bogdan

Phil Harvey

#7
Unfortunately you can't set the Leica:LensType tag for your Canon since it doesn't have a corresponding code number for this tag.  Instead, a good alternative would be to set the EXIF:LensModel tag.  You can do this for all unknown lenses with a command like this:

exiftool -lensmodel="Canon EF 35mm f/2" -if "$lensType=~/Unknown/" DIR

Where DIR is something like c:\path\to\my\pictures, depending on where your pictures are located.

- Phil

Edit:  I just noticed that Composite:LensID still shows the Unknown LensType instead of picking up on the LensModel if it is defined.  I will improve this in version 8.36 so LensID will show the LensModel in this case.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).