Jetson Inference
DNN Vision Library

3D point cloud processing and visualization. More...

Classes

class  cudaPointCloud
 CUDA-accelerated point cloud processing. More...
 

Detailed Description

3D point cloud processing and visualization.


Class Documentation

◆ cudaPointCloud

class cudaPointCloud

CUDA-accelerated point cloud processing.

Public Member Functions

struct cudaPointCloud::Vertex __attribute__ ((packed))
 
 ~cudaPointCloud ()
 Destructor. More...
 
bool Reserve (uint32_t maxPoints)
 Allocate and reserve memory for the max number of points. More...
 
void Free ()
 Free the memory being used to store the point cloud. More...
 
void Clear ()
 Clear the points, but keep the memory allocated. More...
 
bool Extract (float *depth, float4 *rgba, uint32_t width, uint32_t height)
 Extract point cloud from depth map and optional RGBA image. More...
 
bool Extract (float *depth, uint32_t depth_width, uint32_t depth_height, float4 *rgba, uint32_t color_width, uint32_t color_height)
 Extract point cloud from depth map and optional RGBA image. More...
 
uint32_t GetNumPoints () const
 Retrieve the number of points being used. More...
 
uint32_t GetMaxPoints () const
 Retrieve the max number of points in memory. More...
 
size_t GetSize () const
 Retrieve the size in bytes currently being used. More...
 
size_t GetMaxSize () const
 Retrieve the maximum size in bytes of the point cloud. More...
 
VertexGetData () const
 Retrieve memory pointer to point cloud data. More...
 
VertexGetData (size_t index) const
 Retrieve memory pointer to a specific point. More...
 
bool HasRGB () const
 Does the point cloud have RGB data? More...
 
bool Render ()
 Render the point cloud with OpenGL. More...
 
bool Save (const char *filename)
 Save point cloud to PCD file. More...
 
bool SetCalibration (const char *filename)
 Set the intrinsic camera calibration. More...
 
void SetCalibration (const float K[3][3])
 Set the intrinsic camera calibration. More...
 
void SetCalibration (const float2 &focalLength, const float2 &principalPoint)
 Set the intrinsic camera calibration. More...
 

Static Public Member Functions

static cudaPointCloudCreate ()
 Create. More...
 

Protected Member Functions

 cudaPointCloud ()
 
bool allocBufferGL ()
 
bool allocDepthResize (size_t size)
 

Protected Attributes

VertexmPointsCPU
 
VertexmPointsGPU
 
glBuffermBufferGL
 
glCameramCameraGL
 
uint32_t mNumPoints
 
uint32_t mMaxPoints
 
float2 mFocalLength
 
float2 mPrincipalPoint
 
float * mDepthResize
 
size_t mDepthSize
 
bool mHasRGB
 
bool mHasNewPoints
 
bool mHasCalibration
 

Constructor & Destructor Documentation

◆ ~cudaPointCloud()

cudaPointCloud::~cudaPointCloud ( )

Destructor.

◆ cudaPointCloud()

cudaPointCloud::cudaPointCloud ( )
protected

Member Function Documentation

◆ __attribute__()

struct cudaPointCloud::Vertex cudaPointCloud::__attribute__ ( (packed)  )

◆ allocBufferGL()

bool cudaPointCloud::allocBufferGL ( )
protected

◆ allocDepthResize()

bool cudaPointCloud::allocDepthResize ( size_t  size)
protected

◆ Clear()

void cudaPointCloud::Clear ( )

Clear the points, but keep the memory allocated.

◆ Create()

static cudaPointCloud* cudaPointCloud::Create ( )
static

Create.

◆ Extract() [1/2]

bool cudaPointCloud::Extract ( float *  depth,
float4 *  rgba,
uint32_t  width,
uint32_t  height 
)

Extract point cloud from depth map and optional RGBA image.

◆ Extract() [2/2]

bool cudaPointCloud::Extract ( float *  depth,
uint32_t  depth_width,
uint32_t  depth_height,
float4 *  rgba,
uint32_t  color_width,
uint32_t  color_height 
)

Extract point cloud from depth map and optional RGBA image.

◆ Free()

void cudaPointCloud::Free ( )

Free the memory being used to store the point cloud.

◆ GetData() [1/2]

Vertex* cudaPointCloud::GetData ( ) const
inline

Retrieve memory pointer to point cloud data.

◆ GetData() [2/2]

Vertex* cudaPointCloud::GetData ( size_t  index) const
inline

Retrieve memory pointer to a specific point.

◆ GetMaxPoints()

uint32_t cudaPointCloud::GetMaxPoints ( ) const
inline

Retrieve the max number of points in memory.

◆ GetMaxSize()

size_t cudaPointCloud::GetMaxSize ( ) const
inline

Retrieve the maximum size in bytes of the point cloud.

◆ GetNumPoints()

uint32_t cudaPointCloud::GetNumPoints ( ) const
inline

Retrieve the number of points being used.

◆ GetSize()

size_t cudaPointCloud::GetSize ( ) const
inline

Retrieve the size in bytes currently being used.

◆ HasRGB()

bool cudaPointCloud::HasRGB ( ) const
inline

Does the point cloud have RGB data?

◆ Render()

bool cudaPointCloud::Render ( )

Render the point cloud with OpenGL.

◆ Reserve()

bool cudaPointCloud::Reserve ( uint32_t  maxPoints)

Allocate and reserve memory for the max number of points.

Note
Memory is reserved automatically by Extract(), but if you know in advance the maximum number of points it is good practice to call Reserve() ahead of time.

◆ Save()

bool cudaPointCloud::Save ( const char *  filename)

Save point cloud to PCD file.

◆ SetCalibration() [1/3]

bool cudaPointCloud::SetCalibration ( const char *  filename)

Set the intrinsic camera calibration.

◆ SetCalibration() [2/3]

void cudaPointCloud::SetCalibration ( const float  K[3][3])

Set the intrinsic camera calibration.

◆ SetCalibration() [3/3]

void cudaPointCloud::SetCalibration ( const float2 &  focalLength,
const float2 &  principalPoint 
)

Set the intrinsic camera calibration.

Member Data Documentation

◆ mBufferGL

glBuffer* cudaPointCloud::mBufferGL
protected

◆ mCameraGL

glCamera* cudaPointCloud::mCameraGL
protected

◆ mDepthResize

float* cudaPointCloud::mDepthResize
protected

◆ mDepthSize

size_t cudaPointCloud::mDepthSize
protected

◆ mFocalLength

float2 cudaPointCloud::mFocalLength
protected

◆ mHasCalibration

bool cudaPointCloud::mHasCalibration
protected

◆ mHasNewPoints

bool cudaPointCloud::mHasNewPoints
protected

◆ mHasRGB

bool cudaPointCloud::mHasRGB
protected

◆ mMaxPoints

uint32_t cudaPointCloud::mMaxPoints
protected

◆ mNumPoints

uint32_t cudaPointCloud::mNumPoints
protected

◆ mPointsCPU

Vertex* cudaPointCloud::mPointsCPU
protected

◆ mPointsGPU

Vertex* cudaPointCloud::mPointsGPU
protected

◆ mPrincipalPoint

float2 cudaPointCloud::mPrincipalPoint
protected