Skip to main content

A Python package for point cloud classification using color and curvature

Project description

pymccrgb

Build Status Documentation Status

pymccrgb is a Python package for multiscale curvature classification of point clouds with color attributes.

It extends a popular classification method (MCC lidar) [0] to point cloud datasets with multiple color channels, such as those commonly produced in surveys using drone photography or other platforms. It can be used to distinguish points from the ground surface and low vegetation in data produced by structure from motion photogrammetry, stereo photogrammetry, or multi-spectral lidar scanning, or to filter colorized lidar point clouds.

The intended users are scientists in geomorphology, ecology, or planetary science who want to classify point clouds for topographic analysis, canopy height measurements, or other spectral classification.

Installation

If LibLAS is installed, you can create a virtual environment with conda or venv to install the package and the rest of the dependencies:

git clone https://github.com/rmsare/pymccrgb
cd pymccrgb
conda env create -f environment.yml
conda activate pymcc
pip install .
py.test pymccrgb/tests

Requirements

This package is developed for Linux/OS X and Python 3.6+.

The LibLAS C library is required for MCC and pymccrgb. The MCC wrapper also requires Boost and the C++11 standard library, which are likely installed as system libraries.

On Ubuntu/Debian, you can install LibLAS via apt:

sudo apt-get install liblas-c-dev

On OS X, it is available through Homebrew:

brew install liblas

Refer to the documentation and the LibLAS install guide for instructions for installing LibLAS from source.

Examples

Topography under tree cover

from pymccrgb import mcc, mcc_rgb
from pymccrgb.datasets import load_mammoth_lidar
from pymccrgb.plotting import plot_results

# Load sample data (Mammoth Mountain, CA)
data = load_mammoth_lidar(npoints=1e6)

# MCC algorithm
ground_mcc, labels_mcc = mcc(data)

# MCC-RGB algorithm
ground_mccrgb, labels_mccrgb = mcc_rgb(data)

plot_results(data, labels_mcc, labels_mccrgb)

MCC results

Results of MCC and MCC-RGB on forested area near Mammoth Mountain, CA.

Documentation

Read the documentation for example use cases, an API reference, and more. They are hosted at pymccrgb.readthedocs.io. Example notebooks are available in the docs or at docs/source/examples.

Contributing

Bug reports

Bug reports are much appreciated. Please open an issue with the bug label, and provide a minimal example illustrating the problem.

Suggestions

Feel free to suggest new features in an issue with the new-feature label.

Pull requests

If you would like to add a feature or fix a bug, please fork the repository, create a feature branch, and submit a PR and reference any relevant issues. There are nice guides to contributing with GitHub here and here. Please include tests where appropriate and check that the test suite passes (a Travis build or pytest pymccrgb/tests) before submitting.

Support and questions

Please open an issue with your question.

References

[0] Evans, J. S., & Hudak, A. T. 2007. A multiscale curvature algorithm for classifying discrete return LiDAR in forested environments. IEEE Transactions on Geoscience and Remote Sensing, 45(4), 1029-1038 doi

License

This work is licensed under the MIT License (see LICENSE). It also incorporates a wrapper for the mcc-lidar implementation, which is distributed under the Apache license (see LICENSE.txt).

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

pymccrgb-0.1.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

pymccrgb-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymccrgb-0.1.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.6

File hashes

Hashes for pymccrgb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa1931fbb385702a2d71b8b8361723b2da183fcfa77164701c7efbe38851651d
MD5 ddfdb9a0bd2103a7ff16b8db32d473b0
BLAKE2b-256 b13ffd0a3e0c26f2a2dd11022cf04ac5377aa9f51f2b0379c9985068f0c4ddb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymccrgb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.6

File hashes

Hashes for pymccrgb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f684961d1d6743c240d291cd4e35ffb2f39dc39ee0bb179a88173a10e392d35c
MD5 1406ee18a317229230011490725f089f
BLAKE2b-256 a59a3aecfca57327033148aecb0fe1a7b350faca595fdbd21cee991bbd1ec168

See more details on using hashes here.

Supported by

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