Skip to content

Instantly share code, notes, and snippets.

@dbcesar
Last active December 20, 2017 00:15
Show Gist options
  • Save dbcesar/ff408076ae8ef503b04b4de73872fb8e to your computer and use it in GitHub Desktop.
Save dbcesar/ff408076ae8ef503b04b4de73872fb8e to your computer and use it in GitHub Desktop.
For canon cameras. Move to a different folder all bracket images (useful for HDR creation)
#!/bin/bash
INPUT_DIR="$@"
if [ "$#" -ne 1 ]; then
echo "Wrong usage"
echo "Usage: move_bracket_shots_and_generate_tiff.sh <INPUT_DIR>"
exit
fi
if [ ! -d $INPUT_DIR ]; then
echo "The argument must be an directory"
exit
fi
OUTPUT_DIR="$INPUT_DIR/HDR"
mkdir -p $OUTPUT_DIR
exiftool "-directory=$OUTPUT_DIR" -if '$BracketMode eq "AEB"' $INPUT_DIR/*
echo "Converting $(ls -l $OUTPUT_DIR/*.CR2 | wc -l) images"
ufraw-batch $OUTPUT_DIR/*.CR2 --out-depth=16 --out-type=tif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment