Learn R Programming

rTLS (version 0.2.3)

geometry_features: Geometry features of Neighboring Points.

Description

Estimate geometry features of neighboring points in a cloud.

Usage

geometry_features(
  cloud,
  method,
  radius,
  k,
  max_neighbour,
  target = FALSE,
  build = "kdtree",
  threads = 1L,
  checks = 1L,
  progress = TRUE
)

Arguments

cloud

A data.table with *XYZ* coordinates in the first three columns.

method

A character string specifying the method to estimate the neighbors. It most be one of "radius_search" or "knn".

radius

A numeric vector representing the radius for search to consider. This needs be used if method = "radius_search".

k

An integer vector representing the number of neighbors to consider. This needs be used if method = "knn".

max_neighbour

An integer specifying the maximum number of points to look around each query point for a given radius. This needs be used if method = "radius_search".

target

Logic. If TRUE, it consider that target point for the calculations of geometry features.

build

A character describing the search structure to be used: "kdtree", "kmeans", "linear".

threads

An integer specifying the number of threads to use for parallel processing. Experiment to see what works best for your data on your hardware.

checks

Number of checks during searching. Higher value gives better search precision but takes longer. See FLANN C++ manual for more details.

progress

Show progress. TRUE as default.

Value

A array describing the point of the cloud in rows, the relative eigenvalues in columns, and the radius or k per slide. If method = "radius_search", it add in the first column the number of neighboring points.

Details

The function returns the geometry features of the neighboring points of a given point in cloud. Geometry features are represented by the relative values of the eigenvalues derived from a covariance matrix of the neighboring points. Geometry features are not estimated on target points with less than 3 neighboring points.

Examples

Run this code
# NOT RUN {
#Create cloud
example <- data.table(X = runif(200, min=0, max=10),
                      Y = runif(200, min=0, max=10),
                      Z = runif(200, min=0, max=10))


#Using knn method with two different k
k_test <- c(5, 10)
geometry_features(example, method = "knn", k = k_test)

#Using radius search method with two different radius
radius_test <- c(3, 4)
geometry_features(example, method = "radius_search", radius = radius_test, max_neighbour = 200)

# }

Run the code above in your browser using DataLab