Skip to content

Instantly share code, notes, and snippets.

@biojazzard
Created March 8, 2016 21:44
Show Gist options
  • Save biojazzard/fd5d6e3a6440531538a8 to your computer and use it in GitHub Desktop.
Save biojazzard/fd5d6e3a6440531538a8 to your computer and use it in GitHub Desktop.
GoPro FishEye Undistort /w CLI | OSX
cd "$(dirname "$0")"
echo "GoPro Fisheye, undistort GoPro images by @biojazzard"
printf "\n"
sleep 3
echo "mogrify must be installed: ex: brew install mogrify"
sleep 3
printf "\n"
echo "Undistort all the images in the current folder or just one? (type all for all pictures or filename for undistorting a custom photo)"
read fisheye
if [[ $fisheye == "all" ]]
then
mogrify -distort barrel "0 0 -0.3" *.JPG
echo DONE
else
echo -ne "Type the GoPro image filename, exclude the .JPG extension: "; read filename
mogrify -distort barrel "0 0 -0.3" $filename.JPG
echo DONE
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment