Tuesday 24 November 2015

What is this LiDAR and SfM crap?

I've mentioned SfM (or Structure from Motion) a bunch of times, so I thought I'd better elaborate before someone (that assumes that anyone is reading this blog, which I don't) asks me about it.

In the last year or so, Ive been using SfM more and more as a tool to analyse geomorphology at the landscape and decameter (<10 m2) scale. Its a great technique that is used in a range of disciplines because of its relative low cost and simplicity compared to LiDAR.

LiDAR (Laser Distance and Ranging)

LiDAR is just a fancy distance meter that shows the distance and azimuth to a point. Combine that with a spinning mirror, a fast pulsing laser and some computing power, it produces a "cloud" of points in XYZ space around a known location. In this situation the "dome" of data collected from the ground is referred to as terrestrial laser scanning (TLS). This concept can be combined with an aerial platform (UAV, helicopter, plane etc) and corrected using the yaw, pitch roll of the vehicle to produce a wide ground coverage of elevation within several centimeters vertical accuracy; This is an ALS (Aerial laser scanner).

The awesome thing about LiDAR is that it can penetrate vegetation allowing you to create a "Bare earth" model of elevation (Digital Elevation Model, DEM) and can strip away vegetation digitally to see the underlying surface

In a nut shell TLS is great for scanning things with some vertical detail (buildings, glacier margins etc), while ALS is great for scanning large flat areas of topography.

Glacial landscape of the Nashua River WatershedShirley, MA. Bare earth DEM from aerial LiDAR by mgs.geo.umass.edu.


The video for the Radiohead song "House of cards" was created using a TLS point cloud.


Structure from Motion (SfM)

In stark contrast to LiDAR, with all its electrickery and lasers, SfM just uses cameras.....Yes just normal cameras, even the camera in your cell phone. 

Now you see what I mean by low cost! 

SfM uses a series of overlapping 2D photos of a object or a landscape or your cat, and processes them to produce a 3D point cloud. The idea behind SfM is that you have a fancy algorithm looking at each photo, identifying points that match (up to 40000 points per photo), and then using these "links", the computer plots their position in 3D space in relation to each other. It sounds complex, but there is a range of software, both open source and commercial, that make the process easy.

From point observation and a number of camera parameters, the 3D structure of the scene is computer from the estimated motion of the camera (Open MVG).

At UC, I use a package called Agisoft Photoscan pro, its nice because it can used on a range of cameras/hardware and allows you to add surveyed ground control points to give the model accurate scales. So using a few known GPS coordinates, a bunch of photos of an object you can build pretty good 3D models for measurement/monitoring or visualisation. The hi resolution mesh that is created could  also be exported online via one of the many 3D object sharing sites (i.e. sketchfab, see below). You could print the landslip out on your 3D printer if you were that way inclined!

So....

After all that. LiDAR is awesome but expensive and  SfM is a cheap, easy (ish) way to build accurate 3D models at a range of scales. I like SfM, its "my thing" at the moment, so I'll be talking about it a lot. In reality probably too much!

Here is a favor I did for a friend of some data they collected during a quick UAV flyby of a landslip, I extracted 140 frames from the video and processed them in Photoscan to produce a 3D model. The sketchfab link under the photo allows you to view the data in 3D.

Examples of the images used.



https://sketchfab.com/models/e46baa2d6f16449ab61bc58f920e8965




You say toy, I say aerial mapping and development platform

While the geography department have a bunch of fixed wing and multirotor UAVs, what I really was after was something small.  The guys were good enough to purchase a 3DR Solo quadcopter as a tool for staff to use,  mainly as it mitigates the hassles that occur when you stack the big Draganfly into the ground at speed.

And in one colour....black

This thing is cool, it flies like a charm in pretty high winds, is completely open source and python scriptable.  While the Gopro support is okay,  my only issue with it is a lack of serious firepower for photo mapping.  After reading a bunch of posts (the Solo has a great hacking / modding community) here's my plan for a bit of an upgrade. 

The hard part is finding the right camera.  I went with the Sony QX100 as its super light and has no LCD screen.  It uses a smartphone as the camera control which is cool unless you have a new Nexus 5x like me and the Sony software doesn't support marshmallow yet.. Idiots.

How can I do selfies with this?

The QX100 supports control over wifi, so I'm going to use a VP-systems camremote. These are cool little boards that allow you control cameras via remote control channels. This allows three PWM channels (i.e.RC servo channels) to control various camera functions. 

The beauty of the Solo is that it has an accessory bay that allows you access to USB and a few servo channels.  So via ground control software such as tower or mission planner, I can set a servo command to trigger PWM, which will then trigger wifi, which will then trigger the camera. Yay! 

A few more parts I'm using are a IMP concepts gimbal plate and dampers (to reduce camera vibration) and a neat breakout board from OSH Park. Finally, after all of these changes I then realised that the Solos legs were two short for the QX100 to hang underneath, so I added some Relish3D leg extenders.  

Hopefully all this will play nicely and allow the gopro to be used for FPV while the QX100 will give high resolution surface photos. Unfortunately, we are still waiting to hear back if we can use it in the field this year, but my plan is to use the solo for low altitude (<5m) mapping of  glacial geomorphology.  I'm particularly interested in doing some multi year SfM monitoring of polygonal ground in Antarctic similar to the work by Kaab et al (2014). This will give us a great way to non-invasively study this fragile landscape.

Polygonal ground in the Victoria Valley. Photo by Rod Asher. Antarctica NZ Pictorial Collection

Thursday 19 November 2015

Another glorious day in the corps


Today is what I class as a "shit job" day. Some days are awesome (i.e. tinkering with the UAVs and doing actual science) but other days involve jobs that put the glorious nature of an Antarctic post doc to test.

Todays shit tasks:

1) Take 30 rubber buckets and cut them down to 20cm using one of those buzzy renovator tools. The result after several hours work is a pile of shorter buckets and to be covered in rubber grit. This is actually part of our aeolian (i.e. wind blown) sediment experiment this season. These buckets will be buried in sediment and by using a pair of aluminum plates they can catch pebbles what are rolled around by the wind. From our wind tunnel experiments we know that golfball sized material can be blown around on the surface, so these bucket traps will give us an idea of how much material is rollin' around and from what direction.

Left to Right took a gizillion dollars, 5 years and a PhD

2) Take 15 litres of bunnings "precision" grade sand and prepare for an infiltration experiment. This involves washing and drying (at 200 C) the sand then sieving out the required fraction (710-500um).
Unfortunately due to geology students, one set of sieves was missing as well as the top plate of the auto shaker). This means that I have had to feed 1 kg of material into the machine every 15 minutes to get 250 g of sorted sand out. This obviously has taken a while to get to 4kg of sorted/cleaned sand. Once this is done the sand then needs soaking in ethanol and cooking in an autoclave. This will ensure that none of our Kiwi microbes (and fungi) will get into the dry valleys.

FYI the sand is actually used in an logging infiltrometer that we are experimenting with this year. It basically times how long a known amount of water can be absorbed into a patch of soil. The denser the soil is, the slower the water will take to "infiltrate". We are using it to test the changes in density between sediments that have been trampled on (i.e. by people) to those that are untouched.

Left, bad sand....Right, Good sand :)

Wednesday 18 November 2015

Dry Valleys research and PCAS

Yesterday my boss Bryan and I did a tag-team lecture on our work on the Dry Valleys for this years Gateway Post-graduate certificate in Antarctic studies (PCAS). Its a cool course that gets together a bunch of Antarctic mad students to learn about the continent and have a week on the ice (care of Antarctica NZ). Obviously getting cold, eating 5 year old bumper bars and learning to piss in a bottle are the high points of the course!

Edumacation


Our talk was an introduction to the landscape evolution of the dry valleys and how they are/have been impacted by humans since their discovery by Scott in the early 1900s. While we know far more about the environment, and how they are both different and similar to other desert environments (both hot and cold), the role of human activity in the face of climate change still leaves unanswered questions.

Boot print on the Moon (July 20, 1969). Given the lack of any atmosphere, no wind and no water means that this will last indefinitely  unless it erodes (weathers) mechanically by thermal stress or micrometeorite/meteoroid impact.

I posed the question of "How long does a footprint last" using Neil Armstrongs boot print on the moon and a number of closer examples to point out time scales. Neils footprint is only 46 years old and the hominid footprints in Tanzania are 3.7 million years old, but given the differing environments, the moon print might outlast mankind!

Hominid foot prints in a 3.7 million year old sediment in the Olduvai Valley Tanzania.


Heres a link to the PDF if you are interested in some of this stuff. Ill probably be talking/complaining about some of the topics later on.



First post!

Back of the Deshler Valley looking across to the Olympus Range

Hi there, welcome to my blog. My friend Peyman was asking me if I did anything like this and the answer was "no", so I guess the answer is now "yes".

I'm currently a post doctoral fellow at the University of Canterbury's Gateway Antarctica research centre. With a PhD in glacial geology, my current research interests are in the realm of geomorphology (the study of landscapes and their processes), paleoclimatology and the use of laser scanning, GIS, SfM photogrammery and UAVs (ie drones) in the mapping of human impacts in polar deserts.  My stomping ground over the last 7 years has been the ice free areas of the Transantarctic Mountains, primarily in the McMurdo Dry Valleys working on a bunch of research projects in a bunch of topics (biocomplexity, glacial history etc)

Ive now "Settled down" to a two year stint on a project called DryVER (Dry Valleys Environmental Resilience) which I am working in the human impact team. On the side I teach into a variety of GIS and remote sensing courses in the Department of Geography here at UC.

Hopefully this will be a dumping ground for python code, ideas and general musing bullshit about my "science" in the Dry Valleys and other polar deserts. Hope you enjoy!