Learn R Programming

VoxR (version 0.5.1)

obj.rec: Spatially differentiated objects recognition

Description

Recognition of spatially differentiated objects within a point cloud. Two points located under within distance of reaserch from each other are considered as the parts of a unique object.

Usage

obj.rec(data, fac)

Arguments

data
a data frame containing the x, y, z, ... coordinates of a voxel cloud
fac
numeric specifying the distance of research (in the scale of the original coordinate system)

Value

A data frame containing the x, y, z coordinates and object ID of the input data

See Also

sub.obj

Examples

Run this code
data(data_part)

#- voxelisation
data_vox <- vox(data_part,res=1)

#- objects reconuition

datasep <- obj.rec(data_vox,fac=2)


#-visualisation

require(rgl)
library(rgl)
open3d()
b <- subset(datasep,datasep[,4]==1)
plot3d(b,col="green",add=TRUE)
c <- subset(datasep,datasep[,4]==2)
plot3d(c,col="red",add=TRUE)
e <- subset(datasep,datasep[,4]==3)
plot3d(e,col="blue",add=TRUE)
f <- subset(datasep,datasep[,4]==4)
plot3d(f,col="purple",add=TRUE)

Run the code above in your browser using DataLab