agisoft-metashape-planetscope-automation
Automated processing pipeline for PlanetScope image pairs using Agisoft Metashape. This script performs camera alignment, depth map generation, and Digital Surface Model (DSM) export.
https://github.com/ccgeoinformatics/agisoft-metashape-planetscope-automation
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.9%) to scientific vocabulary
Repository
Automated processing pipeline for PlanetScope image pairs using Agisoft Metashape. This script performs camera alignment, depth map generation, and Digital Surface Model (DSM) export.
Basic Info
- Host: GitHub
- Owner: ccgeoinformatics
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 26.4 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Automated Agisoft Metashape Processing of PlanetScope Image Pairs
Description
This script automates the processing of PlanetScope image pairs in Agisoft Metashape. It loads image pairs whose file names are listed in a CSV file, adds them to a Metashape document, and performs various processing steps, including camera alignment, depth map generation, and DSM (Digital Surface Model) export. By default, the script uses the "NIR" band as the primary channel, but this can be changed as needed.
Requirements and Compatibility
- Python version: 3.x
- Agisoft Metashape version: 2.0 or higher
- Metashape Python Module: Must be installed. Download from Agisoft. For installation instructions, refer to the installation guide.
Preparations
- Create
imagepairs.csvwithout column names. This file should have 3 columns:- Column 1: Pair number
- Column 2: Image 1 filename
- Column 3: Image 2 filename
Refer to the sample CSV file included with this script for formatting.
- Prepare Image Folder: Create a folder named "images" and copy all required image files (.TIF) and their associated RPC text files into this folder.
Usage
- Ensure that Agisoft Metashape is installed on your system.
- Place the script in the same directory as the
imagepairs.csvfile and the "images" folder. - If processing large batches, create multiple CSV files (e.g.,
imagepairs_batch1.csv,imagepairs_batch2.csv). Number pairs continuously across batches to avoid overwriting outputs. - Start Agisoft Metashape. If using a dedicated GPU, configure Metashape to use it:
Tools→Preferences→GPU. - Run the script within Agisoft Metashape:
Tools→Run Script. - For multiple batches, update the CSV file name in the script accordingly.
Important Notes
- Running the Script Outside Metashape: The script can run independently of Metashape, but issues may arise during report export. Running within Metashape is recommended.
- Coordinate System Selection: During initial processing, the script prompts for manual coordinate system selection. For some applications, a geoid-based vertical coordinate system (VCS), such as EGM2008, maybe necessary. For instructions on custom CRS setup, refer to this guide. To skip custom VCS, set
new_crs = Metashape.CoordinateSystem("EPSG::32651")(change to your desired EPSG number). - Error Logging: Check
error_log.txtafter each run for any errors.
Author
Jojene R. Santillan
Email: jrsantillan@carsu.edu.ph, santillan@ipi.uni-hannover.de
Date: 13 November 2024
Owner
- Name: Jojene Santillan
- Login: ccgeoinformatics
- Kind: user
- Repositories: 1
- Profile: https://github.com/ccgeoinformatics
GitHub Events
Total
- Release event: 2
- Push event: 9
- Create event: 4
Last Year
- Release event: 2
- Push event: 9
- Create event: 4