Thursday, 6 August 2015

Gestalt - Simple 3D Modelling from 2D images

With the massive growth of processing power modern home computers and tablets have the capability to bring to our fingertips the kinds of tools we might have only imagined ten years ago.  I have been dipping my toe into 3D modelling in the last couple of weeks and already have come up with some nice surprises.  The first is a wonderful phone app called Seene which allows anyone with a smart phone to generate simple 3D models in a matter of seconds.  Here is a Common (Black-billed) Magpie Pica pica tail feather placed on a wooden board.  Simply by moving the mouse over the image you can gain an impression of the 3D depth of the image.  For more click on the Seene logo at the bottom of the image.


A really nice little tool and certainly useful I think for capturing flowers, insects, such as moths and perhaps birds in the hand.  But not a very practical solution for birders trying to model birds in the field.  Incidentally, the Seene type images are pretty much what I had in mind for 3D image capture at the end of my posting on measurements from photographs, HERE.

But is there a better solution out there?  Well I started looking at some open source software and found a very nice offering in the form of a program called Visual SFM.  To start with I gathered a range of images of a Ring-billed Gull Larus delawarensis and cropped them in order to try and obtain a 3D model of the head and bill.


The first step involves comparing all these images for points which are common to two or more images.  Normally the intent with 3D modelling is that the person taking these images is moving around a stationary subject, but in this case I was stationary and the bird that was moving around.  So I was not entirely hopeful this method would work.  Nonetheless I proceeded to the next stage in the process.

Step 2 in the process involves generating a point cloud.  This is essentially a cloud of dots making up the surface of a 3D model.  The more dots the better the model.  To have achieved any dots at all was a surprise I'll be honest!

While it may not look like much here is the point cloud generated from the images above.  The next stage in the process involves creating a surface mesh from the available points and placing texture over the mesh.  Only at this point does the model begin to resemble the subject.

A second free software programme called MeshLab allows viewing of the end result.


I have to admit I am really shocked that this method produced any results.  What I was keenly interested in here was the facility to appreciate the bill to eye ratio and general proportions of the bill and head as discussed in an earlier posting HERE.  The model created certainly allows for some appreciation of these proportions.

I believe the major gaps in the data in this instances was down to the bright light.  It is recommended to capture images in diffuse light in order to minimize bright light and shadow.  I have no doubt that by fine-tuning this method better results are possible.

Here is a short video showing the 3D model in motion on MeshLab.  Further down is an instructive video demonstrating the various software elements and the true power of this method.




1 comment: