Main Menu

"Camera settings" view request

Started by Beholder3, May 24, 2011, 02:56:18 PM

Previous topic - Next topic

Beholder3

Hi Bogdan,

do you think you could add the field "Makernotes:LensType" to the "Camera settings" view?

That would make the workflow you propose much more simple (Step 3 depends on the Lens used, but you can't see the Lens in the camera view at the moment, so taht would be a very natural step).

It also is generally quite a helpful information for photographers to know which lens a shot was taken with and this field mentioned is the only one populated about the Lens Type on some cameras (e.g. my Pentax K-5).

Please forgive me posting into this thread if that's not allowed (I didn't see anything here). Feel free to move this post elsewhere where it better fits.

BogdanH

No doubt, having "actual" lens listed in Camera settings view would be better, but..

Speed is crucial for "comfortable" browsing (we don't like waiting till metadata of many files populates). Because of this, metadata you can see in filelist section, isn't parsed (decoded) by ExifTool -it's done directly by GUI. I've learned how to "decode" only most popular Exif tags (ans some Iptc/Xmp tags)... to make quick Exif overview somehow possible.
Now, Makernote section is something really special. Having ExifTool source, it's not that difficult to findout how to "decode" those tags (at least some of them). The problem is, each manufacturer has it's own content of Makernote section (which also changes quite often). And I'm not in position to keep track of all those changes of all those manufacturers. In short: that's one of the reasons why ExifTool is so highly regarded.
I could use ExifTool for Camera settings view, but that really slows down the whole experience in GUI. Must be mentioned: not because ExifTool would be slow -it's because the way how GUI "communicates" with ExifTool. ExifTool allows better/faster execution (which wasn't possible when I started with GUI), but to make use of that, some big changes inside GUI are needed... and a lot of testing... and a lot of time, which I don't have.

Bogdan

Beholder3

Hi Bogdan,

I can see your point about the speed of access and the amount of changes required.

Could you add "exif:LensModel" or "XMP:Lens" to the camera settings view with less impact on speed or work effort required on your side?
I naively assume these are just plain text fields.

Making the workflow so that you first have a full run of exiftool over all files to copy makernotes:LensType to one of these and then checking in exiftoolgui is still better than not seeing it at all IMHO.
That way the complex interpretation of makernotes is not reuiqred in the gui.

BogdanH

Sorry I couldn't reply before (because forum was down)...
In next update, there will be option to see either Exif:LensInfo or Exif:LensModel in filelist.

Bogdan

Phil Harvey

Quote from: BogdanH on May 28, 2011, 11:03:06 AM
Sorry I couldn't reply before (because forum was down)...

Sorry about that.  I think that the forum was actually up, but the link from the exiftool home page was broken.  I have fixed this now.

- 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 ($).

BogdanH

Hi Phil,
I always enter into forum via your main page (so I can check news there first) and because of renovations message there, I didn't think any further. I'm glad to hear it was only broken link  :)

Greetings,
Bogdan

Beholder3

Hi Bogdan,

the Option in GUI to fill out the LensInfo fields based on something in the makernotes - can I reproduce that just using exiftool?

Which command(s) would that be?

I am just curious how that is achieved.  :)

BogdanH

Of course you can. Inside GUI, you select file(s), click on ExifTool direct button and write:
-Exif:LensModel<LensID
..and press enter key. Now, all selected files will be populated with Exif:LensModel info -Phil made that very user friendly  :)

It's very similar without using GUI. In this case you open Command prompt window and write (for example):
exiftool -Exif:LensModel<LensID d:\MyPhotos\*.cr2
..and all cr2 files inside MyPhotos directory will be updated with data.

Curiosity is a good thing  :)
Bogdan

Beholder3

Hi Bogdan,

now I am somewhat confused.  :)

My original question was what the exiftool-command behind the menu option "Modify / Exif:LensInfo from makernotes..." is (maybe I wrote that not precisely enough).

The filed "Exif:LensInfo" to my understanding allways contains only four numbers, two for the focal range and two for the maximum apertures. I don't understand how that connects with your answer about "Lensmodel" and "LensID".  ???
I guess LensID and Lensmodel contain Text infos more than just the four numbers?

Then as you wrote about LensModel I wonder even more. Currently I populate the "Exif:Lensmodel" field by taking the lens name from another field, using the command -exif:LensModel<makernotes:LensType"
Where would be the difference to your method?

Is there anywhere a documentation for the LensID tag? I searched the exiftool application documentation for it and found nothing. I searched the Pentax tag names and only found a reference to it. I searched the exif tag documentation and found nothing. I searched for the field in exiftoolgui itself using the "All" fields button and found no such field.

Questions over questions...  ;)



Phil Harvey

You are correct that EXIF:LensModel is a string and EXIF:LensInfo is 4 numbers, but just change LensModel to LensInfo in the commands Bogdan gave you to write the numbers instead of the string.  ExifTool is smart enough to extract the numbers from the lens model name.

LensID is a Composite tag which derives the lens model name from various other tag values.  Look in the Composite tag name documentation for a list of these tags.

- 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 ($).

BogdanH

There's another thing to consider... with:
-exif:LensModel<LensID
..we get (string) lens description, which comes from ExifTool's internal lenses lookup table, i.e. "Canon EF-S 17-55...". But if we use:
-exif:LensModel<Makernotes:LensModel
..we get original lens description as written by camera, i.e. "EF-S17-55..." (without word "Canon") -at least that's how it is for Canon cameras (other brands may differ). Also keep in mind, that older cameras (350D, 20D,..) didn't write Makernotes:LensModel at all.

Bogdan

Beholder3

Thanks for all the hints.
I use a Pentax K-5 and this model writes the Makernotes:LensModel nicely, so I can use that.

In the combination Pentax K-5 and a Tamron lens I can also add that there the result is exactly the same between using makernotes:LensModel and exif:LensID, both gives "Tamron AF70-300mm F4-5.6 LD Macro" as a result, so both inlcude the maker company name full (seems different than for Canon).

I'll go with exif:LensModel<makernotes:LensModel plus exif:LensInfo<LensID.

I now tried to fill in the field exif:LensMake, but there I got the full string again as input, so that's not exactly what I wanted (I only want the manfacturer name there).
I own three manufacturers lenses (Pentax, Sigma, Tamron) and in all cases the makernotes:LensModel field contains a string with the manufacturers name in it ("PENTAX" or "Tamron" or "Sigma").
I would assume via some perl script in a user defined composite tag (e.g. "LensMakerName") it should be possible to check if one of those three strings is present as part of the makernotes:LensModel and then fill the composite tag with the found one (in my simple terms it would be something like three IF..THEN arguments).

@Phil: Would the above be possible to do? Do you have a idea on what code to put into ".ExifTool_config" to achieve this for three names?  ???





Phil Harvey

The required Composite tag definition could look like this:

    LensMake => {
        Require => 'LensID',
        ValueConv => '$val =~ /(pentax|tamron|sigma)/i ? $1 : undef',
    },


This will return the make if it matches any of the specified strings (case insensitive).

- Phil

P.S.  I own a K-5 too.  Great camera!  I'm at the cottage now and just came in from a walk-about with the K-5 and my newly acquired DA 15mm F4 Ltd.
...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 ($).

Beholder3

Thanks für the help! Now I am mostly set for everything I need.  :)

Quote from: Phil Harvey on June 05, 2011, 05:45:37 PM
P.S.  I own a K-5 too.  Great camera!  I'm at the cottage now and just came in from a walk-about with the K-5 and my newly acquired DA 15mm F4 Ltd.

Off Topic:
Absolutely. I rely on a Sigma 8-16mm for nature / panoramic pictures. 15-16mm is really great and the limiteds are special (I need to save the funds first...  ;) )
If you ever need it: I once created a simple spreadsheet showing all (at least I think so) current lenses for the K-5 and links to online reviews. I can send it, if you want that.

Phil Harvey

Quote from: Beholder3 on June 06, 2011, 02:13:20 PM
I rely on a Sigma 8-16mm for nature / panoramic pictures.

That would be a fun lens.  The widest I can go is 10mm with my Sigma 10-20mm.

QuoteI once created a simple spreadsheet showing all (at least I think so) current lenses for the K-5 and links to online reviews. I can send it, if you want that.

Thanks!  If you can email it to me (philharvey66 at gmail.com), that would be great.

- 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 ($).

Beholder3

I'll mail the spreadsheet to you next weekend.

Regarding the LensMake thing I was to quick:
I can't make it work using your suggested composite tag.
It returns me the message "no writable tags found".

If I change the source field from LensID to exif:LensModel it works though:
        LensManufacturer => {
            Require => 'exif:LensModel',
            ValueConv => '$val =~ /(pentax|tamron|sigma)/i ? $1 : undef',},

and the command -exif:LensMake<LensManufacturer

The same error occurs when using makernotes:LensType as source.

I guess those fields are actually codes and the string operation fails.

Phil Harvey

Right.  There is no such tag as EXIF:LensMake.

Check the tag name documentation for a list of available tags.

- 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 ($).

Beholder3

Quote from: Phil Harvey on June 07, 2011, 07:12:15 AM
Right.  There is no such tag as EXIF:LensMake.

Check the tag name documentation for a list of available tags.

Confused  ???

There is this tag. It's even documented by yourself... as 0xa433. And I can use it.
As I said, it works when it is filled by taking the data (via composite tag) from "exif:LensModel" and not from "LensID" as your code suggested.

Phil Harvey

Ooop, sorry.  You're right.  I forgot about that new tag added in the Exif 2.3.

In that case I need more specific information to be able to figure out what is going wrong.

What happens when you run exiftool -lensmodel -lensmanufacturer on your file?

- 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 ($).

Beholder3

Using the command and code cited by me in the above post it returns:
Lens Model : Sigma 8-16mm F4.5-5.6 DC HSM
Lens Manufacturer : Sigma

As it should.
The command -LensID gives the exact same output as -LensModel by the way.

Once I change the config file back to use "LensID" the command -lensmanufacturer gives no special output at all. If I run exiftool -exif:LensMake<lensmanufacturer then I get the message the system can't find the specified file.


Phil Harvey

So the LensManufacturer tag is working correctly.  One problem I can see is that your command:

  exiftool -exif:LensMake<lensmanufacturer

requires quotes around the argument, like this:

  exiftool "-exif:LensMake<lensmanufacturer"

Otherwise the "<" symbol will be interpreted by the shell, causing a redirection of the file "lensmanufacturer" to stdin, and resulting in the error.

- 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 ($).

Beholder3

Well, the lensmanufacturer tag is only working well if using the exif:LensModel.
Using the LensID I get the following error now (when typing it in correctly as exiftool "-exif:LensMake<lensmanufacturer"):
Warning: No writable tags found - PICTURE.JPG

I can perfectly live with using exif:LensModel.

Just if you think, it should also work with using LensID as the input giving data field for the composite tag then this would be an issue at least for me because I can' t make it work.

Phil Harvey

Right.  This is what I get for replying from the cottage where I can't test things out.

We need to use the print-converted value ($prt[0]) for this to work:

        LensManufacturer => {
            Require => 'LensID',
            ValueConv => '$prt[0] =~ /(pentax|tamron|sigma)/i ? $1 : undef',
        },


- 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 ($).

Beholder3

Yep. This now works perfectly. :)

Thanks for all the support.

I'll now shut up and let you enjoy your cottage days.  :)