Extract Lens Information from PEF files
Posted 14/06/2011 - 14:45
Link
Lightroom will provide this info as well.
I was surprised to learn that my most used focal length was 7.6mm, which I found more than a little curious since the widest DSLR lens I have is 12mm.
Then I discovered that the images taken at 7.6mm were from my Fujifilm P&S camera.
Not surprisingly, my most used DSLR focal length is . . . 50mm.
I was surprised to learn that my most used focal length was 7.6mm, which I found more than a little curious since the widest DSLR lens I have is 12mm.
Then I discovered that the images taken at 7.6mm were from my Fujifilm P&S camera.
Not surprisingly, my most used DSLR focal length is . . . 50mm.
Peter E Smith - flickr Photostream
Add Comment
To leave a comment - Log in to Pentax User or create a new account.


5870 posts
24 years
Sussex,
UK
You need exiftool (the command line tool). I used Lua to quickly process the results - but you can do it all natively in Excel or OpenOffice.
Here's the command to pull out just the LensID and Focal Length from all the PEFs in a directory:
exiftool -r -a -ext PEF -table -LensID -exif:FocalLength /Images/2011 > /Images/2011.lens.focal.csv
That will pull out from all subdirectories (-r), from all PEF RAW files (-ext PEF) just the LensID and FocalLength, into a tab-delimited (-table) table.
The CSV file can be imported into OpenOffice (make sure you tell it that the Tab is the delimiter). From there you can run some counts and analysis
(I wrote a quick Lua script that creates a summary table with focal length down the left, and lens ID across the top. YMMV)
Obviously, other exiftool tags are available - so you could pull out aperture, shutter speed, ISO etc.
Have fun!
Matt
(For gallery, tips and links)