Creates cube like voxels of different size on a point cloud using the voxels function, and then return a summary_voxels of their features.

voxels_counting(
  cloud,
  edge_sizes = NULL,
  min_size,
  length_out = 10,
  bootstrap = FALSE,
  R = NULL,
  progress = TRUE,
  parallel = FALSE,
  threads = NULL
)

Arguments

cloud

A data.table with xyz coordinates of the point clouds in the first three columns.

edge_sizes

A positive numeric vector describing the edge length of the different cubes to perform. If NULL, it use edge sizes by default based on the largest range of XYZ and min_size.

min_size

A positive numeric vector of length 1 describing the minimum cube edge length to perform. This is required if edge_sizes = NULL.

length_out

A positive interger of length 1 indicating the number of different edge lengths to use. This is required if edge_sizes = NULL.

bootstrap

Logical. If TRUE, it computes a bootstrap on the H index calculations. FALSE as default.

R

A positive integer of length 1 indicating the number of bootstrap replicates. This need to be used if bootstrap = TRUE.

progress

Logical, if TRUE displays a graphical progress bar. TRUE as default.

parallel

Logical, if TRUE it uses a parallel processing for the voxelization. FALSE as default.

threads

An integer >= 0 describing the number of threads to use. This need to be used if parallel = TRUE.

Value

A data.table with the summary of the voxels created with their features.

Author

J. Antonio Guzmán Q.

Examples


data(pc_tree)

#Applying voxels counting.
voxels_counting(pc_tree, min_size = 2)
#> [1] "Creating voxels"
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
#>       Edge.X   Edge.Y   Edge.Z N_voxels   Volume  Surface Density_mean
#>  1: 2.000000 2.000000 2.000000       26 208.0000 52.00000     729.3077
#>  2: 2.273717 2.273717 2.273717       23 270.3565 46.52809     637.8868
#>  3: 2.584894 2.584894 2.584894       18 310.8856 53.45340     630.6469
#>  4: 2.938658 2.938658 2.938658       14 355.2836 69.08568     627.3617
#>  5: 3.340838 3.340838 3.340838        8 298.3020 44.64479     849.4609
#>  6: 3.798059 3.798059 3.798059        8 438.3037 57.70101     657.2501
#>  7: 4.317855 4.317855 4.317855        8 644.0124 74.57549     508.5317
#>  8: 4.908790 4.908790 4.908790        7 827.9828 96.38486     449.6735
#>  9: 5.580598 5.580598 5.580598        4 695.1880 93.42923     608.8672
#> 10: 6.344350 6.344350 6.344350        1 255.3650 40.25077    1884.3862
#>     Density_sd         H     Hmax Equitavility Negentropy
#>  1:   666.6192 2.8071337 3.258097    0.8615870  0.4509629
#>  2:   731.5321 2.5806326 3.135494    0.8230385  0.5548616
#>  3:   861.5751 2.2028562 2.890372    0.7621360  0.6875155
#>  4:   778.8986 1.9014672 2.639057    0.7205100  0.7375901
#>  5:   416.4392 1.9635014 2.079442    0.9442446  0.1159402
#>  6:   408.2369 1.9136861 2.079442    0.9202885  0.1657555
#>  7:   598.9605 1.5854415 2.079442    0.7624362  0.4940001
#>  8:   823.1561 0.9318226 1.945910    0.4788621  1.0140875
#>  9:  1143.8455 0.2341148 1.386294    0.1688781  1.1521796
#> 10:         NA 0.0000000 0.000000          NaN  0.0000000

#Voxels counting using bootstrap on the H indexes with 1000 repetitions.
voxels_counting(pc_tree, min_size = 2, bootstrap = TRUE, R = 1000)
#> [1] "Creating voxels"
#> 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |======================================================================| 100%
#>       Edge.X   Edge.Y   Edge.Z N_voxels   Volume  Surface Density_mean
#>  1: 2.000000 2.000000 2.000000       26 208.0000 52.00000     729.3077
#>  2: 2.273717 2.273717 2.273717       23 270.3565 46.52809     637.8868
#>  3: 2.584894 2.584894 2.584894       18 310.8856 53.45340     630.6469
#>  4: 2.938658 2.938658 2.938658       14 355.2836 69.08568     627.3617
#>  5: 3.340838 3.340838 3.340838        8 298.3020 44.64479     849.4609
#>  6: 3.798059 3.798059 3.798059        8 438.3037 57.70101     657.2501
#>  7: 4.317855 4.317855 4.317855        8 644.0124 74.57549     508.5317
#>  8: 4.908790 4.908790 4.908790        7 827.9828 96.38486     449.6735
#>  9: 5.580598 5.580598 5.580598        4 695.1880 93.42923     608.8672
#> 10: 6.344350 6.344350 6.344350        1 255.3650 40.25077    1884.3862
#>     Density_sd         H     Hmax Equitavility Negentropy H_boot_mean
#>  1:   666.6192 2.8071337 3.258097    0.8615870  0.4509629   2.8037754
#>  2:   731.5321 2.5806326 3.135494    0.8230385  0.5548616   2.5981348
#>  3:   861.5751 2.2028562 2.890372    0.7621360  0.6875155   2.2467749
#>  4:   778.8986 1.9014672 2.639057    0.7205100  0.7375901   1.8931751
#>  5:   416.4392 1.9635014 2.079442    0.9442446  0.1159402   1.9718819
#>  6:   408.2369 1.9136861 2.079442    0.9202885  0.1657555   1.9314591
#>  7:   598.9605 1.5854415 2.079442    0.7624362  0.4940001   1.6645529
#>  8:   823.1561 0.9318226 1.945910    0.4788621  1.0140875   1.1847412
#>  9:  1143.8455 0.2341148 1.386294    0.1688781  1.1521796   0.7345779
#> 10:         NA 0.0000000 0.000000          NaN  0.0000000   0.0000000
#>      H_boot_sd Equitavility_boot Negentropy_boot
#>  1: 0.11322984         0.8605563       0.4543211
#>  2: 0.11176808         0.8286205       0.5373594
#>  3: 0.12940663         0.7773308       0.6435968
#>  4: 0.22710029         0.7173679       0.7458822
#>  5: 0.04179467         0.9482748       0.1075596
#>  6: 0.06095108         0.9288355       0.1479824
#>  7: 0.18464350         0.8004807       0.4148886
#>  8: 0.33027498         0.6088365       0.7611689
#>  9: 0.49596206         0.5298859       0.6517165
#> 10: 0.00000000               NaN       0.0000000