Agisoft PhotoScan - Tips and Tricks
This page contains practical advices on the use of PhotoScan, as well as other information that may be useful to the users.
- Zenithal and/or obliques?
It is better to capture only zenithal photos, yet the obliques ones are processed correctly by PhotoScan and almost do not influence the quality of the reconstruction results. If you have an excessive set of photos, you can exclude oblique photos from processing. It could slightly improve the results.
- What is the basic principle behind PhotoScan matching strategy?
PhotoScan searches for interest points on every image and studies the local neighborhood of every point found. Then it matches interest points based on their local neighborhood comparison. In general, it's quite a common approach. However, PhotoScan implements a number of special solutions that result in high accuracy of photo alignment step result.
- Most photos aligned well, but a few photos failed to align properly. Can I locate them manually?
Incorrect photo alignment is usually a result of poor overlap or insufficient amount of texture details on the object surface. In this case additional tie-points can be specified manually by placing markers. The procedure is the following: - after all the photos are aligned, select poorly aligned photos on Workspace pane and from the context menu select Reset Photo Alignment command; - place markers on photos (use guided approach described in PhotoScan User Manual) - both aligned and "bad" photos; - select all "bad" photos on Workspace pane and from the context menu select Align Selected Photos command. Inspect the result. Has it helped?- No? - You need to capture better image set.
- The results of photo alignment step are poor:( What could I do? (A significant amount of photos was not aligned or the alignment results are wrong)
The problem could be caused by the lack of overlap between the photos. So, the primary advice is to capture more photos providing greater overlap (much better excessive than poor). Also remember that textured background could be helpful at photo alignment step. If it is impossible to optimize taking photos procedure, you can try to improve photo alignment using markers as perfect matches.
- Can I improve the alignment results for a fixed multi camera rig? Will Agisoft Lens be of any help?
Agisoft Lens can be used to calibrate individual cameras, so that more accurate calibration information is available. Agisoft Lens will not help to precalibrate camera locations and orientation.
The better solution in this case (if the cameras are statically mounted and don't move) will be the following one:
1. Place an object with good texture details that is known to align well and capture the photo set.
2. Align the photos and then optimize camera locations/calibrations for better accuracy using Optimize button from the Ground Control pane toolbar.
3. Export refined camera locations and calibrations using Export Cameras... command.
The calibrated camera locations saved can be reused later for different objects which are otherwise hard to align. This can be done as follows:
1. Capture the photos to be processed
2. Import precalibrated camera locations using Import Cameras... command instead of using Align Photos...
3. When asked to build point cloud select desired accuracy.
4. Proceed to other processing steps (skipping Align Photos).
Please note that even for a fixed multicamera rig slight camera movement can occur over time (due to vibrations, etc). Thus repeating of the precalibration procedure may be required periodically.
- I used the optimization of the point cloud, with the default values (camera = 10 px, marker accuracy = 0.001 m, marker placement = 0.1 px). In fact, my marker accuracy is rather about 0.01, and the placement about 0.5 px (or more), while I have no information about the camera position. In this case, would it be better to set the parameter to 10, 0.01, 0.5 ?
It is recommended to set higher values for accuracy parameters. The reason is the following: There are many points in the cloud, which means that the corresponding sum in the function to be minimized at optimization stage includes too many items. Consequently, to avoid overlapping of the other sum (refers to geographical error) by this sum (refers to reprojection error) it is needed to set higher values for the corresponding accuracy parameters (they refer to geographical error sum). The marker accuracy is recommended to be set at 0 value if the real marker accuracy is within 0.02 m. In this case markers would be excluded from function to be optimized, which is reasonable, since usually their accuracy surpasses the rest.
- What is the difference between processing at the medium, high and ultra high quality settings?
Quality parameter controls the density and accuracy of the raw photogrammetric point cloud used for mesh generation. Higher density of the point cloud helps to maintain more fine level details of the modeled surface. With each higher quality level the density of the points increases 4 times, while accuracy of individual points increases 2 times.
- What does the Face Count parameter mean? Can I skip decimation step and do it manually?
Face Count parameter specifies the maximum number of faces in the final mesh. In Arbitrary mode the ‘0’ face count can be specified to disable decimation, that reduces the processing time (since time consuming operation is missed) and it could prove to be crucial if the system was working near the resource limit.
In Height-field mode the 0 face count setting corresponds to the optimal number of faces rather than maximum possible face count. Thus setting the face count to a larger value in Height-field mode can be used to produce more faces than in the case of 0 setting.
Decimation can be performed later using the corresponding command from Tools menu.
- On some ortophotos especially created from complicated 3D surface models I see many mistakes (same places are streched same twirled). I would like to have tool that will repair those places.
You can try generating 3D model in Point Cloud target quality and exporting orthophoto based on this model. If there is now strict requirement oncgeoreferencing accuracy, this choice could help you to avoid extra mistakes on orthophoto as Point Cloud model is much softer than all the alternatives.
- How to improve texture resolution?
The quality of texture could be defined during Build Texture stage. Mostly it depends on the texture atlas size and the quality of the original images. Also sometimes selecting Mosaic blending mode could provide much better results than processing in Average mode. Another tip is to disable blurred photos and photos which alignment is not good before building the texture.
In some cases manual UV-mapping can help to improve the atlas space utilization and therefore the quality of the final texture. For this purpose PhotoScan supports exporting of the generated mesh for UV-mapping in external software and then importing back the UV-mapped mesh for texture generation.
- What export option should be selected for compatibility with Google Earth? So far no output seems to be compatible even though the types are compatible. For example Google Earth fails to load an exported Orthophoto in GeoTiff format.
Standard version of Google Earth doesn’t support extraction of georeferencing data from GeoTIFF files. Google Earth Pro is required to load GeoTIFF files directly. With free Google Earth version you can still load georeferenced images if the .kml file with georeferencing information is provided. To save .kml file along with the orthophoto image you need to check Write KML file option in Export Orthophoto dialog in PhotoScan. Georeferencing information will be duplicated in a KML file to make it possible for Google Earth Standard version to read it. You could also opt for Export Google KML option from the very beginning (File - Export Orthophoto - Export Google KML). Note that this option is active only if the model was georeferenced in WGS 84 datum. In fact, Google Earth is able to georeference models only in WGS 84 datum.
- I was trying to open .kml files connected with obj, vrml and ortophotomaps in google earth, but they take me to incorrect place. Everything works ok with exporting orthophoto to google kml file. I have WGS 84 coordinates UTM 36n.
Google Earth deals only with COLLADA format, so you need to export your model in this very format to be able to locate it on Google Earth. Moreover, you need to select Local Coordinates value for the parameter Coordinate System in Export Model dialog for Google Earth to locate your model correctly. As for the orthophotomaps, you need to select WGS 84 Coordinate System in Orthophoto export dialog as Google Earth can deal only with this system. Do not specify UTM.
- What options should be selected to get the highest resolution for both orthophoto and DEM?
Orthophoto Export parameters to achieve highest resolution will be: Blending Mode - Mosaic. We recommend to check fill holes option to generate holeless orthophoto. Note that default value for pixel size in Export Orthophoto dialog refers to ground sampling resolution, thus, it is useless to set a smaller value: the number of pixels would increase, but the effective resolution will not. The default pixel size for DEM export corresponds to the effective resolution of the generated surface, which in turn depends on the Quality setting specified in the Build Geometry dialog. If DEM with higher resolution is required, you will need to rebuild geometry with higher quality setting.
- I understand (from inspection) that the quality of the images is different, but how does that translate to the DEM data that is created? Do the lesser types of rendering use interpolation?
In fact, the question is about the value of the Target Quality parameter on building geometry step. The lower the quality the less faces are in the resulting model, that means lower effective resolution of the model and, as a result, the lower effective resolution of the corresponding DEM. At DEM exporting stage interpolation is always used.
- Is there any way to reduce file size of exported orthophotos?
PhotoScan uses LZW compression for GeoTIFF files. It is a lossless type of compression, which guarantees no loss in image quality due to compression.
Smaller file size can be achieved by exporting orthophoto in JPEG format. It has better compression rate at the expense of slight quality degradation of the final images. When exporting orthophoto in JPEG format georeferencing information needs to be exported in a separate world file, as JPEG format doesn't support embedding of georeferencing information inside image files.
- How many GCPs are needed?
9-10 markers are required to fulfill the georeferencing task. Several extra markers would add to accuracy of georeferencing. Each marker should be placed on every photo it is visible on. The most reasonable way to achieve the goal is to use guided marker placement approach (see PhotoScan User Manual) and then complete the refinement procedure (see PhotoScan User Manual).
- Could I georeference the model without ground control data?
In fact, model could be (and in PhotoScan workflow would be) (geo)referenced according to camera locations data only. However, camera coordinates are not precise enough to get high accuracy geofererencing. Moreover, this low accuracy data could effect the quality of the model allowing for bowl effect, for example. Markers coordinates data is generally more precise, that allows to recalculate camera positions and build geometry relying on more accurate data. Markers also guarantee better georeferencing of a model.
- The error in the ground control dialog seems to be huge (80000)
Most likely you are specifying the ground control coordinates in the wrong order. PhotoScan assumes that X axis corresponds to longitude/easting and Y to latitude/northing.
Thus the proper order of coordinate values is Longitude/Latitude/Altitude. If they are specified in the wrong order, i.e. Latitude/Longitude/Altitude, the georeferencing error
can increase and the results will be mirrored.
Also it makes sense to check if the coordinate system is defined correctly in Ground Control settings.
- Yaw, pitch, roll VS omega, phi, kappa
Both sets define transformation between image coordinate system and georeferenced coordinate system. However, this georeferenced system is defined in different ways. If we are speaking about yaw, pitch, roll than we have in mind local tangent plane; in case we are using omega, phi, kappa the reference system is UTM projection. Most airborne measuring systems work with and save yaw, pitch, roll angles. That's why it's easier for the user to import the data into PhotoScan in this format. Measuring equipment - PhotoScan compatibility task fulfilled. On the other hand, GIS systems operate with omega, phi, kappa angles. Consequently, to comply with GIS standards it's reasonable to export estimated camera orientation data in this format.
- I want to use a coordinate system with prime meridian of 109 deg 30 min, how can i do it?
If you know the EPSG code of the system you can filter by it in Ground Control Settings -> Select Coordinate System dialog. Otherwise, you need to import custom coordinate system. To import the system you need a .prj file with your coordinate system description in wkt format. If you do not have such a file, the easiest way to create it is to export from PhotoScan a file of a system that reflects your system most of all. To export it use Save button on the Ground Control pane toolbar. Once exported you can open the file and edit it so as to describe your coordinate system. Then you can import the system to PhotoScan.
- Is there a way to work in a Y up world?
If you are working in local coordinates, all three axis are equal. So you can choose the up axis as you like. The only restriction in PhotoScan is that the triple should be right-hand. If it the case of geographical coordinates, only the Z axis could be considered the up one
- How many markers do I need for marker based chunk alignment?
At least 3 markers within the chunk overlap area, providing that they have the same name in reference chunks.
- It's hard sometimes to view 3d model especially when I want to see something closer. When I am zooming in the view, sometimes I am transferred behind the model.
Not to lose sight of the model (particular part of it) while zooming in, firstly, you need to align the model with the center of rotation so that the area you would like to see closer coincide with the center of rotation. To move the model within the Model view window press right button of the mouse and drag the model.
Building geometry step usually has the largest memory footprint, especially if the model is constructed in the Medium or High quality, and should be carefully taken into account. For aerial photography processing PhotoScan implements a special Height-field processing mode, which is highly optimized for this kind of data. It allows to process much more photos (several hundreds or thousands), than it is possible using Arbitrary mode.
Memory consumption during photo alignment is typically lower, but can be comparable or even exceed the amount of memory required for model building in Point Cloud mode, or in Low quality.
- Aligning Photos
Memory consumption during photo alignment depends mainly on the number of photos being aligned, and practically does not depend on the resolution of individual photos.
|Memory consumption||500 MB||1 GB||2.5 GB||5 GB||10 GB||25 GB||50 GB|
- Building Model (Height-field mode)
Memory consumption in Height-field mode depends on the number of photos, their resolution, selected quality and overlap. Dependency on the number of photos and their resolution is approximately linear.
In the following table approximate memory consumption for 12 MPix photo resolution is listed.
|Lowest quality||25 MB||50 MB||125 MB||250 MB||500 MB||1.25 GB||2.5 GB|
|Low quality||100 MB||200 MB||500 MB||1 GB||2 GB||5 GB||10 GB|
|Medium quality||400 MB||800 MB||2 GB||4 GB||8 GB||20 GB||40 GB|
|High quality||1.6 GB||3.2 GB||8 GB||16 GB||32 GB||80 GB||160 GB|
|Ultra high quality||6.4 GB||12.8 GB||32 GB||64 GB||128 GB||320 GB||640 GB|
- Building Model (Arbitrary mode)
Arbitrary processing mode is designed for processing of compact objects, mainly captured from the ground level. It can be used to process data sets containing up to several hundreds of photos, but typically much less. Memory consumption in Arbitrary mode depends on the number of photos, their resolution and overlap, selected quality level and also on the shape of the object. Dependency on the photo resolution is approximately linear.
Important! For aerial photography processing Height-field processing mode should be used.
In the following table approximate memory consumption for 12 MPix photo resolution is listed. Please note that memory consumption depends significantly on the kind of object being processed.
|Photos||20 - 50||100||200||500|
|Lowest quality||100 MB - 300 MB||150 MB - 450 MB||300 MB - 1 GB||1 GB - 3 GB|
|Low quality||500 MB - 1.5 GB||750 MB - 2.2 GB||1.5 GB - 4.5 GB||4 GB - 12 GB|
|Medium quality||2 GB - 6 GB||3 GB - 9 GB||6 GB - 18 GB||15 GB - 45 GB|
|High quality||8 GB - 24 GB||12 GB - 36 GB||24 GB - 72 GB||60 GB - 180 GB|
|Ultra high quality||32 GB - 96 GB||48 GB - 144 GB||96 GB - 288 GB||240 GB - 720 GB|
- Decimating Model
Amount of memory required for model decimation depends on the initial polygon count only. It does not depend on the target face count, and thus breaking decimation in small steps will not help to reduce memory consumption.
|Memory consumption||128 MB||640 MB||1.3 GB||2.5 GB||6.2 GB||12.5 GB||25 GB||63 GB|
Selection of a suitable hardware platform is extremely important for effective PhotoScan operation. In most cases the maximum project size that can be processed is limited by the amount of RAM available. Therefore it is important to select the platform allowing to install required amount of RAM.
Please check Memory Requirements section above for estimated RAM requirements for the kind of projects you are going to process.
1. Basic configuration (up to 32 GB RAM)
CPU: Quad-core Intel Core i7 CPU, Socket LGA 1155 (Sandy Bridge or Ivy Bridge)
Motherboard: Any LGA 1155 model with 4 DDR3 slots and at least 1 PCI Express x16 slot
RAM: DDR3-1600, 4 x 4 GB (16 GB total) or 4 x 8 GB (32 GB total)
GPU: Nvidia GeForce GTX 580 or GeForce GTX 680 (optional)
2. Advanced configuration (up to 64 GB RAM)
CPU: Six-core Intel Core i7 CPU, Socket LGA 2011 (Sandy Bridge-E)
Motherboard: Any LGA 2011 model with 8 DDR3 slots and at least 1 PCI Express x16 slot
RAM: DDR3-1600, 8 x 4 GB (32 GB total) or 8 x 8 GB (64 GB total)
GPU: NVidia GeForce GTX 580 / GeForce GTX 680 / GeForce GTX 780 / GeForce GTX TITAN
3. Extreme configuration (more than 64 GB RAM)
For processing of extremely large data sets a dual socket Intel Xeon Workstation can be used.