AI Glossary / Computer vision and multimodal AI / Intermediate
Structure from motion
Definition
Structure from motion, or SfM, estimates three-dimensional scene structure and camera viewpoints from overlapping images. It uses the changing positions of corresponding visual features across those images to infer geometry. The camera can move around a stationary scene; the phrase does not mean that objects in the scene must move.
What it means
A photograph projects a three-dimensional scene onto a two-dimensional surface. Depth information is partly lost in that projection. Multiple viewpoints provide additional constraints: the same corner appears at different image locations as the camera moves.
SfM jointly reasons about where scene points are and where the cameras were when the images were captured. Its result commonly includes camera poses and a sparse set of reconstructed points. A detailed surface model may require additional processing, such as multiview stereo and meshing.
The result is not automatically expressed in real-world meters. For ordinary calibrated monocular reconstruction without external scale information, multiplying both the scene and camera translations by the same factor leaves the image projections unchanged. A known distance or other suitable external information is needed to establish metric scale.
How it works
A typical pipeline detects visual features, matches them across images, and rejects correspondences that fail geometric checks. It initializes a reconstruction, adds further cameras and points, and refines the estimates.
Triangulation estimates a point from viewing rays. Bundle adjustment jointly refines scene and camera parameters to reduce discrepancies between observed feature positions and projected predictions.
Useful images need both overlap and meaningful viewpoint change. Repeated patterns can create incorrect matches; reflective surfaces can change appearance between views. A moving person can violate an assumed static scene. Simply rotating a camera in one place does not provide the translation needed for ordinary depth triangulation.
Three practical examples
1. A heritage team photographs a carved monument from many positions. SfM establishes camera geometry and a sparse reconstruction before denser reconstruction is attempted. Independent measurements provide scale and help assess accuracy.
2. A furniture retailer captures a textured display object for an interactive model. Staff inspect thin parts and glossy areas because those regions may be incomplete even when the main body reconstructs well.
3. A robotics researcher reconstructs a room from recorded camera images. The model can support later experiments, but reconstruction quality and coordinate scale must be checked before treating its distances as measurements.
Think of it this way
Think of several people sketching the same statue from different positions, then trying to arrange their viewpoints and sketches into one consistent arrangement. Agreement across views constrains the shape. The analogy is limited because SfM solves numerical projection relationships; it does not rely on human recognition of what a statue ought to look like.
Worked example
Use a simplified pair of rectified pinhole cameras to illustrate depth and scale. Suppose their focal length is 800 pixels, their horizontal separation is known to be 0.2 meters, and a point has a horizontal disparity of 40 pixels.
For this special geometry, depth Z = focal length × baseline / disparity. Therefore:
Z = 800 × 0.2 / 40 = 4 meters.
Now imagine the baseline is actually 0.4 meters and the point is 8 meters away. The predicted disparity remains 800 × 0.4 / 8 = 40 pixels. Image displacement alone cannot distinguish those scaled arrangements.
If the first baseline is known but disparity is measured as 41 pixels, the estimated depth becomes approximately 3.90 meters. This demonstrates sensitivity to image measurement even in a simple setup.
General SfM estimates camera relationships as well as points; it is not merely this two-camera formula. The example isolates why both geometry and external scale information matter.
Illustrative case study
Fictional case study: Harbor Exhibits wants a digital model of a decorated cabinet. Its first image set contains many nearly identical frontal photographs and only a few side views. The reconstruction leaves the handles and recesses poorly defined.
The team captures additional overlapping views from different positions, with consistent lighting. It places a measured reference beside the cabinet and checks that it is reconstructed reliably before using it to set scale. Images affected by blur are excluded after review.
The resulting model is inspected against several independent dimensions, rather than accepted because it looks plausible on screen. Areas with inadequate evidence remain flagged for recapture. This fictional workflow illustrates capture and validation decisions; it does not claim a particular level of reconstruction accuracy.
Common misconceptions and mistakes
More photographs do not automatically produce better geometry. Redundant views add processing work without necessarily adding useful depth constraints.
A low reprojection error is helpful, but it is not by itself proof that every physical dimension is correct. Calibration choices, scale, coverage, and incorrect correspondences still matter.
Do not confuse a textured mesh with directly measured detail. A photograph projected onto an imperfect surface can look convincing while concealing geometric errors, especially from the original camera viewpoints.
Business use
SfM supports digitization, documentation, surveying workflows, and asset creation. Plan the capture around the required output: an attractive online object and a dimensionally reliable model have different acceptance criteria.
Budget for image review, reconstruction inspection, and occasional recapture. Record the camera settings, scale references, and processing choices needed to reproduce the work. Evaluate hard regions separately rather than reporting only the number of images or reconstructed points as evidence of success.
People also ask
Does it need video?
No. Overlapping still photographs can be used, and selected video frames may also provide suitable inputs.
Is SfM the same as dense reconstruction?
No. It commonly estimates cameras and sparse geometry; subsequent methods can use that result to recover denser detail.
Will it recover the true size automatically?
Not from ordinary monocular images alone. Appropriate scale information or additional constraints are needed.
Check your understanding
Doubling all reconstructed point coordinates and camera translations produces the same image projections. What is missing if distances must be reported in meters?
Answer: A metric scale constraint, such as a reliably known distance, is needed to select the physically correct scale.
Related terms
- Bundle adjustment
- Simultaneous localization and mapping
- Triangulation
- camera calibration
- feature matching
- multiview stereo
Learn next
Learn camera projection and triangulation next. Then compare a sparse point cloud with a dense model, checking how overlap, camera translation, and a known reference distance affect the reconstruction.
More in Computer vision and multimodal AI
- Stixel - A stixel is a compact, vertically organized element used to represent parts of a scene in a structured visual-perception model.
- Stroke-based rendering - Stroke-based rendering is a way of creating an image by placing and drawing discrete elements, such as brush marks, ink lines, or dots.
- Structural similarity (SSIM) - Structural similarity, usually abbreviated SSIM, is an image comparison measure that evaluates local patterns using brightness, contrast, and structural...
- Structure learning - Structure learning is the process of learning the relationships or connections in a model from data.
- Structure tensor - A structure tensor is a small matrix that summarizes the strength and direction of image intensity changes within a local neighborhood.
- Structured SVM - A structured support vector machine, or structured SVM, is a supervised learning method for predicting an output with several related parts.
Sources
COLMAP, Tutorial, including Structure-from-Motion, feature matching, and sparse reconstruction: https://colmap.github.io/tutorial.html
The official documentation supports the pipeline and capture guidance. The stereo calculation and fictional cabinet example are original explanations, not COLMAP performance claims.
Previous: Structural time series model Next: Structure learning