Can image metadata reveal the exact lens model used, especially on Ubuntu?

Asked 11/18/2013

69 views

2 answers

0

I can read basic EXIF data from a JPEG in Ubuntu, such as shutter speed, aperture, ISO, and focal length, but that still leaves multiple possible lenses. Is the exact lens brand and model stored in image metadata, and if so, what tools on Ubuntu can read it?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

6

How to see it?

You may find Lens model description in the image metadata with an Exif viewer that is able to translate the MakerNotes section of the metadata. I use either my RAW-converter software or an online viewer - Jeffrey's exif viewer at Regex.info. Google can find several Exif viewers for you, but not all of them read and/or translate MakerNotes.

Is it there?

Chances to find correct lens info from metadata are good when the camera and lens are both from the same manufacturer. However, third party lenses may show up with invalid or missing lens model info. Also the use of a teleconverter, extension tube or adapter ring may lead to incorrect or missing Lens model info. What more, many photo gallery sites, and for example Facebook, intentionally strip most or all Exif info (and the rest of metadata) off the images.

How is it done?

Lens is recognized by the camera only if its ID-code is known to it. Camera makers include information of several lenses in the firmware, but if a certain lens you use is not included, then the camera can not recognize it correctly.

Some basic specs of a lens is transferred from lens to camera (for example focal length and the maximum usable aperture at current zoom level) and those are then included in EXIF data. Lens model info is not included in the basic EXIF-data but is found in MakerNotes section instead.

Each lens has its own ID-code which is sent to the camera body when an image is captured. Camera body firmware has a lookup table for these ID-codes. A code that is found in the lookup table is translated into uniform (per camera manufacturer) code and gets written into MakerNotes section of metadata of the image. It is up to the EXIF reader software to interpret the lens model code into a lens model description. Base line is, correct info can only be found if the info is already known by the camera.

Two examples:

For example my Sony A37 does not quite recognize my telezoom lens:

Lens Model     75-300mm F4.5-5.6
Max aperture   F4.0

Almost correct but not quite there. See how the lens is first recognized as f/4.5-5.6 but then maximum aperture is a hard fact transferred from lens to camera as f/4.0 (which is true). The lens is actually a Sigma 70-300 f/4-5.6 DG so even the focal range was wrong in EXIF. What happened here is that the ID-code sent by the lens falls into slot 25611 of the lookup table. That number is reserved for "Minolta AF 75-300mm F4.5-5.6 or Sigma Lens". An EXIF reader that I use then shows this as simply "75-300mm F4.5-5.6" in Lens Model field.

A lens that is recognized by my camera has exact info:

Lens Model     DT 18-55mm F3.5-5.6 SAM
Max aperture   F4.0

The lens is Sony's own model, a Sony DT 18-55 f/3.5-5.6 SAM and so quite naturally included in the camera's firmware. The max aperture is f/4.0 because in this case the lens was zoomed in a bit, which has an effect on the max possible aperture.

Updating your camera's firmware may increase the number of lenses your camera can recognize, but it is up to the EXIF reader software to show the lens description instead of just a code in MakerNotes.

Originally by user17441. Source · Licensed CC BY-SA 4.0

user17441

12y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Sometimes, yes. The exact lens model may be stored in the image metadata, but it often lives in the camera maker’s MakerNotes rather than the basic EXIF fields.

On Ubuntu, try tools that can read those fields, such as:

  • exiftool image.jpg
  • exiv2 -pa image.jpg | grep Lens

If present, you may see fields like Lens Model or a maker-specific LensID entry.

Important limitations:

  • It works best when the camera and lens are from the same manufacturer.
  • Third-party lenses may show missing, generic, or incorrect lens info.
  • Teleconverters, extension tubes, or adapters can also confuse or remove lens identification.
  • Some websites and social platforms strip EXIF/metadata, so downloaded images may no longer contain lens data.

So: EXIF can contain exact lens info, but not always, and you may need a more capable metadata reader than the basic exif utility.

UniqueBot

AI

13y ago

Your Answer