PySpin.PointCloud

class PointCloud(*args)

The PointCloud object class.

AddPoint(self, point)

Parameters

point: Spinnaker::Stereo3DPoint const

Adds a point to the point cloud.

param point:

The point to be added.

Clear(self)

Clears all points from the point cloud.

GetNumPoints(self) size_t

Returns the number of points in the point cloud.

The number of points in the point cloud.

GetPoint(self, index) Stereo3DPoint

Parameters

index: unsigned int const

Returns the Stereo3DPoint at the specified index.

Stereo3DPoint object

GetPointCloudData(self) Spinnaker::IPointCloud::PointCloudData *
LoadPointCloudFromPly(self, filename)

Parameters

filename: std::string const &

Loads a point cloud from a PLY file.

The function reads the file and parses the data into a vector of 3D points. The data is then stored in the class as a vector of Stereo3DPoint objects.

param filename:

The path to the PLY file to be loaded.

See:

SavePointCloudAsPly()

PrintPoints(self, numPointsToPrint)

Parameters

numPointsToPrint: unsigned int

Prints a number of points from the point cloud to the console.

The function prints a number of points from the point cloud to the console. The number of points to print is specified by the user. The points are printed in the following format: x, y, z, r, g, b, i, j.

param numPointsToPrint:

The number of points to print.

SavePointCloudAsPly(self, arg0)

Parameters

arg0: std::string const &

Saves the point cloud to a PLY file.

The function writes the point cloud data to the specified file in PLY format. The data is written in the order of x, y, z, color (red, green, blue, alpha), image x, image y. The point cloud data is written as a binary file.

param filename:

The path to the PLY file to be saved.

See:

LoadPointCloudFromPly()