I've been taking photos with a sports camera (a Replay XD1080, like a GoPro) on my bike and recording a GPX track with my phone. This is a great set up, because the camera is designed to be mounted on a bicycle's handlebars, is waterproof, and has a mode where it takes one photo every 3 seconds.

I can correlate the pictures with the gpx track in JOSM using the Photo_geotagging (and photoadjust, if needed) plugins, but it does not set the compass angle in the image's exif tag, and mapillary goes ahead and assumes all images w/o a compass angle specified are facing north....

I thought I had seen an option somewhere to set the compass angle to follow the travel of the gpx track, which is a sensible feature, but can not find it anywhere now. I may have seen it somewhere other than JOSM, but if not JOSM it would have been in gottengeography or on the mappillary website itself, and have checked there too.

How do I set the compass angle to follow the gpx track?

asked 17 May, 19:32

keithonearth's gravatar image

accept rate: 0%

edited 18 May, 18:16

I use a similar setup with the mapillary_tools scripts. My work flow is usually the following:

export MAPILLARY_EMAIL=myaddress@domain.com
export MAPILLARY_PASSWORD=asdf1234

python geotag_from_gpx.py --time-offset 0 /path/to/images/ /path/to/track.gpx
python add_mapillary_tag_from_exif.py /path/to/images/
python remove_duplicates.py -p 360 /path/to/images/
python upload.py /path/to/images/
  • geotag_from_gpx.py adds the coordinates for each photo and also the heading based on the next photo. This is the most interesting script. You can use the --time-offset parameter if your camera's clock is out of sync with your GPS logger's clock. Ideally use JOSM afterwards to open a few photos and validate the geotagging.
  • add_mapillary_tag_from_exif.py adds a special tag to identify the photo sequence.
  • remove_duplicates.py removes duplicated photos taken at the same location. (Parameter -p 360 is important for ignoring the heading when searching for duplicates. This is because the script tries to keep photos at the same location if the heading changes significantly. But due to the previously executed geotag_from_gpx.py the heading for photos taken at the same location is almost random, leading to large heading variations and thus many duplicates being erroneously kept).
  • upload.py will simply upload the result to mapillary.
permanent link

answered 17 May, 21:07

scai's gravatar image

scai ♦
accept rate: 24%

edited 18 May, 07:39

This looks like just what I was after! The only issue I can see is that the clock on the camera and the clock on the GPS may differ by as much as a couple of minuets. This places the images in the wrong place if I do not adjust the time on the photos. The JOSM plugins make this easy enough, and I get good geolocation tags in the image's exif tags. I think that a fully automated process would not allow me to adjust the time on the images.

(17 May, 22:30) keithonearth

@keithonearth: The difference in clock can be corrected with the time-offset parameter of the first script. You can determine the difference by making a picture of the clock of your GPS (if that includes seconds), otherwise, make a waypoint at the same time you make a picture. I explain this in more detail in http://www.osm.be/2017/04/21/en-post-survey.html

(18 May, 04:19) escada

It also helps to start the time lapse and the GPS recording at the same time. I also use JOSM to validate the geotagging of the photos after running geotag_from_gpx.py.

(18 May, 07:38) scai ♦

I set it with the python script interpolate_direction.py from Mapillary. You can also use Javawa's fotogeotag

permanent link

answered 17 May, 21:40

ligfietser's gravatar image

accept rate: 12%


Thanks! I found this script very helpful. especially as it works well with JOSM, which allows me to correlate with the gpx and tweak the locations in a program I'm familiar with.

(19 May, 07:24) keithonearth

After uploading your sequence, once you get the notification it's available on Mapillary, edit sequence and click on NORMALIZE (it will adjust the bearing of the photo in relation to the next one). No script needed.

Also for geotag I recommend GeoSetter, you can adjust timestamp with positive and negative values (which is extremely useful as you cannot sync HH:MM:SS between yours GPS/smartphone and the action camera (unless it's adjustable by the action cam app, as in GoPro Hero 5 or GoPro Session 5).

permanent link

answered 19 May, 11:46

lfttp's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 May, 19:32

question was seen: 105 times

last updated: 19 May, 11:46

powered by OSQA