Skip to content

Instantly share code, notes, and snippets.

@danbjoseph
Forked from dalekunce/mapillary_setup.md
Last active April 7, 2019 19:02
Show Gist options
  • Save danbjoseph/776a3a2d9a9974dd43363bee252e64b2 to your computer and use it in GitHub Desktop.
Save danbjoseph/776a3a2d9a9974dd43363bee252e64b2 to your computer and use it in GitHub Desktop.
Mapillary Setup and Tools and image importants

#merge gpx files

gpsbabel -i gpx -f file1.gpx -f file2.gpx -o gpx -F merged.gpx

#attach GPX to photo get needed libs first

pip install gpxpy
brew install pyexiv2 exiftool
git clone https://github.com/mapillary/mapillary_tools.git
python geotag_from_gpx.py path/to/photos gpx_track.gpx timeoffset

#jhead to fix the timestamps on the files

brew install jhead
jhead -ft *.JPG

#make a movie

brew install ffmpeg
ffmpeg -f image2 -i geotag_%06d.JPG -r 25 -s 1280x960 ../movie.mp4

#flip using imagemagick DONT DO THIS, IT MIRRORS THE IMAGE

for file in *.jpg; do
  convert -rotate "180" "$file" rotated_"$file"
done

try this... toebee [7:28 PM] @danbjoseph @ian I think I just used exiftool -Orientation=x -n *.jpg where x is the desired orientation setting (1-8) as listed here: http://jpegclub.org/exif_orientation.html the -n just makes exiftool process arguments as numbers instead of human readable strings exiftool -overwrite_original_in_place -Orientation=4 -n -v *.JPG

#clip the bottom 840px off of images and convert to png

mogrify -verbose -format png -gravity south -chop 0x840 *.JPG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment