Aerial Imagery Processing
These scripts were created to process a time series worth of data in Agisoft Metashape. The GCP selection is done using 'imgTargetList' and 'GCP_Locations' on your own PC because doing it on Agisoft over VPN was lagging hard. The main script is 'Agisoft_Metashape_Processing' which needs to be run from Metashape using Tools -> Run Script.
The install is used to run 'imgTargetList' and 'GCP_Locations'. If it doesn't work just install the packages to whichever enviornment you want one-by-one since there are only a handful. Once you have anaconda installed and envrionment.yml downloaded
Use the terminal for the following steps:
conda env create -f environment.yml
Verify that it installed
conda env list
Activate this environment
conda activate SnowDrones
Install Exiftool onto system
(One way)
change to download/install directory
git clone git://github.com/smarnach/pyexiftool.git
cd pyexif..
python setup.py install
This should be run first. It renames all the images taken with a DJI Mavic Pro so Agisoft can recognize the imported GCP locations correctly. Files simply have the folder they are in appened to the end of the file name.
EX) DJI_0001_100MEDIA.JPG
This script uses GPS coordinates from the image metadata to save a feather database file with all images that theoretically could contain at least one GCP.
The feather file is saved to:
/SNOWDATA/SnowDrones-Processing/<Site>/<Date>/<ImgType>/imgTargets_df.feather
The csv containing GCP locations is expected to be at:
/SNOWDATA/SnowDrones-Processing/<Site>/<Site>.csv
User defines the survey site, image type, main folder path, and which days to process.
This script uses the database of images from imgTargetList.py to open images that may contain GCPs and allow the user to manually define the center of the target pixel for each image to import into Agisoft Metashape.
Images database is expected to be at:
/SNOWDATA/SnowDrones-Processing/<Site>/<Date>/<ImgType>/imgTargets_df.feather
CSV file to read into Agisoft:
/SNOWDATA/SnowDrones-Processing/<Site>/<Date>/<ImgType>/GCPwithImageLocations.csv
User defines the survey site, image type, main folder path, and which days to process.
This script is used to semi-automate the Agisoft processing workflow. It's completely configurable and allows for consistent processing parameters between surveys. It can also be used for sensitivity testing of parameters.
The csv containing GCP locations is expected to be at:
/SNOWDATA/SnowDrones-Processing/<Site>/<Site>.csv
CSV file with GCP center pixel defined for each Image at:
/SNOWDATA/SnowDrones-Processing/<Site>/<Date>/<ImgType>/GCPwithImageLocations.csv
User defines the survey site, image type, main folder path, days to process, and Agisoft processing parameters and output.
- Accuracy (for photo alignment)
- Key Points
- Tie Points
- Filtering
- Tie-Point Quality Settings
- Image Quality Filter
- Default: True
- Removes images with less than 0.5 image quality
- Optimizes cameras and compensates for rolling-shutter
- Reduce Errors
- Reconstruction Uncertainty
- Default threshold = 10
- At most will remove up to 50% of the original points
- Threshold goes up by 1 until no more than 50% of original points are removed
- Projection Accuracy
- Default threshold = 2.0
- Tries to remove up to 50% of the remaining points
- Threshold goes up by 0.1 until no more than 50% of points are removed
- Max Threshold is set to 5.0 at which it will remove all points above that criteria even if it's more than 50% of the points
- Reprojection Error
- Default threshold = 0.3
- Threshold goes up by 0.01 until 20% or less of the remaining tie-points are removed
- Reconstruction Uncertainty
- Image Quality Filter
- Quality (for dense cloud)