Beware the Ides of March :: Fixing the Photos

Posted by alexkemp on 20 March 2019 in English (English). Last updated on 4 April 2019.

After installing OSMTracker v0.7 on my Android SmartPhone on the Ides of March, then using it the next day for the first time, I discovered that not only did it not track (a touch of an existential issue for a GPS Tracker - how come no-one noticed that before?) but photos taken with the App also were lacking almost all GPS info within the metadata, making them useless for Mapillary.

 ~/DCIM/Camera$ identify -verbose IMG_20190316_092818.jpg | fgrep GPS
exif:GPSAltitudeRef: 240/100
exif:GPSInfo: 686

It was a short session and only 43 photos, but I did not want to waste them if it could be helped. Somewhere in my searching I came across two really old plugins for JOSM which worked to fix that absence:

How to Add Geo-tags into Photos within JOSM

My phone is a cheap model from Vodaphone (SmartPrime-7, model VFD 600, Andoid 6.0.1) and has been able to add a full set of GPS tags to the photos that it takes with the built-in utility from the get-go, let alone when using OSMTracker. Even so, after taking photos under OSMTracker-0.7 and exporting a GPX (track-file), even though the gpx contained lat/long/compass for each photo, the photos themselves did not.

April update: Location needs to be switched on for BOTH the smartphone and the camera. They are independent actions within my model.


Inside JOSM:–

  1. Press f12 to bring up Preferences
  2. Select Configure available plug-ins (LHS)
  3. (When the selections come up)
    Scroll down/search for ‘photo’
  4. Select photo_geotagging (currently 34867)
    This is what allows you to select & write (via the right-click menu) the GPS position into the exif of that selected file
  5. Select photoadjust (currently 34867)
    This plugin allows imported photos to be positioned & moved upon the JOSM map.
  6. Select Download
  7. Press OK

We now have the ability to load photos on to JOSM as an Image layer and then to place the photos at the place where the photographer was standing, and to register the direction that the camera was facing. Those GPS details can then be placed into the file metadata. This is easy to do but, since it has to be done one-file-at-a-time and cannot be scripted, it is incredibly tedious to do (I only had 43 photos to process and it took me a couple of hours; imagine if there were 43,000 photos!).

This is the step-by-step:–

  1. Inside JOSM press menu: File | Open… (Ctrl+o)
  2. In the Files of Type: select-box choose Image Files (*.jpg)
  3. Now use the Look in: select box and navigate to the directory containing the photo file(s) to import.
    (It is likely that you will want all photos in a particular directory, so select one with the mouse then press Ctrl+a (select all such files) and press OK (it may offer to Correlate images with GPS track - press Cancel))
  4. If necessary, switch ON the Layers window (access via menu: Windows | Layers… (Alt+Shift+l)) which will now show a Geotagged Images layer
  5. In the LHS click on Adjust Photos so the background is blue
  6. There is now a Geotagged Images dialog-box which will show the active photo
    (this should show the first image in the list when you first start; right-click the Geotagged Images layer within the Layers window and choose Jump to next marker (Ctrl+Alt+J) if it does not)
  7. With the photo to process showing in the dialog-box, hold down the Shift key and click at the correct location and a little camera rectangle will appear. Move it to the exact place where that photo was shot.
  8. Hold down the Ctrl key and click in the direction that the camera was facing, and a little arrow will appear to show that.
  9. When satisfied with both camera location for that photo and direction, right-click the Geotagged Images layer within the Layers window and choose Write coordinates to image layer
  10. The first photo is now geo-tagged; 42,999 photos to go.

You will have spotted an option to mass-tag photos using a GPX track but that was NOT available to me since the track had failed as well. Sigh. Well, at least I got these 43 geo-tagged and later uplifted into Mapillary. Then Mapillary vandalised them with unnecessary blurs, again. So I used the blur editor, again, to remove all unnecessary blurs (most of them). And Mapillary completely ignored the fact that I had done this, so none of that work will be enacted, either. Again.

Well, that’s it for me with Mapillary. Does anyone have any other suggestions to replace Mapillary? What is OpenStreetCam like?

Location: Stonebridge Park, St Ann's, Nottingham, East Midlands, England, United Kingdom

Comment from mds08011 on 11 April 2019 at 17:23

I enjoy using OpenStreetCam but you might be frustrated as it struggles with similar blurring issues:

Login to leave a comment