Skip to content

A small program to calculate the volume of the cloud point

License

Notifications You must be signed in to change notification settings

FatemehTarashi/cloud-point

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-point

A small program to calculate the volume of the cloud point from las file

Contents

set up:

We use Python environment variables to avoid configuration issues and etc.

$ python -m venv env
$ source env/bin/activate

To use the program, we navigate to the desired directory with cd!

$ cd Task_Fatemetarashi/

We see four directories:

  • Codes
  • Screenshot
  • Exports
  • Information_Data

Codes

configuration file

Due to the fact that our ".las" file is a part of the whole and because paths are not hardcoded in the program, we have the configuration file cp.cfg

python files

Due to the fact that we have multiple files and probably we want to perform tasks in parallel, as well as the limited power of my laptop, we have several Python files!

readAndPlot

This file contains 2 functions:

plot_las_file

Reads the initial cloud points from the .las file and displays them. like our .las file: cloud point

plot_npy_file

Reads the numpy array cloud points from the .npy file and displays them.

groundDetection

This file contains 3 functions:

threshold_height

It finds the group of the points with the same height, then selects the group that has the maximum member and the lowest height and returns the height of that point.

ground_detection

We use the simplest method, Minimum Height Extraction. This function takes a cloud point and a height (which is basically obtained from the previous function) and recognizes the ground based on that.

For this purpose, you can use other methods such as RANSAC(Random Sample Consensus), PCA (Principal Component Analysis), or Smoothing methods like Moving Average Filtering. I think this method works better for bigger cloud point. ground

non_ground_detection

This function is the opposite of the ground_detection function

statistical_Outlier_Removal_filter

SOR (Statistical Outlier Removal) identifies and removes outlier points based on statistical analysis of the information present in the point cloud.

You can use Voxel Grid Filter, Radius Outlier Removal, or Conditional Outlier Removal. SOR filter

DBSCAN

DBSCAN (Density-Based Spatial Clustering of Applications with Noise). DBSCAN is a density-based clustering algorithm used to detect clusters in heterogeneously distributed data as well as detect noisy points. But, here we return the largest cluster as output! dbscan

shadow

This is probably not a good method, but anyway! It can be said that the shadow of the cloud sticks to it. shadow

triangulation

Creates a triangulation of cloud points triangulation triangulation

volume

It calculates the volume based on ConvexHull, based on ground or height percentage. But, You can calculate the volume based on triangulation with mesh.volume

main

Because this main is not supposed to be the main, no principles have been written, and mostly written for testing functions and working with cloud points. For this reason, many commands are commented!!!

Screenshot

screenshots used in the readme.

Exports

numpy files

Due to the speed and conditions of my system, we have a series of outputs in the form of Python files that are produced in different stages and then used.

afterSOR

numpy array of cloud points after the SOR filter

big_part

numpy array of cloud points after DBSCAN function( DBSCAN filter and choose the largest part

combined_points

numpy array of cloud points after shadow function

stl file

mesh

mesh from triangulation

text file

Volume calculation output

Information_Data

task_rs_pc

The pdf file contains the purpose of this repository, i.e. the problem and its indicators

task_subset

The .las file contains the cloud point, a subset of a larger data cloud.

View

If you are having trouble viewing this file, you can use Grip or similar tools.

About

A small program to calculate the volume of the cloud point

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages