Skip to content

Automated SfM processing of historical aerial photographs.

License

Notifications You must be signed in to change notification settings

friedrichknuth/hsfm

Repository files navigation

Historical Structure from Motion

Automated SfM processing of historical aerial photographs for land surface elevation change detection and quantitative analysis. DOI

Features

Historical Image Preprocessing

  • download imagery from archive url and process in-memory or save to disk
  • automated fiducial marker template detection
  • modular image enhancement and distortion correction functions to optimize SfM processing
  • automated calculation and cropping about principal point
  • exception flow to launch manual fiducial marker selection app
  • various QA/QC routines to enter exception flows and attempt alternate approaches, as well as plot and report final quality of preprocessed images

Historical Camera Recreation

  • pinhole camera model generation given
    • xyz camera center position
    • focal length
    • pixel pitch
    • flight heading
  • alternate flow to launch manual heading selection app

NASA Ames Stereo Pipeline (ASP) Processing

  • wrappers for multiple ASP functions in the SfM workflow
  • cam_gem
  • bundle_adjust
  • parrallel_stereo
  • dem_mosaic
  • point2dem
  • pc_align
  • geodiff
  • use of bare for quality control monitoring during ASP operations

Plotting / Geospatial Analysis Functions and Tools

  • various plotting functions for intermediate and final DEM products
  • convenience wrappers around common gdal operations
  • tool to extract and generate elevation profile along transect

Reference Imagery and DEMs

  • automated SRTM reference DEM download given bounding box
  • automated Google Satellite basemap download as geotif given bounding box

Examples

See notebooks for processing examples.

Installation

Download and install Miniconda

After installing Miniconda set up Mamba (optional but recommended)

$ conda install mamba -n base -c conda-forge

Clone the repo and set up the conda environment

$ git clone https://github.com/friedrichknuth/hsfm.git
$ cd ./hsfm
$ mamba env create -f environment.yml
$ conda activate hsfm
$ pip install -e .

Download and install the NASA AMes Stereo Pipeline

Download and install the Agisoft Metashape Python API

Check your installation

$ cd ./examples/scripts
$ python -u batch_pipeline.py

Contributing

hsfm contains modular libraries and tools that can be adapted to process various types of historical imagery. At this time, many of the methods have been customized to process NAGAP imagery, but can be deconstructed into more generalized upstream methods and classes.

For contribution guidelines and high-level TODO list please click here.

Related software

Historical Image Pre-Processing (HIPP) DOI

NASA Ames Stereo Pipeline DOI

References

Knuth, F., Shean, D., Bhushan, S., Schwat, E., Alexandrov, O., McNeil, C., Dehecq, A., Florentine, C. and O’Neel, S., 2023. Historical Structure from Motion (HSfM): Automated processing of historical aerial photographs for long-term topographic change analysis. Remote Sensing of Environment, 285, p.113379. https://doi.org/10.1016/j.rse.2022.113379

Beyer, Ross A., Oleg Alexandrov, and Scott McMichael. "The Ames Stereo Pipeline: NASA's open source software for deriving and processing terrain data." Earth and Space Science 5.9 (2018): 537-548.

Shean, David E., et al. "An automated, open-source pipeline for mass production of digital elevation models (DEMs) from very-high-resolution commercial stereo satellite imagery." ISPRS Journal of Photogrammetry and Remote Sensing 116 (2016): 101-117.

About

Automated SfM processing of historical aerial photographs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages