Page 1 of 1

Extracting octree information

Posted: Mon Jun 30, 2014 8:38 am
by rjboothroyd1
Hi CloudCompare forum,

I’ve completed some lab-based scanning of vegetation (in foliated and defoliated forms) and eventually I’m hoping to represent this structure within a hydraulic flood model.

Image

For this, I need to reduce the complexity of initially high point density scans. To do this I’m looking to use an octree based approach. During octree computation, where I set the minimum cell size to 0.025, I can begin to derive a coarse representation of the structure. Once the coarsest resolution representation of the scans can be successfully represented in the model, I plan to reduce the cell size to represent finer details.

Image

However, I’m not sure if it is possible to extract this octree information? Ideally, I’d like to extract the centroid of each cell (x,y,z), where the cell size is known, I could then reproduce the coarse vegetation structure for initial model runs.

I'm not sure if this is the best way forwards, and any advice about a possible workarounds would be appreciated.

Thanks

Richard

Re: Extracting octree information

Posted: Mon Jun 30, 2014 9:04 am
by daniel
Hi Richard,

I won't be able to answer or debate on the 'theoretical' side of your question (I believe some users will however - such as Dimitri Lague who visits this forum from time to time ;).

Anyway, about the technical side:
- in the current implementation of CC, you can generate a cloud with either the center of gravity of the points inside each octree cell (Edit > Octree > Resample) or with the point closest to the cell center (Edit > Subsample). Both should be close the the cell centroid in most cases (but if it's really important to get the octree cell centers, it should be easy to add an option to the first method).
- for the cell dimension/volume, you can 'read' the cell size at any level by looking at the octree properties ('Cell size' entry). The cell volume is simply cs^3. The 'Filled volume' entry is the sum for all cells (i.e. nb_cells * cs^3).
cc_octree_volume.jpg
cc_octree_volume.jpg (22.26 KiB) Viewed 4721 times