Using Photogrammetry Well
Last revised January 2025. Notes below are based on my own use of photogrammetry toolsets over the last ten years. This includes scanning trees, buildings, people, tools and many other things. The page is in continuous development. Its main function is as a resource for students working with me, but I hope others may find it helpful. Corrections and suggestions always welcome by email to zacharymollica@gmail.com.
PHOTOGRAMMETRY IN GENERAL
- DEFINITION – Photogrammetry (PGT) is a broad term for techniques to obtain and digitize reliable information about physical things. This is done by recording, measuring and interpreting photographic images with the help of clever software packages. Typically the output is a 3D mesh or pointcloud object.
- NOT TO SCALE – Unlike laser based scanning processes, models that are generated by PGT are not automatically to scale. These models will be three-dimensionally accurate, but markers and other scaling devices are required to produce a model whose dimensions can be relied on.
- COORDINATE SPACE – Many PGT tools will allow processing in either cartesian or coordinate space. My work commonly uses cartesian space (working in meters). Coordinate space is more commonly used for drone scanning or other large area applications. To check your model space in MetaShape: navigate to the ‘Reference’ pane, and find the ‘Settings’ icon near top where you will be able to select between WSG and M.
- USE A GPU – Not every stage of PGT processing employs them, but in general, PGT work is greatly improved by the application of a dedicated GPU of at least 4GB. More is better in this area. In MetaShape you will want to ensure your GPU is selected to be used. Navigate to ‘Tools > Preferences > GPU’, and ensure that your GPU is selected or it will sit there queitly.
STARTING A PROJECT
- USE A STRUCTURE – Most PGT programs work with some kind of database structure of file saving (i.e. not just one file) and reference other files into your project. If original images are lost, you may not be able to reopen or reuse a previously made project. As such I recommend establishing your own standard project folder structure and applying it rigorously.
- SAVE REGULARLY – This applies to all work with large 3D scans. Even when things are going well, your tools will on occasion crash, and its better to lose less when this happens.
TAKING GOOD PGT PHOTOS
- HAVE A STRATEGY – Don’t shoot ad hoc. When taking photographs of a subject, work methodically and think through the sequence of photos you are about to take beforehand. Put yourself in the shoes of the software that will try to align these photos. For simple scans, it is generally sufficient to create a sphere or hemisphere of photo placements. More complex subjects require more complex shooting patterns.
- FRAGMENTARY IS OK – no photos need to cover the entirety of an object. This may produce good results, but what is necessary is for some photos to cover all of a subject.
- SAME FOCAL LENGTH – All photos should be taken with the same focal length for a project, ideally with a fixed length lens. If this is not available or best, then use one extreme of a variable lens (i.e. with 18mm or 55 mm in the case of 18-55mm lens) to ensure repeatability. In some cases there are reasons to use multiple lens, but this should be done noting difficulties in later processing.
- RADIAL ARRANGEMENT – if photographing in a circle around a subject, you will require a minimum of 8 station points (i.e. 45 degree rotate). This is still low, and 12 is better practice (30 degree increments)
- EXACT POSITIONING – While a strategy is needed, photographs don’t need to be taken at exactly equal distance/rotation intervals.
- OVERLAP – Aim for 50% overlap with neighbouring photos. In areas of significant geometric change – for example turning a corner in a hallway or entering a doorway – consider taking additional photographs
- NUMBER OF PHOTOS – PGT processes will run with as large a photoset as you have hardware to achieve. Some rules of thumb: 24 photos is about the minimum to achieve a full one sided scan of a simple subject. 60 is a good average number for a full two sided coverage. Around 150 photos a projects begins to become heavy to run on less powerful computers. Over 1500 is a very big project.
- BE PERPENDICULAR – All parts of a subject must have photos taken roughly perpendicular to them in order to produce quality results. If an object is covered within photos, but only obliquely, it will produce lesser results.
- ORIENTATION – Most photogrammetry is done with landscape oriented photographs and some software will suggest this. Portrait orientation is also able to produce quality results, but in general avoid including both within a project.
- MINIMAL PREPROCESSING – Until experienced with the tools photos take should be brought directly into Metashape without for example masking in Photoshop. Working with raw files is an exception to some of this.
- CONSISTENT COLOURING – After good coverage, the principle goal in PGT photographs is to achieve consistent colouring and lighting within scenes. This aids alignment, model generation and particular texturing. In general, to do this you want to balance setting a low ISO number and high F-stop number. I tend to adjust shutter speed to achieve this. A tripod and various lighting arrangements can be beneficial.
- CONSISTENT FOCUS – By setting a higher F-stop (noted in point xx) you ensure that a larger area of each photograph is in focus.
- TRIPOD - When available and suitable a tripod will generally contribute to better PGT photographs by enabling a slower shutter speed to be used without a noticeable loss of focus.
- VIDEO - Some PGT software will allow direct import of video files. For many scenarios this data will prove sufficient, but you should inspect exported frames for motion blur if experiencing difficulty.
- WEATHER – A bright overcast day is ideal for photogrammetry, producing minimal direct/hard shadows in scenes/subjects. Where possible attempt to avoid direct sun, particularly cameras facing towards the sun.
- LOOK UP AND DOWN – multiple angles taken from each station point you are photographing from. Particularly in the case of scene/environment scans rather than object.
- NO WHITE – a plain white wall is among the hardest subjects you can try to capture. In general, this may produce the outlines of the wall without its middle. The same applies to all objects with minimal surface detail/complexity.
- NO MOVING PEOPLE/CARS – an ideal scene has no changes occurring in it between photographs. Where this can’t be avoided, masking should be done before alignment processing.
- ADDING PHOTOGRAPHS – if during initial processing you realize that you have missed key areas, new photos can be taken and added so long as the scene has not significantly changed. Aligning these photos without resetting everything requires some advanced experience.
- FISHEYE? – when using a fish eye or similar super-wide views lens, further adjustments may be needed in settings dialogue: ‘Tools’ > ‘Camera Calibration’
- MOVE AS YOU GO – not just orbiting many directions from one sensor position.
- TURNTABLE – When scanning smaller objects, it is possible to maintain a stationary camera and instead rotate your object on a turntable. This is an advanced use case and requires different settings in each software package.
GENERAL PIPELINE FOR A PROJECT (Metashape)
- capture photographs
- transfer to computer for processing
- (optional) apply some initial photo stacking/adjustment from raw photos
- set up folder structure to keep Metashape project file separate from your photos
- import photos to Metashape by either dragging in, or selecting ‘Workflow’ > ‘Add Photos’
- with all photos added, it is good practice to inspect each briefly, looking for bad exposures, duplicates or similar that should be removed/disabled.
- (optional) masking photos can be done to remove moving or otherwise bad subjects. Not necessary for all projects, it can be used to produce very high quality results.
- Workflow > Align Photos. For most projects, a setting of ‘High’ will be sufficient. Lower can be used if computing is limited, highest will sometimes improve results if time is available. Default setting of 40,000 and 4,000 for key and tie points are good for many scenes. Adjust and experiment.
- Tie points – the sparse cloud produced after initial alignment is a model of the points used to align your photos. While sparse, it should look like your scene/subject.
- (optional) duplicate chunk in case steps below cause you to lose information you want to maintain.
- Realign – if results are not desirable, the above step can be rerun. Make sure to check off ‘reset current alignment’
- (optional) optimize tie points. Tools are available to remove some of the noise present in initial alignment. Not necessary as a step and potential harmful when using low quality photos.
- (optional) in some cases you may skip directly to Workflow > Build Mesh where you can use ‘Depth Maps’ to process a model directly from the photo alignment. More typical for my work is to first process a point cloud.
- Adjust scene ‘Region’. This box will set the area for point clouds and meshes to be computed in. This can speed up processing significantly by limiting to critical area, and may result in missing pieces of subject if not adjusted correctly.
- Workflow > Build Point Cloud – start from lowest setting and work upwards to learn. Enable point colours and confidence for most scans as these are minor increases to processing time
- (optional) cleanup point cloud using selection tools in navigation
- (optional) to process this cloud into a mesh, select ‘Workflow > Build Mesh’, and then select ‘Point Cloud’ rather than ‘Depth Maps’ for source.
- (optional) clean up mesh. Using selection tools to identify and then delete undesired areas.
- (optional) use ‘Workflow > Build Texture’ to build a renderable mesh if a more photorealistic texture of the model is desired.
- adding markers and scalebars can be done at any stage before exporting.
- export points clouds, meshes, or other information by right clicking in the left sidebar, or navigating to ‘File > Export’
- Import to Rhino or your preferred further modeling/drawing tool!
ALIGNING PHOTOS (Metashape)
- MASKING - does not necessarily make a huge reduction to processing time. It does typically improve quality by limiting scene area.
- GOOD PHOTOS MAKE GOOD ALIGNS – the best way ultimately to improve a photoset that is not aligning well is to reshoot the scene if this is possible/reasonable. Where it is not, there are lots of small variations to try.
- RUN QUALITY – Align photos and the other critical steps in MetaShape can be run at one of five quality settings. These are listed as lowest to highest or lowest to ultrahigh. In general, a higher quality run will produce better results, but this is not always the case. For example, running a highest quality alignment attempt on poor quality photos may result in worse results than high. I relate this to the computer ‘overthinking’ the problem.
- KEY POINTS
- TIE POINTS
- OTHER SETTINGS
- OPTIMIZE CAMERAS - link to dino man as credit here for a better explanation
BUILDING POINT CLOUDS (Metashape)
- LOW TO START – in most cases its worth running a fast process of a point cloud first. Use this to check your region is correctly adjusted…
- BAD DATA OK – The presence of some bad data in a model does not imply that all data is bad. Likely this is the result of a few cameras being of low quality or imperfect alignment. All models should be inspected closely throughout the processing stages.
- MANUAL CLEANING
- CALCULATE CONFIDENCE – I always tick this setting. A quick glance at the point cloud with view settings turned to ‘Confidence’ will rapidly identify areas of best/worst coverage.
- LOW IMPACT – Calculating colours and confidence have minimal impact on processing time.
BUILD MESH (Metashape)
- depth map vs pointcloud
- resource use
BUILD TEXTURE (Metashape)
- mode
- resolution
EXPORTING (Metashape)
- MESH FORMAT – OBJ, PLY,
- POINT CLOUD FORMAT – Exporting to various point cloud formats from Metashape will write clouds with slightly different properties. Some are exported in plain text while others are further encoded. Most commonly I commonly export E57, PTS and XYZ files. Some of these are uncompressed and human readable (XYZ) while other are not due to their compression (E57).
- For exporting meshes, OBJ format is a simple and effective route to Rhino – including exporting models with rendered textures.
- MIS-SCALED ON IMPORT – When importing clouds between programs you may find your data to be much larger or smaller than you anticipate. Typically this will be by a factor of 1000 in one direction or another due to a mismatch of units (mm vs m). A good trick is to scale the model up or down by 1000 with reference to the model’s origin (0,0,0).
PROGRAM LINKS
- MetaShapePro – Agisoft’s PGT package remains the one I have had the best consistent results from in both teaching and research work. Its GUI is effective, its stages are intuitive, and it utilizes a lot of your computer’s capacity. Good performance on both MAC and PC. Thought a fully functioning 30-day trial is available, licenses for both educational and professional packages are costly.
- RealityCapture – RealityCapture is another well established program run through a GUI. Recently it has become fully free to use for those not making serious profits off of it. The program is very powerful, though in my own experience is much less intuitive to run than MetaShape. PC Only.
- MeshRoom – Meshroom is a free to use PGT program that I would like to move towards using over time. Its interface has a unique approach to allowing the creation of your own workflows. Compare to MetaShape and RealityCapture, Meshroom is limited in the amount of your computer’s resources it can employ at once and therefore can become slow on larger projects.
- Adobe Substance 3D Sampler – Adobe’s PGT offering is basic but may be of interest to those who already have access through their subscriptions. Not a program I would jump to pay for on its own.
- Point Cloud Library – Point Cloud Library (PCL) is a collection of programming packages that underlies many of the packaged tools in common use. Incredibly powerful to use directly but certainly more advanced to get up and running in this raw format.
- CloudCompare – CloudCompare is a program I would in short recommend to anyone working with point clouds. It is an irreplaceable tool within my workflows on too many projects to list.