Scalar Fields

Roughly speaking, each of the columns in the PyntCloud.points DataFrame is a Scalar Field.

Point clouds require at least 3 columns to be defined (the x,y,z coordinates); any other information associated to each point is a Scalar Field.

For example point clouds with color information usually have 3 scalar fields representing the Red, Green, and Blue values for each point.

A Scalar Field must have the same type and meaning for every point, the value is what is variable.

In the point cloud literature, Scalar Fields are restricted to be numeric (that’s where the Scalar comes from), but here we extend the Scalar Field term to defined any column of the Points DataFrame.

Scalar Fields are accessible trough:

PyntCloud.add_scalar_field()[source]

We group the available scalar fields based on what the requirements for computing them are.

Only require XYZ

“plane_fit”

class pyntcloud.scalar_fields.PlaneFit(*, pyntcloud, max_dist=0.0001, max_iterations=100, n_inliers_to_stop=None)[source]

Get inliers of the best RansacPlane found.

“sphere_fit”

class pyntcloud.scalar_fields.SphereFit(*, pyntcloud, max_dist=0.0001, max_iterations=100, n_inliers_to_stop=None)[source]

Get inliers of the best RansacSphere found.

“custom_fit”

class pyntcloud.scalar_fields.CustomFit(pyntcloud, model, sampler, name, model_kwargs={}, sampler_kwargs={}, max_iterations=100, n_inliers_to_stop=None)[source]

Get inliers of the best custom model found.

“spherical_coords”

class pyntcloud.scalar_fields.SphericalCoordinates(*, pyntcloud, degrees=True)[source]

Get radial, azimuthal and polar values.

Require Eigen Values

Required args:

ev: list of str
ev = pointcloud.add_scalar_field("eigen_values", ...)

“anisotropy”

class pyntcloud.scalar_fields.Anisotropy(*, pyntcloud, ev)[source]

“curvature”

class pyntcloud.scalar_fields.Curvature(*, pyntcloud, ev)[source]

“eigenentropy”

class pyntcloud.scalar_fields.Eigenentropy(*, pyntcloud, ev)[source]

“eigen_sum”

class pyntcloud.scalar_fields.EigenSum(*, pyntcloud, ev)[source]

“linearity”

class pyntcloud.scalar_fields.Linearity(*, pyntcloud, ev)[source]

“ommnivariance”

class pyntcloud.scalar_fields.Omnivariance(*, pyntcloud, ev)[source]

“planarity”

class pyntcloud.scalar_fields.Planarity(*, pyntcloud, ev)[source]

“sphericity”

class pyntcloud.scalar_fields.Planarity(*, pyntcloud, ev)[source]

Require K Neighbors

Required args:

k_neighbors: (N, k) ndarray
k_neighbros = pointcloud.get_k_neighbors(k=10, ...)

“normals”

“eigen_values”

class pyntcloud.scalar_fields.EigenValues(*, pyntcloud, k_neighbors)[source]

Compute the eigen values of each point’s neighbourhood.

“eigen_decomposition”

class pyntcloud.scalar_fields.EigenDecomposition(*, pyntcloud, k_neighbors)[source]

Compute the eigen decomposition of each point’s neighbourhood.

Require Normals

pointcloud.points must have [nx, ny, nz] columns.

“inclination_deg”

class pyntcloud.scalar_fields.InclinationDegrees(*, pyntcloud)[source]

Vertical inclination with respect to Z axis in degrees.

“inclination_rad”

class pyntcloud.scalar_fields.InclinationRadians(*, pyntcloud)[source]

Vertical inclination with respect to Z axis in radians.

“orientation_deg”

class pyntcloud.scalar_fields.OrientationDegrees(*, pyntcloud)[source]

Horizontal orientation with respect to the XY plane in degrees.

“orientation_rad”

class pyntcloud.scalar_fields.OrientationRadians(*, pyntcloud)[source]

Horizontal orientation with respect to the XY plane in radians.

Require RGB

pointcloud.points must have [red, green, blue] columns.

“hsv”

class pyntcloud.scalar_fields.HueSaturationValue(*, pyntcloud)[source]

Hue, Saturation, Value colorspace.

“relative_luminance”

class pyntcloud.scalar_fields.RelativeLuminance(*, pyntcloud)[source]

Similar to grayscale. Computed following Wikipedia.

“rgb_intensity”

class pyntcloud.scalar_fields.RGBIntensity(*, pyntcloud)[source]

Red, green and blue intensity.

Require VoxelGrid

Required args:

voxelgrid: VoxelGrid.id
voxelgrid = self.add_structure("voxelgrid", ...)

“euclidean_clusters”

class pyntcloud.scalar_fields.EuclideanClusters(*, pyntcloud, voxelgrid_id)[source]

Assing corresponding cluster to each point inside each voxel.

“voxel_n”

class pyntcloud.scalar_fields.VoxelN(*, pyntcloud, voxelgrid_id)[source]

Voxel index in 3D array using ‘C’ order.

“voxel_x”

class pyntcloud.scalar_fields.VoxelX(*, pyntcloud, voxelgrid_id)[source]

Voxel index along x axis.

“voxel_y”

class pyntcloud.scalar_fields.VoxelY(*, pyntcloud, voxelgrid_id)[source]

Voxel index along y axis.

“voxel_z”

class pyntcloud.scalar_fields.VoxelZ(*, pyntcloud, voxelgrid_id)[source]

Voxel index along z axis.