Lock Down Projects

Well here we are again, in the throws of another lock down. Travel from your local area is frowned upon, all venues (apart from the sea) are closed for diving so to keep stimulated both physically and mentally I decided to experiment with some underground (local) photogrammetry.

My experience of photogrammetry is limited to mostly following others around underwater whilst they photograph things, a few work projects and some failed underwater attempts in a cave (perhaps a separate post on this later).

For anyone thinking of taking it up I have had very good results with mobile phone cameras, Gopro’s and cheap lights, the process is very simple to perform on a computer so I would encourage people to have a go, the software can be trialed for free so expensive equipment is not necessary.

So back to the lockdown; fortunately I have a site I can access within walking distance of my house in which I can experiment, it is an old water conduit known as ‘Raven’s Well’

Armed with a set of cheap waders from Ebay (its waist deep in some places), a Gopro hero 3+black and two cheap video lights I set off to capture some photos to see how well I could model a part of the site.

I set the Gopro to take a still image every 0.5 seconds, put the lights on full and set off walking slowly around the passages near the entrance with the camera pointing forwards. Care at turns was taken to ensure that lots of overlap was achieved. There is a loop that can be traversed so I walked around to see if the software was able to accurately ‘close the loop’ a fundamental part of survey data assessment.

I went round the loop twice in an anti clock wise direction before heading downstream to the low section before returning to the loop and completing the loop again twice in a clockwise direction, this amounted to 1237 photos, just over ten minutes of photo capture. I have collated them into a short video so the quality and coverage can be seen.

Source Images

This amounted to just over 4 GB of data, the details can be seen be below for the Jpeg images for the photographically minded.

Source Image details

Images can be harvested from video but they lack the metadata that comes from still images so I find this approach easier provided you take enough images first time around, with video you can extract more frames without revisiting the site if required.

Photogrammetry is a computer intensive exercise so before I pressed the ‘Go’ button on the whole set of images I tested a single loops worth to see if what I had captured was going to be worth the wait for processing, this took about two hours to go from raw images to dense cloud, I was happy with the result, it failed to close the loop but had modeled the shape and course of the passages very well, see the below image.

Results from single traverse of loop

The above image is a plan view of the dense point cloud created from one walk round the loop. The areas circled in red are the same physical areas and should join up however at the area highlighted with a blue line (the first corner) it has failed to adjust for the camera heading change properly which can be seen by the ghost walls, if this piece is manually cut and swung round it allows the areas in red to overlap. I was encouraged enough by this to select all the images and pressed the ‘go button’. After all I had 3 more traverses of the loop and hopefully the addition of more images would help it close properly.

This was a much longer process, which took around two days (Macbook Pro running Windows 7, 64bit, 16 Gb Ram, i7 2.9 Ghz). Waking up to a silent laptop (the fans goes into over drive when its processing) on the second morning I was pleased to see all images had aligned and it had finished so I loaded the dense cloud and started to inspect it. I was very happy with the results, the loop had closed and the passages appeared as they should. The image alignment was run on ‘Medium’ and the Dense Cloud was set to ‘Low’. More detail could be processed at the expense of processing time but for me this is good enough.

The result of processing all images

The first job once the initial overview had been completed was ‘cleaning’ the water out of the floor, most of the areas have a wet floor and its unsurprising that it struggles to model a constantly moving, colour changing body of water so these points were manually selected and removed. Once this had been completed the mesh and texture were computed, taking just a few hours. Below are some selected views from inside the model, I am working on some sort of video or fly through to be posted when available.

Looking towards entrance down brick roofed tunnel
Looking downstream
Looking up the inclined section

Future work will involve covering the rest of the site and geo-referencing the data to the real world as an arbitrary scale and alignment is applied straight from the software.

DistoX2 Calibration Jig

An internet search will bring up a number of devices people have created to help when calibrating a DistoX2, mostly these seem to require the use of a 3d printer or a trip to the local plumbing store. I have made a rotary cradle out of some scrap plastic material that allows the the heading of the Distox2 to be maintained whilst rolling the unit to collect the required shots for calibration to be performed.

DistoX2 mounted in plastic jig

It is two discs (cut on a lathe whilst sandwiched and bolted together so they are exactly the same size) which clamp around the outside of the Disto body. The front has a large hole for the laser and the rear has a small hole in which the rear reference point is to be aligned with.

Front end with clearance for laser beam, rear hole to align with reference point

Before use the front end (whilst maintaining the position of the reference point to the rear) must be moved so that the laser exit is inline with the centre of the circle of plastic. This was done via trial and error, the jig and Disto was pointed at a wall around 4 m away and rotated until the laser described as small a circle as possible (nearly a dot) on the wall.

Once satisfied I then collected the 56 shots required for calibration. I prefer doing this in my garden, i’m yet to get better results using targets on a cave wall.

Using a plastic mitre to keep heading constant for flat shots
Non metallic objects used for angled shots wood held together by dowels not metal !

Once the shots have been collected they are grouped then analysed in Topodroid, i’m very happy with the results and would definitely use this jig the next time I calibrate the disto

Calibration results

Underwater Survey Device Assessment

One of the previous posts on this website details the device I have assembled in the hope to speed up underwater cave surveying and at the same time make it more accurate than using the traditional divers compass, depth gauge and slate.

Using the Adafruit BN0055 ‘9 DoF IMU’ inside a waterproof housing as the tilt compensated compass should give a reasonable degree of accuracy but just how accurate is it going to be ?

To find out I ran some tests using a DistoX2 for comparison.

A small wooden jig was constructed that allowed easy foresight and backsight alignment of the home built device and the DistoX2 so that comparable shots could be easily collected.

Disto X2 in wooden Jig, Plastic pegs used for alignment
Survey box in wooden jig, axis of BN0055 co-incident with alignment of plastic pegs

The sizing of the recess in the wood is such that when the box is rotated for the foresight/ backsights and pushed up against the right and left hand edges the sensor of the BN0055 is in approximate alignment with the plastic pegs used to align the DistoX2, the BN0055 is mounted around 90° out from the long axis of the box so its raw reported bearings is around 90° different.

Forty comparable foresight and backsight shots were taken with both devices and the data entered into a spreadsheet. The first task was determining the average difference between the DistoX2 data and the box data (I should come up with a decent name for this device…) The average difference between the two was 89.56°.

The Raw data from the box was then corrected by 89.56° and re-compared to the DistoX2 data. Average difference to Distox2 and Standard deviation values were calculated.

The foresight and backsight differences were also calculated to give a quality check for the shots as the jig wasn’t moved until foresight/ backsights were taken with both devices. The DistoX2 foresight/ backsight differences were far smaller than those calculated for my home made device.

These tests were conducted on a flat surface so further tilted tests will be done to assess this aspect, overall I am happy with the results so far, I have been able to buy an off the shelf sensor and without any complicated calibrations or maths have a sensor that is able to report magnetic bearing to within a few degrees of a DistoX2.

Assuming the tilted performance isn’t much worse then any large errors underwater will come from the ferrous metal equipment carried by the diver (or in the sump) and the ability of the diver to align the device with the dive line which is another challenge itself which needs thinking about.

Underwater Cave Survey Device

A commercially available device for underwater cave surveying is available to purchase called the Mnemo, in keeping with traditional cave survey methods it logs distance, depth and bearing of the line used in caves to guide cave divers.

Inspired by this concept I set about designing and making my own version, it is a work in progress and in its current form can log depth (via a pressure sensor), bearing, temperature, pitch and roll of the device (useful for assessing how still the device was during logging, inclination (pitch) combined with depth change can also be used to estimate distance between belays using basic trigonometry).

The line measurement aspect of the Mnemo might be more difficult to implement in British caves as the line diameter varies greatly from cave to cave and sometimes even within the same sump so I have ignored that bit for now until the rest of the measurements are proven to be of reasonable accuracy.

Device assembled and ready for testing

Housed in a waterpoof box I have:

Adafruit Feather M0 SD (control and data logging)

Adafruit DS32231 RTC (timestamping)

Adafruit BN0055 (9 DOF IMU)

Blueorobotics Bar30 (pressure sensor)

Small screen (data display)

IP68 Momentary Piezo switch

18650 Battery

Assorted resistors, capacitors and a power switch

The components are mounted on a custom made isolation routed single sided PCB and hand soldered onto header pins.

The BN0055 IMU was chosen as it does the complicated sensor fusion on the board and outputs a heading, pitch and roll solution (it can also output raw data if required but the maths and programming is beyond me). This is much easier and hopefully more accurate than having to read and compute data from the separate IMU components.

The device is powered on by activating the latching on/off switch accessed by removing a 3/8″ UNF regulator blanking plug from the side (must be done out of water). When the program starts the battery voltage is displayed before showing the calibration status of the three sensors which make up the IMU which are ; a gyro, an accelerometer and a magnetometer. It is important each sensor is calibrated before use but this doesn’t take very long and once calibrated this status is held until the device is powered off. In between survey shots the status of each sensor and the overall system status is displayed on the screen

Once ready the device can be aligned with the dive line next to a belay, the button can be pressed then after a short delay the device writes 10 values at 10Hz to the SD card, it then waits for the next button push. The screen does display the shot data momentarily but as the screen is small this is more for reassurance.

http://https://youtu.be/mTJUWdjrYCA

 

In this manner it could be used to replaced the compass and depth gauge readings taken by a diver, line distance still needs to be measured traditionally and noted.

Test data

By automating the bearing and depth measurement and recording aspect of underwater cave surveying I hope to speed up the process and increase the accuracy of the data collected, this should prove useful in resurvey projects of caves which are thought to be close by to other caves.

The device could also be reprogrammed and repurposed as a DPV navigation console, or mounted to a camera and used to provide accurate camera orientation and depth data to improve under water photogrammetry image alignment (inspiration for this idea was taken from https://youtu.be/YKw3lBXX6vM ).

Building this device was the first goal, testing and appraising its accuracy is the second goal (currently ongoing) then if suitable putting it to use in some projects is the third and main goal.

Links to the various parts used are shown below:

https://learn.adafruit.com/adafruit-feather-m0-adalogger

https://www.adafruit.com/product/3028

https://www.adafruit.com/product/2472

Early Adventures in Cave Surveying: 2

The launch of the 5th edition of Mendip Underground caused somewhat of a surge of interest in certain caves in which it contained updated descriptions, photos and rigging diagrams, Mangle Hole near Sandford being one of them. It was the rigging topo which caught my attention as it suggests some nice free hanging pitches with multiple rebelays and a sump at the bottom, what more could you ask for !

The Entrance to Mangle Hole

http://www.mcra.org.uk/registry/sitedetails.php?id=851

The reality is somewhat different, its reputation does seem to precede it and it is seldom visited but I quite enjoy a trip there and have undertaken a few club trips, several digging trips, several surveying trips plus a failed dive trip.

As there was no decent published survey of the cave (and there still isn’t) I decided with my new found cave survey skills I would have a go myself. I was joined by Pete Hall and we set about surveying the cave, I don’t remember much detail of the trip itself but I can remember feeling quite frustrated when sitting down at my computer with the data afterwards knowing what shape the passages and chambers actually were and seeing the shapes that I was to draw on the survey to represent them.

The problems lies in that the cave is very steep in nature, the entrance rift is very narrow floor to ceiling but wide in the wall to wall dimension, the chambers are large and vertical in nature with lots of alcoves and side rifts, the route to Aldermaston Chamber is small, complex and muddy. When the splay shots are viewed in plan view the whole cave looks very different to the reality.

Attempt at Plan view in CAD, Splays in yellow, survey legs in red.

At the time I was trying to learn how to draft surveys in Therion but perhaps this multilevel cave was a bit to challenging for my basic skills. Instead I found a handy export function of PocketTopo where the raw data is exported as a 3d *.dxf file, this can then be loaded in CloudCompare where it approximates the walls based on splay shots and shows a 3d model which can be spun around and viewed and understood more readily then a plan and elevation view.

One of the exquisite mud formations, this one looks like a mans head

Early Adventures in Cave Surveying: 1

The Cheddar Caving Club was responsible for creating the link between Bath Swallet and Rod’s Pot (after work by other clubs) creating an entertaining through trip on Burrington Combe, in the Mendip Hills, Somerset. The next logical step was to attempt to link Rod’s Pot with its neighbour the opposite side; Drunkard’s Hole.

http://www.mcra.org.uk/registry/sitedetails.php?id=45

http://www.mcra.org.uk/registry/sitedetails.php?id=5

http://www.mcra.org.uk/registry/sitedetails.php?id=10

I was involved in the dig for a while in Rod’s Pot starting at the bottom of what was known as the ‘Blind Pots’. This progressed horizontally for a short while before a route was excavated vertically upwards to enter a small chamber. From here further digging occurred in the upwards direction.

Pete Hall near the entrance of Rod’s Pot

At a similar time myself and my regular caving partner began re-examining a few areas of interest in Drunkard’s Hole, a short section of passage was found after climbing up an ever tightening aven and a dig was started here feeling that we were heading right for our dig in Rod’s Pot.

Whilst we thought we were heading in the right direction it is hard to know for sure. I purchased a Disto x310 and the conversion kit which allows accurate and fast cave surveying to be performed. The goal was to establish the distance between the two digs in the cave to motivate us to further our efforts (after all we had dug an estimated 120 m of passage in Rod’s Pot and the gap between the two caves was thought to be about 80 m in a straight line).

Arriving early before each digging session I set myself the task of surveying between both entrances on the surface so that the data collected in both caves could be accurately linked. Lengths of PVC pipe stuck into the ground were used to clear the vegetation acting temporary survey stations.

The process was completed three times to check the accuracy of the work; misclosure between the traverses was within 0.2 m in the horizontal plane and within 0.3 m in the vertical plane.

Pete Hall near the start of the dig

Now the task of surveying from both cave entrances to the dig faces was all that was required, this took a few trips in both caves to achieve and was a good excuse to escape the physical work of digging, bagging, dragging and stacking of mud in its various forms.

A no frills approach to the survey was taken meaning that only centre line data was recorded to speed up the process in what are difficult size and shaped passages to accurately survey.

The results were suprising, both ends of both digs in Rod’s Pot and Drunkards Hole were still separated by over 50 m horizontally despite over 120 m of passage having been dug from solid mud fill.

Profile view of the two caves and digs
Plan view of the two caves and digs

Not long after the surveying was completed we retired to the Crown Inn at Churchill for the final time and focused efforts elsewhere thwarted by the complex geology of the Mendip Hills.