Python scripting

Questions related to Python API in Metashape Professional

Where to find general Python scripts for Metashape (PhotoScan) Professional
Python scripts for Agisoft Metashape Professional 1.5+ (and PhotoScan Professional 1.3, 1.4) are available in GitHub repository:  Python scripts for Met...
Thu, 10 Feb, 2022 at 12:39 PM
How to run the script in headless mode from the command-line
To run the script from the command line without using Agisoft Metashape Professional GUI you need to use "-r" argument, like in the examples below...
Thu, 10 Feb, 2022 at 12:42 PM
How to run Python script automatically on Metashape Professional start
In order to execute the script automatically when Agisoft Metashape Professional instance is run you need to place Python script to the following folder: ...
Thu, 10 Feb, 2022 at 12:55 PM
How to install external Python module to Metashape Professional package
To install an external Python module to the package provided with Agisoft Metashape Professional it is necessary to perform the following single-line comman...
Thu, 10 Feb, 2022 at 12:53 PM
How to install Metashape stand-alone Python module
The stand-alone Metashape Python module allows to integrate Metashape functionality to the custom scripts without a need of full application installation. ...
Fri, 11 Mar, 2022 at 6:30 PM
How to calculate estimated Exterior Orientation parameters for the cameras using Python
The example that shows how to calculate the exterior orientation parameters (location and orientation angles) for the aligned camera in the chunk is availab...
Thu, 10 Feb, 2022 at 1:16 PM
How to select fixed percent of the points (Gradual Selection) using Python
The following example shows how to use Python API for selection of the sparse cloud points similar to Gradual Selection option in GUI.  The example show...
Thu, 10 Feb, 2022 at 1:21 PM
Script with general processing workflow
Processing of aerial images with Metashape Professional includes the following main steps: Add Photos Align Photos Build Dense cloud Build DEM Build O...
Thu, 10 Feb, 2022 at 1:23 PM
How to make Python interpreter to use Metashape module
PyCharm makes it possible to use the virtualenv tool to create a project-specific isolated virtual environment. The main purpose of such virtual environment...
Thu, 10 Feb, 2022 at 1:27 PM
Function .buildDenseCloud() doesn't work anymore in 1.5
Starting from the version 1.4 the dense cloud generation task has been split into two parts - depth maps generation and dense cloud generation:
Thu, 10 Feb, 2022 at 1:28 PM