An Impulse Buy
I recently bought a GoPro MAX on sale for $400, with the intent of collecting footage for Mapillary. However, I have yet to get the desktop app working on Ubuntu 22, and haven’t been able to authenticate using their CLI tool, so I haven’t uploaded anything.
Mounting the GoPro on my car
I’m using a magnetic mount to attach the gopro to the roof of my car. I was a bit nervous driving at highway speeds, but so far it’s held up going around 50 mph. The magnet is quite strong and takes some force to remove.
Processing the video locally
As a workaround, I’m just analyzing the footage locally using the mapillary_tools utility to locally process the footage into geotagged images and JOSM to view them.
This has the added advantage of preserving my privacy, since I’m a bit concerned about giving my geotagged video to Meta. This way I only upload a limited amount of data relevant to what I’m surveying.
I just followed the README guide to set up mapillary_tools and dependencies. ffmpeg is the only external dependency not managed by the pip install.
The mapillary_tools utility has a video_process command which is useful for processing .360 files (GoPro’s proprietary format) into geotagged JPG images.
Viewing the results in JOSM are not exactly pleasing to the eye, but they’re good enough to get basic info.
Running the command
The command to process the video is pretty easy, I just copied all my files into 2023-06-25-gopro-dump and created an empty directory 2023-06-25-gopro-frames.
Then I ran:
1
$ mapillary_tools video_process 2023-06-25-gopro-dump/ 2023-06-25-gopro-frames/
The result is that each .360 file will have its own directory under 2023-06-25-gopro-frames/
1 2 3 4 5 6
$ ls -l 2023-06-25-gopro-frames | head -5 total 3796 drwxrwxr-x 2 wcedmisten wcedmisten 61440 Jun 25 16:40 GS010007.360 drwxrwxr-x 2 wcedmisten wcedmisten 69632 Jun 25 16:53 GS010008.360 drwxrwxr-x 2 wcedmisten wcedmisten 69632 Jun 25 16:43 GS010009.360 drwxrwxr-x 2 wcedmisten wcedmisten 69632 Jun 25 16:50 GS020007.360
And each directory contains geotagged JPG frames from the video:
1 2 3 4 5 6
$ ls -l 2023-06-25-gopro-frames/GS010007.360/ | head -5 total 924264 -rw-rw-r-- 1 wcedmisten wcedmisten 922279 Jun 25 16:40 GS010007_0_000549.jpg -rw-rw-r-- 1 wcedmisten wcedmisten 925110 Jun 25 16:40 GS010007_0_000550.jpg -rw-rw-r-- 1 wcedmisten wcedmisten 950989 Jun 25 16:40 GS010007_0_000560.jpg -rw-rw-r-- 1 wcedmisten wcedmisten 851675 Jun 25 16:40 GS010007_0_000707.jpg
Each of these images will look like this:
They’re a bit distorted because they’re projecting a spherical field of view into a rectangular image. A bit like the map projections we’re all familiar with.
JOSM
Opening the images
The next step is opening the images in JOSM.
I recommend only opening one of the .360 directories in JOSM at a time, otherwise the image viewer forward and back arrows will not work as expected and jump around to different locations.
This can be accomplished by using the File -> Open modal and just selecting the directory containing the images.
The end result should look like this. Each camera icon can be clicked to open the picture in a new window.
Getting some more context
The next step is to add some aerial imagery for context. Here I used bing imagery. This can be done by navigating to Imagery -> Bing aerial imagery
We can also zoom in a bit more on the shopping center I’m mapping.
Finding missing features
The last step is to start mapping! We need to see what has already been mapped, so I download the data with File -> Download in current view. This downloads all the OSM objects that exist in the current bounds of the window.
In this screenshot we can see there is a retail building mapped, but no businesses in it. So let’s add a node for it. It seems like the store mainly sells cookies, so I believe shop=pastry is the correct tag.
The wiki page states that this tag is for:
A shop where baked sweets like cakes, biscuits, strudel and pies are sold (and traditionally also made)
Biscuits are British for cookies, so I think that’s the tag we should use.
With a quick google search, I also found their website which provided some more info about the business. It also provided the address.
So we now know the address as well. So, this one frame allowed us to find all these tags:
1 2 3 4 5 6
addr:city=Charlottesville addr:housenumber=129 addr:postcode=22911 addr:street=Community Street name=Crumbl Cookies shop=pastry
Without this streetview footage, we would not know which business this was or the address. Cool!
Annoyances
My main grievance is that trying to view features that are in the back of the camera is quite difficult, because it is split across the image and some regions are missing completely from the projection. If there was a viewer like google streetview or gopro’s official app where I could move around the 360 image, that would be a big improvement.
Not sure if there is any way to do this in JOSM. If so, let me know in the comments!