Learn R Programming

StereoMorph

StereoMorph is an R package for the collection of shape data using a stereo camera setup.

Introduction

Standard digital cameras are commonly used to collect 2D landmarks and curves from relatively flat objects. But if the objects are more three-dimensional, users often have to resort to methods such as microscribes or surface scanning. The StereoMorph R package allows users to collect 3D landmarks and curves from objects using two standard digital cameras. Owing to its low cost, portability and speed, stereo camera reconstruction is an ideal method for collecting data from a large number of specimens or objects.

The StereoMorph package includes tools for automatically calibrating a set of two cameras using a checkerboard pattern and a digitizing application for digitizing landmarks and curves. Once the cameras are calibrated, StereoMorph allows users to reconstruct any landmarks and curves digitized in both camera views into 3D. Those interested in using StereoMorph will find several useful resources at https://aaronolsen.github.io/software/stereomorph.html, including step-by-step tutorials and accompanying project folders with all the files needed for the tutorial.

Citing StereoMorph

To cite StereoMorph in a publication, please use:

  • Olsen Aaron M, Mark W Westneat. 2015. StereoMorph: an R package for the collection of 3D landmarks and curves using a stereo camera set-up. Methods in Ecology and Evolution 6:351-356. DOI: 10.1111/2041-210X.12326.

  • Olsen, AM & A Haber (2017). StereoMorph: Stereo Camera Calibration and Reconstruction. Version 1.6.1. https://CRAN.R-project.org/package=StereoMorph.

License

Shield: CC BY-SA 4.0

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

CC BY-SA 4.0

Copy Link

Version

Install

install.packages('StereoMorph')

Monthly Downloads

544

Version

1.6.7

License

CC BY-SA 4.0

Maintainer

Last Published

May 25th, 2022

Functions in StereoMorph (1.6.7)

digitizeImages

Opens the StereoMorph Digitizing App
distancePointToPoint

Finds the distance between two points or sets of points
avectors

Computes the angle between two vectors
digitizeImage

Opens the StereoMorph Digitizing App
alignLandmarksToMidline

Aligns bilateral landmarks to the midline plane
distancePointToLine

Finds the minimum distance(s) between point(s) and a line
StereoMorph-package

Stereo Camera Morphometrics
distanceGridUnits

Returns the distances between pairs of points on a square grid
TPSToShapes

Converts TPS file to shape file
calibrateCameras

Finds the optimized DLT coefficients for a stereo camera setup
dltCoefficients

Computes DLT coefficients for a stereo camera setup
dltMatchCurvePoints

Matches curve points between two camera views
dltEpipolarDistance

Finds the distance between a point and a self-epipolar line
dltInverse

Returns ideal pixel coordinates of 3D point(s) in a stereo camera setup
landmarkListToMatrix

Converts a landmark list to a landmark matrix
landmarkMatrixToList

Converts a landmark matrix to a landmark list
dltEpipolarLine

Finds a epipolar or self-epipolar line
findOptimalPointAlignment

Optimally aligns one point set to another
gridPointsFit

Fits regularly spaced points to a sample line or grid
readCheckerboardsToArray

Reads file(s) containing grid points into an array
dltNearestPointOnEpipolar

Returns the closest point on a epipolar line to a point or points
imagePlaneGridTransform

Performs image perspective transformations to a grid
readBezierControlPoints

Reads a file of Bezier control points
dltCalibrateCameras

Finds the optimized DLT coefficients for a stereo camera setup
imagePlaneGridTransformError

Returns imagePlaneGridTransform error
readShapes

Reads a StereoMorph shape file
extractFrames

Extracts frames from video
dltCoefficientRMSError

Returns the error during calibration coefficient optimization
reconstructStereoSets

3D reconstruction of landmark and curves from stereo coordinates
findCheckerboardCorners

Finds internal corners of a checkerboard pattern
measureCheckerboardSize

Estimates checkerboard square size
orthogonalProjectionToLine

Finds the orthogonal projection of a point onto a line
unifyLandmarks

Optimally align a set of partial landmark sets
pointsAtEvenSpacing

Generates evenly spaced points from point matrix
quadraticPointsOnInterval

Generates points along an interval with quadratic parameterization
transformPlanarCalibrationCoordinates

Performs rotational and translational transformations to a planar grid
writeLMToTPS

Writes landmarks as TPS file
dltTestCalibration

Tests the accuracy of a stereo camera calibration
drawCheckerboard

Creates a checkerboard image
dltTransformationParameterRMSError

Returns the error during transformation parameter optimization
dltReconstruct

Reconstructs the 3D position of points in two or more camera views
readLandmarksToList

Reads landmark file(s) into a list
reflectMissingLandmarks

Reflects missing landmarks across the plane of symmetry
readLandmarksToMatrix

Reads a landmark file or files into a matrix
resampleGridImagePoints

Resamples imaged grid points