mcNNindex | R Documentation |
find nearest neighbours for point clouds using a kd-tree search. This is just a wrapper of the function vcgKDtree from
package Rvcg. Wwraps the function vcgKDtree
from package 'Rvcg' (for backward compatibility )
mcNNindex(target, query, cores = parallel::detectCores(), k = k, ...)
target |
|
query |
|
cores |
integer: amount of CPU-cores to be used. Only available on systems with OpenMP support. |
k |
integer: how many closest points are sought. |
... |
additional arguments - currently unused. |
l x k
matrix containing indices of closest points.
closemeshKD
require(rgl)
data(nose)
# find closest vertex on surface for each landmark
clost <- mcNNindex(vert2points(shortnose.mesh),shortnose.lm, k=1,
mc.cores=1)
## Not run:
spheres3d(vert2points(shortnose.mesh)[clost,],col=2,radius=0.3)
spheres3d(shortnose.lm,radius=0.3)
wire3d(shortnose.mesh)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.