StereoMorph 10-Step Tutorial

Users interested in collecting 3D shape data from biological specimens or other objects confront an ever-growing number of methods, each with its own advantages and disadvantages. There’s 3D laser scanning (even DIY models), free open-source surface photogrammetry , microscribes, and CT scanning - just to name the most popular methods out there. These methods are ideal for creating high-resolution 3D surface or volumetric reconstructions. However they require either specialized hardware for the scanning process or specialized software for the reconstruction and digitization of the 3D representations they produce. Additionally, these methods can time-consuming at one or more steps in the data collection process, making them better suited to the collection of high quality data from a relatively small number of specimens or objects.

The StereoMorph method was designed specifically for cheap and rapid collection of landmarks and curves from a large number of specimens or objects. It’s adapted from methods that have been used to study 3D animal motion for several decades (Wood & Marshall 1986Socha, O'Dempsey & LaBarbera 2005Hedrick 2008Brainerd et al. 2010) . All these studies rely on a method known as direct linear transformation (DLT) for the reconstruction of points from two or more camera views into 3D coordinates. Given two or more cameras positioned arbitrarily around some volume of space, DLT provides a mathematical basis for transforming a point’s position in two or more camera views from 2D pixel coordinates into 3D real-word units (e.g. centimeters). StereoMorph uses DLT in the exact same way. Users photograph a specimen or object with two cameras, manually digitize points and curves they wish to collect in both views and these points and curves are reconstructed into 3D real-world coordinates.

Camera calibration, image digitization and point and curve reconstruction can all be performed using the R package StereoMorph. Additionally, StereoMorph is cheaper than most of the above methods: the method can be implemented for the cost of two digital cameras and two tripods (less than $1000 total). For users that already own a suitable camera, only the cost of an additional camera and tripod would be required. Since only two photos are required per specimen and all landmarks and curves are manually digitized directly on 2D images, the StereoMorph method is best suited to the collection of a few landmarks and curves from a relatively large number of specimens or objects. However, it is important to note that StereoMorph cannot produce 3D surface reconstructions nor be used to collect 3D surface data – only points and curves.

I've combined many of these DLT functions (camera calibration, point and curve reconstruction) with additional tools for handling 3D point sets into the R package StereoMorph. This web tutorial will show you how to go from points and curves digitized in an image
Landmarks and curves digitized on the same bird skull from two different cameras.
to a 3D reconstruction
Landmarks (black) and curve points (red) reconstructed from 2D images using the StereoMorph R package.
(Plotted using plot3d() from the rgl R package)
using StereoMorph.

Before starting the tutorial, read Getting Started. This shows how to install R, StereoMorph and download the tutorial files that will be used throughout this tutorial. The tutorial is broken down into 10 steps:

1) Creating a checkerboard pattern
2) Auto-detecting checkerboard corners
3) Measuring checkerboard square size
4) Arranging the cameras
5) Calibrating stereo cameras
6) Testing the calibration accuracy
7) Photographing an object
8) Digitizing photographs
9) Reconstructing 2D points and curves into 3D
10) Unifying, reflecting and aligning

This tutorial is also available as a PDF.

1 comment: