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!

Installation

Requires Python 3.9-3.12

pip install "alproj[vismatch]"

This installs alproj with vismatch for deep learning-based matching (70+ methods including RoMa, LoFTR, LightGlue, MatchAnything, etc.).

For a minimal installation without deep learning dependencies (only AKAZE/SIFT matching):

pip install alproj

Camera Models

alproj supports two camera models:

  • Pinhole (default): Rectilinear projection with 14 distortion coefficients (aspect ratio, radial, tangential, and prism). Best for standard lenses.
  • Fisheye ("model": "fisheye"): Equidistant fisheye projection with 4 angle-space distortion coefficients (k1-k4). Better accuracy for wide-angle monitoring cameras (FOV up to ~120°).

To use the fisheye model, set "model": "fisheye" in the camera parameters dict. Omitting the "model" key defaults to pinhole for backward compatibility. See example.py for usage of both models.

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.2.0.tar.gz (53.4 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.2.0-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for alproj-1.2.0.tar.gz
Algorithm Hash digest
SHA256 63eeeca105ccb5c079e5680f716ca5326390df08a9a02b0df50b572d580ddd7a
MD5 a89f4eb8f68276e1f47d1862488dc57c
BLAKE2b-256 ac5e282718ec47c803cc4d4377019d2ac689ff95b455ebee9ba304daff6843fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alproj-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 42.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe694ef03b0f1a15e69fbcce54cb5ffa61d4184063c1cfbb110b2831fa4bec4d
MD5 2e5c92223a218db9a5b29e8dca7ee6bd
BLAKE2b-256 28578edc36376c09cf88ec67c14a3aa7dfd44e2d02f43536980b5032ff177e47

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