YouTube as Remote Sensing
I’m starting to carve myself a fun niche in the cartographic community by making scuba diving maps and they’re getting attention. From my friends at least. One of them is a partner at a dive tour company in Maui and he wants me to make some maps of west Maui and, in particular, the kinds of places that attract scuba tourism.
We’re at the beginning of the project so I started broad. I visited the Hawaii GIS repository website and downloaded generic layers for roads, parks, marine protected areas and elevation data. I also got sidetracked reading about Polynesian wayfinding (again) but that’s neither here nor there. The road block that I found quickly was that one of the biggest tourist draws in the region, Molokini Crater, didn’t have elevation data at all. No satellite RADAR, no LiDAR flights, nothing that was free and public at least. Even the cool trick of scraping Google Maps data with Blender and RenderDoc wouldn’t work because Google hasn’t created a 3D model either.
Molokini Crater is a volcanic caldera a couple miles off the southwest coast of Maui and it sees about 300,000 visitors a year. Despite having been the target of dive bombing practice runs in the 40s and having only been declared cleared of discarded live munitions in 2011, it’s now a fully peaceful and cleaned up park where even disturbing the resident nesting birds on foot is illegal. The land has no commercial value so it seems no one has bothered to survey it with any real detail. Fortunately, there are ways of gathering 3D data other than booking a LiDAR flight or a satellite flyover.
It seems everyone and their cousin got a drone for Christmas in 2015 and now the market is awash with quadcopter-piloting menaces who scare birds and fill quiet with a vaguely threatening whine in otherwise beautiful places for the sole purpose of taking crappy video of places that other people have already filmed better. But in this case, the amateur drone market has collected some fairly good data, albeit inadvertently.
Youtube is filled with drone footage of Molokini, some from professional outfits and some from amateurs and tourists. Unfortunately, this strangely shaped island has a good side it seems and most of the drone shots were either simple tracks that passed over the middle of the cove or else around the western half of the arc, to the exclusion of the outside edge of the eastern one. I needed one video with complete coverage- stitching together images from multiple flights has too much variation from shadows and lighting that the computer will struggle to create a single model from. I tried downloading and extracting stills from four different videos hoping that I could splice together photos from different videos to create a single model but it didn’t work. I needed a single video that covered every part of the island. Most tourists aren’t that thorough.
Fortunately, I found a ten year old video taken from a helicopter by a tourist holding their camera out the window. It’s shaky and the resolution isn’t great but that doesn’t actually matter much, nor does the fact that the video has a watermark on every single image. The serviceable resolution, consistent lighting and coverage are all that matter.
I downloaded the Youtube video and extracted stills from the video with Gom Player Burst Capture, saving one photo from the video every second. I then fed all of those images into Meshroom and created a textured mesh model.
I imported the mesh into Meshlab to clean it up a bit- edit out the noise and such.
What I actually want is a raster that I can import into my map. This textured mesh looks cool but I can’t open it in QGIS yet so I export the mesh as a point cloud and open that in another open source program: Cloud Compare. In Cloud Compare, I can clean up the point cloud a bit better and export a raster.
I imported the raster into QGIS and georeferenced it and then took a peek. There are still some trace vertices to get rid of but overall it looks good.
Finally, a photogrammetric model like the one I made doesn’t have any kind of scale- it’s a virtual object with unitless dimensions. Because I lined up my model with satellite imagery, the x and y coordinates of the raster are in the correct place but the vertical scale, the raster values, haven’t been updated. Wikipedia tells me that the maximum height on Molokini is 161 feet above sea level which means the range in values for our raster should be exactly 161 feet.
The conversion math as it appears in the raster calculator is:
RASTER*(161/(max value of new raster-min value of max raster))-161
I’m almost done at this point. The last step is creating a virtual vector polygon around the elevation model to create a mask that will exclude all the flat interstitial spaces. Like a cookie cutter, I use this polygon to extract only the relevant parts of the raster. According to my scaled raster in QGIS, each pixel is a little over an inch across which means it’s more precise (albeit not more accurate) than USGS radar-derived DEMs by a couple orders of magnitude so during this extraction step I also down-sample the raster to a more manageable 1m resolution that just feels a little more honest.
It may not be survey grade but it looks fantastic and has wonderful detail. You can see and download the full model here on Sketchfab and thanks to an enterprising NOAA employee who follows me on Twitter, the data are now hosted by the National Geodetic Survey. I tried to write a metadata document but, since this is the first 3D survey of the island, I can’t vouch for the accuracy of the data because there are no existing surveys to compare it to. Nonetheless, I’m proud of having authored the most comprehensive survey of Molokini that exists and possibly the only dataset hosted by NOAA that was derived entirely from YouTube.
I still don’t know what I’m going to do for bathymetry data but I’m sure I’ll think of something. There’s more accessible video below the surface than there is above it, maybe I can do something with that? Let me know if you end up using this technique on your own project and I’ll keep you updated on my progress.