Development,  Tech Tips

Grouping Focus Bracketed Photos from an OM-1 Mark 2

The Problem

I have a folder of image (JPG and RAW) files of some focus bracketed shots from my OM-1 Mark 2. I need to find a way to group them… maybe there is exif data that’d help? Or maybe I can use bash to group by timestamp to find all shots within 1 second of the previous shot… if the gap is more than 1 second then it starts a new “series”.

That was my prompt for Claude.

Claude suggested I try this first, to see what’s available:

I ran the commands and replied:

Ooh good news. There appears to be some metadata in both JPG and ORF files.
Focus Bracket Step Size : 5
White Balance Bracket : 0 0
Drive Mode : Focus Bracketing, Shot 7; Electronic shutter

Claude then gave me a bash script. I made a few tweaks, re-prompted, made some tweaks, then it was done.

It turns this flat folder of files:

Into this:

Implementing

  1. Write this script somewhere (e.g., ~/scripts/om1-focus-bracket-grouper.sh )
  2. Make it executable ( chmod +x om1-focus-bracket-grouper.sh )
  3. Go into the flat folder (e.g., cd ~/Pictures/MacroShots )
  4. Run it ( ~/scripts/om1-focus-bracket-grouper.sh )
  5. It will show you what the results will be and then prompt you to hit Y to move the files or N to abort.

 

Leave a Reply

Your email address will not be published. Required fields are marked *