- The GPS is quite slow, it takes several minutes to get a fresh location info
- The GPS is weak, it takes a clear sky view to get any location info. It does not work indoors. It works sometimes close to a window.
- If the camera has now fresh location info, it just puts the last location info it got into the EXIF metadata headers in the pictures.
Algorithm:
- Sort pictures by EXIF:DateTimeOriginal.
- Cluster pictures by EXIF:GPS-Latitude and EXIF:GPS-Longitude. The earliest picture (according to EXIF:DateTimeOriginal) is the only one with correct GPS info.
- Let A be the location of the first picture in a cluster. Let B be the location of the first picture in the following (by DateTimeOriginal) cluster. Move each picture C in the first cluster (except A) from A towards B on the line AB. How far to move? Compute the time difference between A and C and normalise by time difference A to B. This yields a factor between 0 and 1 and gives the percentage how far to move C. Moving is simple: C.lat = A.lat + factor * (B.lat - A.lat), similar for longitude. Yes, this assumes a constant moving speed between two GPS located photos which in reality is not really true.
No comments:
Post a Comment