module documentation
Extract a 2D slice from a point cloud
For a given point cloud and cutting plane, a cross section can be extracted within a specified tolerance. The cross section is then converted to a binary image to facilitate analysis.
| Function | cloud |
Returns the binary image of the cross section for a given cloud |
| Function | extract |
cutting plane |
| Function | get |
Recover 3D cloud scale and dimensionality from 2D image space |
| Function | voxelize |
Voxelize a two dimensional point cloud projection to create a binary image |
Returns the binary image of the cross section for a given cloud
This wrapper function simplifies the point cloud extraction and image conversion process
| Parameters | |
cloud:numpy.ndarray | Array of x,y,z points describing point cloud of the scene |
density:float | Number of pixels in image space per unit length in cloud space |
zfloat | Location of the cutting plane along the z-axis |
tolerance:float | Points that lie within this perpendicular distance from the cutting plane will be included in the cross-section |
| grid | Undocumented |
| Returns | |
numpy.ndarray | A (2,n) array giving a binary image of the cross-section |
- Extract the portion of the scene point cloud that is near the
- cutting plane
| Parameters | |
| scene | Array of x,y,z points describing point cloud of the scene |
| z | Location of cutting plane along z axis. The plane is perpendicular to the z axis |
| tolerance | perpendicular distance between the plane and scene points. Scene points may not fall exactly on the plane, so this sensitivity must be tuned by the user |
| Returns | |
| numpy array | narrow cross section of the scene |
Recover 3D cloud scale and dimensionality from 2D image space
| Parameters | |
coords2d:numpy.ndarray | Ordered list of coordinates in image space with dimensions (n,2) |
density:float | Number of pixels in image space per unit length in cloud space |
zfloat | Location of the cutting plane along the z-axis |
| Returns | |
np.ndarray(float) | Ordered list of coordinates in cloud space with dimensions (n,3) |
Voxelize a two dimensional point cloud projection to create a binary image
Note: Input assumed to be projected onto an XY plane
| Parameters | |
| slice:numpy array | 2D point cloud projection |
density:int | Grid cells per unit distance in the cloud |
| grid | Undocumented |
| Returns | |
| grid(numpy array) | 2D binary image (Y,X ordering) |