xvsdk  3.2.0
Public Types | Public Member Functions | List of all members
xv::TofCamera Class Referenceabstract

A class to handle callbacks of the ToF camera. More...

#include <xv-sdk.h>

Public Types

enum  StreamMode {
  DepthOnly = 0, CloudOnly, DepthAndCloud, None,
  CloudOnLeftHandSlam
}
 
enum  DistanceMode { Short = 0, Middle, Long }
 
enum  SonyTofLibMode {
  IQMIX_DF, IQMIX_SF, LABELIZE_DF, LABELIZE_SF,
  M2MIX_DF, M2MIX_SF
}
 
enum  Framerate {
  FPS_5, FPS_10, FPS_15, FPS_20,
  FPS_25, FPS_30
}
 
enum  Resolution { Unknown = -1, VGA = 0, QVGA, HQVGA }
 
enum  Manufacturer { Unknown = -1, Pmd = 0, Sony }
 
using Data = DepthImage const &
 

Public Member Functions

virtual int registerColorDepthImageCallback (std::function< void(const DepthColorImage &)>)=0
 Gives access to composed image with RBG color on depth images.
 
virtual bool unregisterColorDepthImageCallback (int callbackId)=0
 
virtual std::shared_ptr< PointClouddepthImageToPointCloud (DepthImage const &) const =0
 Convert a depth image to point cloud for sony TOF. More...
 
virtual bool setStreamMode (StreamMode mode)=0
 Set which stream will be reported. Not work with sony TOF.
 
virtual bool setDistanceMode (DistanceMode mode)=0
 Set distance mode. More...
 
virtual Resolution getResolution ()=0
 Get current resolution. More...
 
virtual Manufacturer getManufacturer ()=0
 Get tof Manufacturer. More...
 
virtual bool setLibWorkMode (SonyTofLibMode mode)=0
 Set lib mode. More...
 
virtual bool setMode (int mode)=0
 Set work mode.
 
virtual bool setSonyTofSetting (SonyTofLibMode mode, Resolution resolution, Framerate frameRate)=0
 SonyTof Settings.
 
virtual void setFilterFile (std::string filePath)=0
 set SonyTof filter file
 
virtual bool start ()=0
 start streaming.
 
virtual bool stop ()=0
 stop streaming.
 
virtual int registerCallback (std::function< void(DepthImage const &)>)=0
 Register callback to receive data.
 
virtual bool unregisterCallback (int callbackId)=0
 Unregister callback.
 
virtual const std::vector< Calibration > & calibration ()
 Get the camera calibration. More...
 
virtual bool setResolution (int resolution)
 
virtual bool setFramerate (float framerate)
 
virtual bool setExposure (int aecMode=0, int exposureGain=0, float exposureTimeMs=0.0)
 Exposure setting. More...
 
virtual bool setBrightness (int brightness)
 Set output image brightness. Only valid in auto exposure mode. More...
 

Detailed Description

A class to handle callbacks of the ToF camera.

Member Function Documentation

virtual const std::vector<Calibration>& xv::Camera::calibration ( )
virtualinherited

Get the camera calibration.

The frames coordinates are defined according to the IMU frame coordinates. If 2 fisheyes cameras the first is left and second is right camera.

virtual std::shared_ptr<PointCloud> xv::TofCamera::depthImageToPointCloud ( DepthImage const &  ) const
pure virtual

Convert a depth image to point cloud for sony TOF.

Returns
The point cloud of valid depth image pixels in ToF frame coordinates, nullptr if something went wrong.
Note
The coordinate system of the point cloud is the camera coordinate system, and the data unit is millimeters.
virtual Manufacturer xv::TofCamera::getManufacturer ( )
pure virtual

Get tof Manufacturer.

Returns
Manufacturer {Unknown = -1, Pmd = 0, Sony};
virtual Resolution xv::TofCamera::getResolution ( )
pure virtual

Get current resolution.

Returns
Resolution{ Unknown = -1,VGA = 0 ,QVGA ,HQVGA};
virtual bool xv::Camera::setBrightness ( int  brightness)
virtualinherited

Set output image brightness. Only valid in auto exposure mode.

Parameters
[in]brightnessbrightness of image, [0,255]
virtual bool xv::TofCamera::setDistanceMode ( DistanceMode  mode)
pure virtual

Set distance mode.

Midlle=Short for 010/009 TOF.

SonyTof: Short LABELIZE_SF_VGA_30FPS Middle M2_DF_VGA_30FPS Long IQ_DF_VGA_30FPS

virtual bool xv::Camera::setExposure ( int  aecMode = 0,
int  exposureGain = 0,
float  exposureTimeMs = 0.0 
)
virtualinherited

Exposure setting.

Parameters
[in]aecMode0:auto exposure 1:manual exposure
[in]exposureGainOnly valid in manual exposure mode, [0,255]
[in]exposureTimeMsOnly valid in manual exposure mode, in milliseconds
virtual bool xv::TofCamera::setLibWorkMode ( SonyTofLibMode  mode)
pure virtual

Set lib mode.

  1. IQMIX_DF
  2. IQMIX_SF
  3. LABELIZE_DF
  4. LABELIZE_SF
  5. M2MIX_DF
  6. M2MIX_SF

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