Move photos along gpx path

Hi there,
I’m currently using the python scripts to add GPS information to my GoPro photos.
Before I upload the photos using the script I tend to check the sequence and the GPS position assigned to photos using the Geosetter software. This software allows to load GPX tracks as well as showing multiple photos on a map.

Every now and then the photos appear way off from the location where they should be. I typically check around big intersections, bridges, landmarks and I had cases where the photo ended up 14 seconds later along the track.
While I don’t know why the photos are that far of I would like to fix the photos. In particular the critical areas around intersections and interesting landmark.

Is there a software that allows me to move photos along a GPX path? I just want to say move these <number of> photos -5 seconds along the path instead of drag and dropping every image to a better position.

Thanks,
Seb

1 Like

I have a similar problem with GoPro clock drifting off, and what I do is select 2-3 photos taken near known landmarks preferably at higher moving speed and try using geotag_from_gpx.py with the appropriate --time-offset value. When I find the value, I run the script for the whole sequence and everything is ok. I use to check the position with Geotag.

Glad I’m not the only one. The strange thing is that this does not happen always.
I take 1 photo a second and have set my GPS recording interval to 1second too.

I also do sync my mobile clock regularly with the GoPro prior to start of recording.

I have also corrected the time of photos the way you described it but I was hoping for a solution that I can address the drift. At some point they just drift apart and the sometimes it is in sync again later.

When using a GoPro it is smart to use the GoPro app. It will automaticcaly set the time after the time on your phone. If you then use the phone to log the GPS coordinates (GPX Logger) you are sure the time in the GoPro ant the GPX file are syncronised.

If you need to adjust the time, I would say that Geosetter is the easiest option to do so. Just set the amount of seconds you want to move when you syncronise the images with the GPX file

No GPS receiver, especially consumer ones, are perfect. In various cases, especially in cities where the signal can be reflected, all sorts of errors. But there can be other explanations. Personally I often takes a photograph of my phones clock (with seconds) before I really start. Then I have something to correct time from.

I have made a script that can remove points in a GPX file that “jumps” (gpx-clean.py in GitHub - simonmikkelsen/gpxutils: Python scripts for creating and manipulating gpx files in specific situations.) and would like to make a script that geotags an existing sequence from a local GPX file (using the new changesets).

An explanation for the fact that it doen’t happen all the time could be that your gopro now and then automatically adjust the time with the app, causing the timedifference to disappear, but then the drift of the GoPro clock has to be a lot.
Do some test to check the accurancy of the clock by syncronizsing it with your cellphone in the morning and checking the timedifference at night.
If it is more then a few seconds it might be time to buy a new GoPro (they have a great second hand value)

One thing that used to be a problem with the GoPro taking a picture every 2 seconds and the phone recording a GPS trackpoint every 1 second was that the clocks would sync up just right to where I would end up with two pictures closer together followed by a longer gap, followed by another two pictures closer together and so on. Here is an example sequence of this behavior: https://www.mapillary.com/app/?pKey=rOATSTDr1gJFUVt0ENtzQA

This was solved by using the --interval 2 option with the geotag_from_gpx.py script. It uses the time of the first and last pictures to estimate exactly where within each second pictures were taken and smooth out this jitter. This does require a completely unbroken sequence of images (so no stopping the camera at stop lights for example).

Also, be sure your camera’s firmware is up to date. I’m pretty sure I saw something in a recent changelog on my Hero 4 about improvements to the timing in time-lapse mode. I didn’t really look at the details though.

But yes, I do still see drift at times. If it gets too bad over the course of an entire sequence, I will sometimes break a sequence into multiple parts to keep the drift in check.

After using the geotag script I open the pictures in JOSM and compare them to aerial imagery. I find the best places to check are where there are features that cross the road and are visible in imagery. In particular out in the country, bridges usually have very visible expansion joints at the beginning/end of the deck and/or have different pavement than the road before/after them. In urban areas, crosswalks and stop lines are of course useful. Overhead signs on freeways. I find that trying to reference by objects along the side of the road can be difficult, especially when working with wide angle lenses. It is hard to estimate the true field of view accurately. You just have to be sure the imagery is up to date enough. There is an intersection near my home that was rebuilt recently. It looks pretty similar to what is in the imagery but the crosswalk got moved back several feet. I remember being frustrated while trying to geotag a sequence until I realized this and ignored that intersection.

So after viewing the locations in JOSM I will re-run the geotagging script and adjust the time-offset as needed. Note that the time-offset parameter does not have to be a whole number. You pass in 1.65436 and adjust things by nanoseconds if you want :smile: (OCD warning!)

Of course the real answer here is "upgrade to the Hero 5 which finally has GPS hardware built in! Quick, someone give me $400! Actually better make that $500. Of course they changed the battery design again so I’ll need a new set of spares and a charger…