#!/bin/sh
#
# ToSift.sh
# Create a script for extracting sift features from a set of images

# Set this variable to your base install path (e.g., /home/foo/bundler)
BASE_PATH="TODO"

if [ $BASE_PATH == "TODO" ]
then
    echo "Please modify this script (ToSift.sh) with the base path of your bundler installation.";
    exit;
fi

SIFT=$BASE_PATH/bin/sift

for d in `ls -1 | egrep "jpg$"`
do 
    echo "mogrify -format pgm $d; $SIFT < `basename $d .jpg`.pgm > `basename $d .jpg`.key; rm `basename $d .jpg`.pgm; gzip `basename $d .jpg`.key"
done
