geometry_features: Geometry features of Neighboring Points.

Description Usage Arguments Details Value Author(s) Examples

View source: R/geometry_features.R

Description

Estimate geometry features of neighboring points in a cloud.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
geometry_features(
  cloud,
  method,
  radius,
  k,
  max_neighbour,
  distance = "euclidean",
  target = FALSE,
  threads = 1L,
  verbose = FALSE,
  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".

distance

Type of distance to calculate. "euclidean" as default. Look hnsw_knn for more options.

target

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

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.

verbose

If TRUE, log messages to the console.

progress

If TRUE, log a progress bar when verbose = TRUE. Tracking progress could cause a small overhead.

...

Arguments passed to hnsw_build and hnsw_search.

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.

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.

Author(s)

J. Antonio Guzmán Q.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#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)

Antguz/rTLS documentation built on Dec. 14, 2021, 9:49 a.m.