OJW's image locator script
|This article or section may contain out-of-date information. The information is no longer correct, or no longer has relevance.
If you know about the current state of affairs, please help keep everyone informed by updating this information. (Discuss)
This script can combine a directory full of JPEG images, with a GPX tracklog, to produce a list of latitude/longitudes for each photo.
It takes into account the differences between your camera's clock and the GPS clock if you know them - one way to find this out is to take a photo of the GPS while it's displaying a clock.
Currently, it creates an HTML file showing thumbnails of each photo, with latitude/longitude, time, and the error (the difference in seconds between photo and the nearest GPS timestamp found)
perl ImageLocator.pl [Tracklog file] [Image directory] [GPS time] [Camera time] > output.html
Running the program
- ImageLocator.pl is the perl script (follow the source code link, and save it as a text file called ImageLocator.pl)
- Tracklog file is a GPX with tracklogs
- Image directory contains a load of JPEGs
- GPS time and camera time refer to the timestamps from GPS and camera respectively, for the same instant.
- GPS and camera times are in the format hh:mm:ss
- GPS time is likely to be using UT, so adjust accordingly.
- Output is to STDOUT as HTML, so > output.html stores that output in a file
- Not XML-aware, relies on gpsbabel's particular GPX output format
- Only searches backwards in time (i.e. the tracklog just before the photo was taken)
- Complete lack of commenting or neat headers