Skip to main content

A georectification tool for alpine landscape photographs, written in Python

Project description

alproj

A simple georectification tool for alpine landscape photographs.

Documentation 日本語ドキュメント paper

GUI Version

For an interactive experience without writing code, check out alproj-gui — a desktop GUI application for georectification powered by alproj, built with Tauri.

Overview

alproj is a simple python package for geo-rectification of alpine landscape photographs.
alproj has 3 steps for geo-rectification of landscape photograph.

  1. Setting Ground Control Points (GCPs) in target photographs, using simulated landscape images rendered with Digital Surface Models and airborne photographs.

  2. Heuristic estimation of camera parameters including the camera angle, field of view, and lens distortions (shooting point of the photograph is required).

  3. Perspective reverse projection of the target photograph on Digital Surface Model, with estimated camera parameters, using OpenGL.

This project aims to revive alpine landscape photographs in your photo albams, as valuable geospatial data that may reveal the unknown changes of alpine landscape, ecosystem and cryosphere!

Breaking Changes (v1.0.0)

Important: This version includes significant API changes. If you are upgrading from a previous version, please reinstall:

pip uninstall alproj
pip install git+https://github.com/0kam/alproj

Key changes:

  • akaze_match() deprecated: Use new unified image_match() function instead
  • Deep learning matching methods now available via vismatch package (RoMa, LoFTR, LightGlue, etc.)
  • image_match(): Essential/Fundamental Matrix filtering (outlier_filter parameter)
  • image_match(): Spatial thinning for uniform GCP distribution (spatial_thin_grid)
  • CMAOptimizer.optimize(): Added f_scale parameter for Huber loss
  • New LsqOptimizer class for fast local refinement
  • New filter_gcp_distance() function for distance-based GCP filtering
  • New to_geotiff() function for direct GeoTIFF export
  • sim_image() / persp_proj(): Added min_distance parameter for near-field masking

Installation

Requires Python 3.9-3.12

pip install git+https://github.com/0kam/alproj

Optional: Advanced Image Matching

For deep learning-based image matching methods (RoMa, LoFTR, LightGlue, etc.):

pip install "alproj[vismatch] @ git+https://github.com/0kam/alproj"

Quick Start

See example.py for usage.

Acknowledgements

The example photograph is of NIES' long-period monitoring.

Citation

Okamoto, R., Ide, R. and Oguma, H. (2023), Automatically drawing vegetation classification maps using digital time-lapse cameras in alpine ecosystems. Remote Sens Ecol Conserv. https://doi.org/10.1002/rse2.364

@article{https://doi.org/10.1002/rse2.364,
author = {Okamoto, Ryotaro and Ide, Reiko and Oguma, Hiroyuki},
title = {Automatically drawing vegetation classification maps using digital time-lapse cameras in alpine ecosystems},
journal = {Remote Sensing in Ecology and Conservation},
volume = {n/a},
number = {n/a},
pages = {},
keywords = {Alpine ecosystem, deep learning, ecosystem monitoring, ground-based imagery, time-lapse camera, vegetation mapping},
doi = {https://doi.org/10.1002/rse2.364},
url = {https://zslpublications.onlinelibrary.wiley.com/doi/abs/10.1002/rse2.364},
eprint = {https://zslpublications.onlinelibrary.wiley.com/doi/pdf/10.1002/rse2.364},
abstract = {Abstract Alpine ecosystems are particularly vulnerable to climate change. Monitoring the distribution of alpine vegetation is required to plan practical conservation activities. However, conventional field observations, airborne and satellite remote sensing are difficult in terms of coverage, cost and resolution in alpine areas. Ground-based time-lapse cameras have been used to observe the regions' snowmelt and vegetation phenology and offer significant advantages in terms of cost, resolution and frequency. However, they have not been used in research monitoring of vegetation distribution patterns. This study proposes a novel method for drawing georeferenced vegetation classification maps from ground-based imagery of alpine regions. Our approach had two components: vegetation classification and georectification. The proposed vegetation classification method uses a pixel time series acquired from fall images, utilizing the fall leaf color patterns. We demonstrated that the performance of the vegetation classification could be improved using time-lapse imagery and a Recurrent Neural Network. We also developed a novel method to accurately transform ground-based images into georeferenced data. We propose the following approaches: (1) an automated procedure to acquire Ground Control Points and (2) a camera model that considers lens distortions for accurate georectification. We demonstrated that the proposed approach outperforms conventional methods, in addition to achieving sufficient accuracy to observe the vegetation distribution on a plant-community scale. The evaluation revealed an F1 score and root-mean-square error of 0.937 and 3.4 m in the vegetation classification and georectification, respectively. Our results highlight the potential of inexpensive time-lapse cameras to monitor the distribution of alpine vegetation. The proposed method can significantly contribute to the effective conservation planning of alpine ecosystems.}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alproj-1.1.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alproj-1.1.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file alproj-1.1.0.tar.gz.

File metadata

  • Download URL: alproj-1.1.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for alproj-1.1.0.tar.gz
Algorithm Hash digest
SHA256 33bab4ffe81398cc381bac38735de8dbcfc6804d3614f0604e55aea18811ed56
MD5 adcf567f8b84cb6f4da4a05c312ba658
BLAKE2b-256 ec72dda91b97da0c684871020c092ad5ac1edee3b12cbbb21d765c3a66a4bbca

See more details on using hashes here.

File details

Details for the file alproj-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: alproj-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for alproj-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b59cc49965dc6679eb118fcb7c3d1c7ede41d6eb34917ac4d0f9decca6d1bbb8
MD5 c1e5f11d5be492f8c7e3b613b4e77e78
BLAKE2b-256 e7810f01262285e83cfcaecf188bead29f5f159b296169ee5ea07fb23e772d04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page