OpenStreetMap

Mapillary mapping with my LG 360 camera

Posted by aharvey on 27 June 2020 in English (English)

I try to capture Mapillary imagery where I can, mostly from my bike, sometimes 360 imagery sometimes forward facing only.

I started in 2017 basically just to give it a go, I bought a 360 camera, the LG 360 CAM. Even that was a struggle, they didn’t sell them locally here so I needed to buy from random sellers on ebay. LG don’t make these anymore, but I’ve stockpiled 3 which is good if one breaks or for swapping them when the battery runs out. Overall I’m happy with the camera, it’s not top of the line, but for the price I paid about $100USD each they have satisfactory image quality, battery life and capture rate.

While I can’t usually use my 360 imagery to read off the smaller road signs (only larger destination signs) I find the it’s much easier to do mapping later from 360 images.

After a capture, I’ll usually go through and use it to add in as much detail to OSM as I can from my imagery, and then upload it to Mapillary.

While I’d get value even without uploading to Mapillary I feel this is important to be able to provide some kind of verification to my edits. It also proves very useful later on when reviewing others edits, I can take a quick look of what was on the ground before from Mapillary and just check that new edits look right.

I’ve been very supprised how much I’ve ended up re-checking my captures in Mapillary. Many times reviewing edits in OSMCha I’d be surprised that I actually had coverage for that area.

At the start, mapping out a whole city might seem like too big a task, but just like OSM, chipping away one bit at a time, progress slowly is revealed year after year.

Anyway, back to the point of this diary entry. I recently upgraded to a new phone and found that the LG360 app no longer worked. It would connect to the camera (to see the camera stats) but wouldn’t let me start the capture.

So I did a bit of digging and re-discovered an old post I’d come across before https://forum.xda-developers.com/lg-g5/accessories/lg-360-cam-live-streaming-t3590564

This reminded me that the camera supports the Open Spherical Camera API from Google https://developers.google.com/streetview/open-spherical-camera. Good on Google for making an open standard API and good on LG for building upon this.

So basically I now needed a way to invoke that OSC API from my phone to the connected camera.

Termux to the rescue.

Termux is pretty cool. I worked out I could write a bash script to trigger the camera to start a 2s capture, and then add this as a home screen launcher. Sweet. You can see the scripts at https://gist.github.com/andrewharvey/680e370e8ad66b745c1e9dd02c0b4d0f

This means you can even capture Mapillary imagery from the LG360 without the LG app (since it seems LG is no longer maintaining it).

Comment from CjMalone on 27 June 2020 at 21:24

Pretty clever solution!

And thanks for uploading to Mapillary, I often use it for as source.

Comment from RobJN on 28 June 2020 at 13:09

Nice solution but if I remember correctly the LG360 does not include GPS so was reliant on the phone (and the LG app) for this. How do you ensure you have location data for your images?

Comment from aharvey on 28 June 2020 at 14:27

@RobJN That’s right the LG360 doesn’t include a GPS, so when using the official LG app it uses a wifi connection to grab the GPS coordinates from the phone and apply these to the photos.

However this was not reliable, often consecutive photos would get the same coordinates or there would be large gaps where the connection was lost, plus it wasted my phone battery by needing to leave bluetooth and wifi on.

So I save a GPS log with “OSMTracker for Android” and then use gpscorrelate-gui to add the geotagging back in to the images, it works much better.

Login to leave a comment