Skip to main content

Algorithms to register or sets of trees or find correspondences between them

Project description

tree-registration-and-matching

Install

conda create -n tree-registration-and-matching python=3.12 -y
conda activate tree-registration-and-matching

Install poetry

poetry install

Example data

An example benchmark is provided to test registration algorithms and can be downloaded from Box at this link. This dataset consists of data from 232 drone imagery collections and corresponding field reference information. The field reference information was manually registered to the CHM product for each dataset. The data should be downloaded and placed inside of the data folder in this repository (tree-registration-and-matching/data/ofo-tree-registration). You can download a subset of the CHM products to save space and time if desired; all other files are small.

  • CHMs: The drone images were registered together using photogrammetry (Agisoft Metashape). This produces a digital surface model (DSM; top of canopy) and digital terrain model (DTM; bare earth model) for each site. Taking the differece of the two we obtain a raster representing the estimated canopy height model (CHM). This is cropped to a buffer of 50 meters around the region which was surveyed. The data is provided as a geotiff file (.tif) which encodes the spatial location of the data.
  • detected-trees.gpkg: This is a geospatial vector file containing the point locations of individual detected trees. These were identified from the CHM using a variable radius maximum filter, implemented in the Tree Detection Framework.
  • field_trees.gpkg: The locations of trees observed from ground surveys. This is provided as a geospatial vector file where each point represents a single tree. Many attributes from the field survey are provided but are not used in most registration approaches. The dataset_id field denotes which CHM the tree should be paired with and the height field represents the field-measured height (m). The data has undergone some pre-processing to reduce it to only trees that are expected to be visible from above. First, all trees that are dead (live_dead == 'D') are removed since dead trees are reconstructed poorly by photogrammetry. Then trees are removed if they are likely to be under another larger tree. Starting with the tallest tree, any shorter trees are removed if they are within 1 + 0.1 * height (m) of the tall tree. This process is repeated for all trees from tallest to shortest. Finally, height is imputed for all trees that do not have a field-measured value. This is done using an allometric equation fit on the diameter at breast height (DBH) value which is recorded for all trees. Using the trees in the dataset which have both DBH and height we fit the following allometric function: $H = 1.3 + e ^ (-0.314 + 0.846 log_e(DBH))$ to find the height in meters.
  • plot_bounds.gpkg: The region surveyed in field represented as polygon vector data. The dataset_id column denotes which CHM and field trees the data should be paired with.
  • shift_quality.json: This is a mapping from dataset_id to a number from 1-4. The latter is a quality score, with 4 being the highest. This takes into account how accurate the field survey appeared to be when compared to the CHM data. Furthermore, it also represents how confident a human annotator was in finding the correct shift for that dataset.
  • shfts_per_dataset.json: All of the field trees and plot bounds have been shifted so that they align as well as possible with the CHM, as determined by a human annotator. This shift, represented as an (x, y) shift in meters in the EPSG:26910 coordinate frame, represents how much the data needed to be shifted by. Since the provided trees and plot bounds are already shifted, you must apply the negative of this value to get the initial location of the trees and plots.

Running real-world examples

Using the data described here, you can run both the examples/example_registratiration_real_data_CHM.ipynb and examples/example_registration_real_data_MEE.ipynb notebooks. The first one is a canopy height model (CHM) approach which computes the correlation between the field-measured heights and the corresponding location on the CHM. The latter uses trees detected from the CHM and tries to match these to the observed trees.

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

tree_registration_and_matching-0.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

tree_registration_and_matching-0.1.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file tree_registration_and_matching-0.1.0.tar.gz.

File metadata

  • Download URL: tree_registration_and_matching-0.1.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Linux/6.17.0-14-generic

File hashes

Hashes for tree_registration_and_matching-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42bc10eab8edc3bebf392812954bf453a5c50e427b862c5b124f8918b17a7c82
MD5 d0c6e7ea50b2d80481b0969a282a7d6b
BLAKE2b-256 77116544b82aba2c9256a7f2b4aa2597c4f874a7514d13668858c1609e69bbdc

See more details on using hashes here.

File details

Details for the file tree_registration_and_matching-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tree_registration_and_matching-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9fd9932b6018f686281f034b0caf08f201ff34cc0ad2927a2a888ba4089ad20
MD5 f52cfdcf171c5e5cc004d062f9495263
BLAKE2b-256 33b6e41ef743d8c14d5109cf013dc4160cdbe732863fbdeb3c38fc8c7d8289f8

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