Monday, November 05, 2012

Hacking the Em2 Part the Fourth: 3D Scanning

Okay, here's the last post in a series on hacking the Em2. At least for now. Once I got all the modifications done to control discharge and sediment flux, I needed a way to measure the influence of all this stuff. The simplest way is to run up and down the channel with a ruler. But that's fairly time-intensive, particularly if you make measurements over short intervals.

Enter the X-Box Kinect sensor. It uses an IR laser pattern to measure distances. Over short (<1m a="a" amazing="amazing" by="by" can="can" changes.="changes." detect="detect" distances="distances" done="done" href="http://kenmankoff.com/2012/09/12/accepted-with-minor-revisions-the-kinect-a-low-cost-high-resolution-short-range-3d-camera" is="is" it="it" millimeter-scale="millimeter-scale" precision="precision" s="s" such="such" thanks="thanks" that="that" the="the" to="to" work="work" you="you">Ken Mankoff
, we had a working methodology to start with. With lots of computing help from my colleague Todd (who blogs at "Talking Physics"), we had the ability to collect and analyze lots of spatial data. The big question was "how do we scan the stream table?"
Our first design was a kind of "roller skate" frame that traversed the entire length of the stream table. There were lots of things that worked with this design, but we ended up having trouble matching subsequent scans. There's still lots of potential, but we didn't have the time needed to to the matching.





The scans from the "roller" worked pretty well, but they were sometimes distorted. Comparisons between separate scans were also difficult to line up.

So we went with a "locked down" setup for the scanner. To keep the precision of the short distance for the scanner, we were limited to a narrower view of the stream table. This let us directly compare individual scans to study changes over time (or from changes in discharge, etc.).

Here's the setup with the kinect and time-lapse camera set up to record movies and spatial data simultaneously.

Here's a quick example of what we've done so far (click to embiggen).


Kinect scanners are sold separately for about $150 or so. I got mine used at a game store for about $70. Don't forget to pick up a power supply (which comes with the USB cable that will interface with the computer).

Some software that we've used:
Meshlab: for viewing the point cloud data
RGBDemo: for making quick 3D surfaces
OpenKinect: Information about grabbing the 3D data
To process the raw data, Todd combined the distance file data using a Python script (running on a Linux box) and then compared the averaged distance values from one scan to another.


No comments:

Post a Comment