MarsSDK
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
DepthStream Class Reference

Depth image stream from the camera. More...

#include <MarsSDK.h>

Inheritance diagram for DepthStream:
Stream

Public Member Functions

 ~DepthStream ()
 Destructor to delete memory allocation for instance of DepthStream.
 
int update ()
 Updates the stream's contents from the camera. More...
 
float * getFrame ()
 Returns the depth data. Uses the frame from the latest call to DepthStream::update(). More...
 
unsigned char * getColorFrame ()
 Returns the depth frame's color, calculated from the ColorStream's data through image registration. Uses the frame from the latest call to DepthStream::update(). More...
 
unsigned short * getIrFrame ()
 Returns the infrared data. Uses the frame from the latest call to DepthStream::update(). More...
 
- Public Member Functions inherited from Stream
int getWidth ()
 Returns the Stream's width, in pixels. More...
 
int getHeight ()
 Returns the Stream's height, in pixels. More...
 
int getSize ()
 Returns the Stream's size, in pixels. More...
 

Private Member Functions

 DepthStream (CLibTof *_camera)
 Constructor to create a new instance of DepthStream. More...
 

Private Attributes

float * depthFrame
 Depth frame buffer. Pixel elements can be accessed as (location * 3) + axis, where axis is 0 = x, 1 = y, 2 = z.
 
unsigned char * colorFrame
 Depth frame color from image registration. Pixel elements can be accessed as (location * 3) + color, where color is 0 = r, 1 = g, 2 = b.
 
unsigned short * irFrame
 Infrared frame buffer Each pixel is stored as 16-bit grayscale.
 

Friends

class Mars
 

Additional Inherited Members

- Protected Attributes inherited from Stream
CLibTof * camera
 Instance of camera in external Sunny Mars API.
 
int width
 Stream's width, in pixels.
 
int height
 Stream's height, in pixels.
 
int size
 Stream's size, in pixels.
 

Detailed Description

Depth image stream from the camera.

Constructor & Destructor Documentation

◆ DepthStream()

DepthStream DepthStream::DepthStream ( CLibTof *  _camera)
private

Constructor to create a new instance of DepthStream.

Parameters
[in]_cameraInstance of camera.

Member Function Documentation

◆ getColorFrame()

unsigned char * DepthStream::getColorFrame ( )

Returns the depth frame's color, calculated from the ColorStream's data through image registration. Uses the frame from the latest call to DepthStream::update().

Returns
colorFrame

◆ getFrame()

float * DepthStream::getFrame ( )

Returns the depth data. Uses the frame from the latest call to DepthStream::update().

Returns
depthFrame

◆ getIrFrame()

unsigned short * DepthStream::getIrFrame ( )

Returns the infrared data. Uses the frame from the latest call to DepthStream::update().

Returns
irFrame

◆ update()

int DepthStream::update ( )

Updates the stream's contents from the camera.

Returns
Error code

The documentation for this class was generated from the following file: