# Photogrammetry

Photogrammetry is the science of making measurements from photographs, especially for recovering the exact positions of surface points. Photogrammetry is as old as modern photography, dating to the mid-19th century and in the simplest example, the distance between two points that lie on a plane parallel to the photographic image plane, can be determined by measuring their distance on the image, if the scale (s) of the image is known.
Photogrammetric analysis may be applied to one photograph, or may use high-speed photography and remote sensing to detect, measure and record complex 2-D and 3-D motion fields by feeding measurements and imagery analysis into computational models in an attempt to successively estimate, with increasing accuracy, the actual, 3-D relative motions.
From its beginning with the stereoplotters used to plot contour lines on topographic maps, it now has a very wide range of uses.
(See also sonar, radar, lidar, etc.).

## Submodules

OpenSource approaches to create a point cloud:
* Regard3D - Images to Point Cloud and Texture
* OpenDroneMap - From Drone Images to Point Cloud
* MeshRoom - From Images to Point Cloud
* MeshLab - edit the mesh grid of a Point Cloud (mesh)

## Learning Task

* Explore the options of 3D Modelling in general
* Learn to create your first 3D object with OpenSource Regard3D.
* Learn about taking Fotos for Photogrammetry by Youtube-Video 3D scanning Tutorial by Phil Nolan 2015
* Follow steps in the Regard3D tutorial to introduce you to the major process of 3D modelling with Photogrammetry.
* Place a piece of paper with a geometric pattern under the object, that you want to create a 3D model from by Photogrammetry. Explain, why does this step increase the quality and precision of the generated 3D model.

## Photogrammetric methods

Photogrammetry has been defined by the American Society for Photogrammetry and Remote Sensing (ASPRS) as the art, science, and technology of obtaining reliable information about physical objects and the environment through processes of recording, measuring and interpreting photographic images and patterns of recorded radiant electromagnetic energy and other phenomena.
Photogrammetry uses methods from many disciplines, including optics and projective geometry. Digital image capturing and photogrammetric processing includes several well defined stages, which allow to generate 2D or 3D digital models of the object as an end product. The data model on the right shows what type of information can go into and come out of photogrammetric methods.
The 3-D co-ordinates define the locations of object points in the 3-D space. The image co-ordinates define the locations of the object points' images on the film or an electronic imaging device. The exterior orientation of a camera defines its location in space and its view direction. The inner orientation defines the geometric parameters of the imaging process. This is primarily the focal length of the lens, but can also include the description of lens distortions. Further additional observations play an important role: With scale bars, basically a known distance of two points in space, or known fix points, the connection to the basic measuring units is created.
Each of the four main variables can be an input or an output of a photogrammetric method.
Algorithms for photogrammetry typically attempt to minimize the sum of the squares of errors over the coordinates and relative displacements of the reference points. This minimization is known as bundle adjustment and is often performed using the Levenberg–Marquardt algorithm.

### Stereophotogrammetry

* Computer Stereo Vision
* Stereophotogrammetry
* Roentgen stereophotogrammetry
A special case, called stereophotogrammetry, involves estimating the three-dimensional coordinates of points on an object employing measurements made in two or more photographic images taken from different positions (see stereoscopy). Common points are identified on each image. A line of sight (or ray) can be constructed from the camera location to the point on the object. It is the intersection of these rays (triangulation) that determines the three-dimensional location of the point. More sophisticated algorithms can exploit other information about the scene that is known a priori, for example symmetries, in some cases allowing reconstructions of 3-D coordinates from only one camera position. Stereophotogrammetry is emerging as a robust non-contacting measurement technique to determine dynamic characteristics and mode shapes of non-rotating and rotating structures.

## Integration

Photogrammetric data with a dense range data in which scanners complement each other. Photogrammetry is more accurate in the x and y direction while range data are generally more accurate in the z direction. This range data can be supplied by techniques like LiDAR, laser scanners (using time of flight, triangulation or interferometry), white-light digitizers and any other technique that scans an area and returns x, y, z coordinates for multiple discrete points (commonly called "point clouds"). Photos can clearly define the edges of buildings when the point cloud footprint can not. It is beneficial to incorporate the advantages of both systems and integrate them to create a better product.
A 3-D visualization can be created by georeferencing the aerial photos and LiDAR data in the same reference frame, orthorectifying the aerial photos, and then draping the orthorectified images on top of the LiDAR grid. It is also possible to create digital terrain models and thus 3-D visualisations using pairs (or multiples) of aerial photographs or satellite (e.g. SPOT satellite imagery). Techniques such as adaptive least squares stereo matching are then used to produce a dense array of correspondences which are transformed through a camera model to produce a dense array of x, y, z data which can be used to produce digital terrain model and orthoimage products. Systems which use these techniques, e.g. the ITG system, were developed in the 1980s and 1990s but have since been supplanted by LiDAR and radar-based approaches, although these techniques may still be useful in deriving elevation models from old aerial photographs or satellite images.

## Applications

Photogrammetry is used in fields such as topographic mapping, architecture, engineering, manufacturing, quality control, police investigation, and geology. Archaeologists use it to quickly produce plans of large or complex sites, and meteorologists use it to determine the wind speed of tornados when objective weather data cannot be obtained.
It is also used to combine live action with computer-generated imagery in movies post-production; The Matrix is a good example of the use of photogrammetry in film (details are given in the DVD extras). Photogrammetry was used extensively to create photorealistic environmental assets for video games including The Vanishing of Ethan Carter as well as EA DICE's Star Wars Battlefront.
A somewhat similar application is the scanning of objects to automatically make 3D models of them. Some programs like 3DF Zephyr, RealityCapture, Acute3D's Smart3DCapture, now part of Bentley Systems and renamed ContextCapture, Pix4Dmapper, Photoscan, 123D Catch, Bundler toolkit, PIXDIM, and Photosketch have been made to allow people to quickly make 3D models using this photogrammetry method. It should be noted though that the produced model often still contains gaps, so additional cleanup with software like MeshLab, netfabb or MeshMixer is often still necessary.
Photogrammetry is also commonly employed in collision engineering, especially with automobiles. When litigation for accidents occurs and engineers need to determine the exact deformation present in the vehicle, it is common for several years to have passed and the only evidence that remains is accident scene photographs taken by the police. Photogrammetry is used to determine how much the car in question was deformed, which relates to the amount of energy required to produce that deformation. The energy can then be used to determine important information about the crash (such as the velocity at time of impact).

## Software

* Meshroom OpenSource Photogrammetry Software for Window, Linux
* Regard3D OpenSource Photogrammetry Software for Linux, Windows, Mac -
* OpenDroneMap - Installation of Dockers CE to be installed.
* VísualSFM - currently no simple installers for Linux, Windows, Mac (Advanced Users)
* There exist many software packages for photogrammetry; see comparison of photogrammetry software.

## Organisations

* International Society for Photogrammetry and Remote Sensing (ISPRS)