API Reference

DaoAI Camera Studio API reference.

Namespace

namespace DaoAI

Classes

Class Application

#include "application.h"

Public Member Functions

Constructor:
DAOAI_API Application();
Destructor:
DAOAI_API ~Application();
getCameras:

Get a list of all USB cameras

Parameters:
  • [out] cameras: A map of all connected DaoAI-supported cameras keyed by serial number.

  • [in] [OPTIONAL] remote_address: A map of all connected DaoAI-supported cameras keyed by serial number.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError getCameras(std::map<std::string, Camera*>& cameras, std::string remote_address = "");
connectCamera:

Connect to the next available DaoAI camera.

Parameters:
  • [in] camera: Camera to connect.

  • [in] [OPTIONAL] settings: Connect to the camera with this settings. Must contain at least one frame.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError connectCamera(Camera*& camera, const Settings& settings = {});
connectCamera:

Connect to the DaoAI camera with serial number.

Parameters:
  • [in] serial_number: Connect to the camera with this serial number.

  • [out] camera: Pointer to the connected camera.

  • [in] [OPTIONAL] settings: Connect to the camera with this settings. Must contain at least one frame.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError connectCamera(const std::string serial_number, Camera*& camera, const Settings &settings = {});
disconnectCamera:

Disconnect the DaoAI camera with serial number.

Parameters:
  • [in] serial_number: Serial number of camera to disconnect.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError disconnectCamera(const std::string serial_number);
startLogging:

Enable writing camera log to a file

Parameters:
  • [in] [OPTIONAL] log_path: Specify directory to write logs

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError startLogging(std::string log_path = "");
stopLogging:

Disable writing camera log to a file

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError stopLogging();

Class Version

#include "application.h"
namespace Version

Public Member Functions

getSDKVersion:

get the DaoAI SDK version.

Return:
  • string: String containing DaoAI SDK version.

DAOAI_API std::string getSDKVersion();

Class Camera

#include "camera.h"

Public Member Functions

Constructor:
DAOAI_API Camera();
Copy Constructor:
DAOAI_API explicit Camera(const std::shared_ptr<Camera>& other);
Move Constructor:
DAOAI_API explicit Camera(class CameraImpl &&other);
Destructor:
DAOAI_API ~Camera();
connect:

Connect the camera.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError connect();
disConnect:

Disconnect the camera.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError disConnect();
isConnected:

Check if the camera is connected.

Return:
  • bool: returns True if camera is connected, false otherwise.

DAOAI_API bool isConnected() const;
capture:

Capture a single frame.

Parameters:
  • [out] Frame: Capture results will be written to this DaoAI Frame object.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError capture(Frame& frame);
capture:

Capture a single frame with settings.

Parameters:
  • [in] settings: DaoAI Settings to use for the capture. Must contain at least one frame.

  • [out] Frame: Capture results will be written to this DaoAI Frame object.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError capture(Settings settings, Frame& frame);
captureAssistant:

Analyze scene and generate acquisition frame settings, the total time for all acquisition frames will be less than the time budget. The higher time budget is, the more acquisition frames will be generated.

Parameters:
  • [in] time_budget: Time budget for acquisition frames, in range of (0.0, 5.0]

  • [in,out] mofaf: A map of AcquisitionFrame settings

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError captureAssistant(double time_budget, std::map<int, AcquisitionFrame> &mofaf);
setSettings:

Set Settings for camera with file path.

Parameters:
  • [in] file_path: Path to load settings file.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError setSettings(std::string file_path);
setSettings:

Set Settings for camera with settings object.

Parameters:
  • [in] settings: Settings object for this camera.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError setSettings(Settings settings);
getSettings:

Get Settings for camera.

Return:
  • Settings: Current settings structure used by this camera.

DAOAI_API Settings getSettings() const;
getSerialNumber:

Get serialNumber of the camera.

Return:
  • std::string: Serial number of this camera.

DAOAI_API std::string getSerialNumber() const;
getIntrinsicParam:

brief Get IntrinsicParameter of the camera.

Parameters:
  • [out] params: A vector of float containing camera intrinsic parameters.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError getIntrinsicParam(std::vector<float>& params) const;
enableGPU:

Enable or disable using GPU on local PC for computation.

Parameters:
  • toggle[in]: Enable or disable.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError enableGPU(bool toggle);
enableTempRegulation:

Enable or disable temperature regulation.

Parameters:
  • toggle[in]: Enable or disable.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError enableTempRegulation(bool toggle);

Class Settings

#include "settings.h"

AcquisitionFrame Class

Public Members & Functions
AcquisitionFrameSetting:

The acquisition frame settings data structure.

enum AcquisitionFrameSetting {
         Brightness, // Int {0, 3}.
         Gain, // Double {0, 3}.
         ExposureStop // Int {-1, 4}.
      };
Constructor:

Constructor with initial inputs for acquisition frame setting.

Parameters:
  • brightness[in]: brightness for the setting.

  • gain[in]: gain for the setting.

  • exposure_stop[in]: exposure stop for the setting.

DAOAI_API AcquisitionFrame(int brightness, double gain, int exposure_stop);
Constructor:

Constructor with default values for acquisition frame setting.

DAOAI_API AcquisitionFrame();
inquireSetting:

Get the current acquisition setting value and range.

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • curr[out]: the current value for the field.

  • min[out]: the min value for the field.

  • max[out]: the max value for the field.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSetting(AcquisitionFrameSetting setting, int& curr, int& min, int& max);
inquireSetting:

Get the current acquisition setting value.

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • curr[out]: current value for the field.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSetting(AcquisitionFrameSetting setting, int& curr);
inquireSetting:

Get the current acquisition setting value and range in double (gain).

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • curr[out]: the current value for the field, type double (for field gain).

  • min[out]: the min value for the field.

  • max[out]: the max value for the field.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSetting(AcquisitionFrameSetting setting, double& curr, double& min, double& max);
inquireSetting:

Get the current acquisition setting value in double (gain).

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • curr[out]: the current value for the field, type double (for field gain).

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSetting(AcquisitionFrameSetting setting, double& curr);
configureSetting:

Set the acquisition setting value.

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • new_val[in]: the new value to assign to.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureSetting(AcquisitionFrameSetting setting, int new_val);
configureSetting:

Set the acquisition setting value in double (gain).

Parameters:
  • AcquisitionFrameSetting[in]: acquisition frame setting to inquire [brightness, gain, exposure_stop].

  • new_val[in]: the new value (double for gain) to assign to.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureSetting(AcquisitionFrameSetting setting, double new_val);

Settings Class

Public Members & Functions
FilterSetting:

The filter settings data structure.

enum FilterSetting {
   IntensityThreshold, // Double {0, 3}. Enable/Disable. Get/Set.
   OutlierThreshold, // Double {0, inf}. Enable/Disable. Get/Set.
   SaturationFilter, // Bool. Enable/Disable. Get/Set.
   ContrastDistortionMode, // Int {0, 2}.         0: Off, 1: Remove Distortion, 2: Correct Distortion. Get/Set.
   ContrastDistortionStrength, // Int {0, 15000}. Get/Set.
   GaussianFilter, // Int {0, 5}. Enable/Disable. Get/Set.
   MedianFilter, // Int {0, 1}. Enable/Disable. Get/Set.
   FaceNormalFilter, // Double {0, 40}. Enable/Disable. Get/Set.
   SmoothFilter, // Int {0, 6}. Enable/Disable. Get/Set.
   FillGaps, // Bool. Enable/Disable. Get/Set.
   WidthThreshold, // Double {0, 500}. Get/Set.
   SlopeThreshold, // Double {0, inf}. Get/Set.
   DepthThreshold, // Double {0, 500}. Get/Set.
   FillXFirst, // Bool. Get/Set.
   FillBidirectional, // Bool. Get/Set.
   PhaseQualityThreshold, // Double {0, 50}. Enable/Disable. Get/Set.
   ConnectedAreaFilter, // Double {0, 10}. Enable/Disable. Get/Set.
   ShowHDR // Bool. Enable/Disable. Get/Set.
};
SystemSetting:

The system settings data structure.

enum SystemSetting {
   CameraModel, // String. Get only.
   TemperatureSensorAvailable, // Bool. Get only.
   TemperatureRegulationEnable, // Bool. Get only.
   GPUAvailable, // Bool. Get only.
   GPUEnable, // Bool. Get only.
   Version, // String. Get only.
   ExtraWhitePatternEnable // Bool. Enable/Disable. Get/Set.
};
Constructor:
DAOAI_API Settings();
Copy Constructor:
Parameters:
  • other[out]: another setting object to copy to.

DAOAI_API explicit Settings(const std::shared_ptr<Settings>& other);
Destructor:
DAOAI_API ~Settings();
Constructor:

Constructor load settings from settings workspace.

Parameters:
  • file_path[in]: The path to the workspace

DAOAI_API Settings(const std::string& file_path);
exportSettings:

Export current camera settings.

Parameters:
  • file_name[in]: The path to save the camera settings.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError exportSettings(const std::string& file_path);
addAcquisitionFrame:

Add an aquisition frame to settings to use in 3D capture with index.

Parameters:
  • af[in]: AcquisitionFrame object to write.

  • index[out]: Index where this frame is written.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError addAcquisitionFrame(AcquisitionFrame af, int& index);
addAcquisitionFrame:

Add an aquisition frame to settings to use in 3D capture.

Parameters:
  • af[in]: AcquisitionFrame object to write.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError addAcquisitionFrame(AcquisitionFrame af);
getAcquisitionFrame:

Retreive the aquisition frame object from the given index.

Parameters:
  • af[out]: AcquisitionFrame object to which data will be written.

  • index[in]: Index to retrieve frame.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError getAcquisitionFrame(AcquisitionFrame& af, int index);
modifyAcquisitionFrame:

Modify an aquisition frame to settings at a given index.

Parameters:
  • af[in]: AcquisitionFrame object to write.

  • index[in]: Index of AcquisitionFrame to modify data.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError modifyAcquisitionFrame(AcquisitionFrame af, int index);
deleteAcquisitionFrame:

Delete an aquisition frame at a given index.

Parameters:
  • index[in]: Index of AcquisitionFrame to delete.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError deleteAcquisitionFrame(int index);
setAcquisitionFrames:

Write a map of AcquisitionFrames to settings to be used in D3 Capture.

Parameters:
  • mofaf[in]: Map of int to AcquisitionFrame objects to write.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError setAcquisitionFrames(std::map<int, AcquisitionFrame> mofaf);
getAcquisitionFrames:

Retrieve the current map of AcquisitionFrames from settings.

Parameters:
  • mofaf[out]: Current acquisition frame map is written to this map.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError getAcquisitionFrames(std::map<int, AcquisitionFrame>& mofaf);
enableFilterSetting:

Enable or disable a filter setting.

Parameters:
  • setting[in]: The filter to toggle.

  • toggle[in]: Enable or disable.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError enableFilterSetting(FilterSetting setting, bool toggle);
checkEnableFilterSetting:

Check if a filter setting is enabled.

Parameters:
  • setting[in]: The filter to check.

  • is_enabled[out]: Enable status written to this.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError checkEnableFilterSetting(FilterSetting setting, bool& is_enabled);
inquireFilterSetting:

Get the current value and valid range of a filter setting.

Parameters:
  • setting[in]: The filter to check.

  • curr[out]: The current value of this setting.

  • min[out]: The minimum valid value that this setting can be configured with.

  • max[out]: The maximum valid value that this setting can be configured with.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireFilterSetting(FilterSetting setting, int& curr, int& min, int& max);
inquireFilterSetting:

Get the current value and valid range (double) of a filter setting.

Parameters:
  • setting[in]: The filter to check.

  • curr[out]: The current value of this setting.

  • min[out]: The minimum valid value that this setting can be configured with.

  • max[out]: The maximum valid value that this setting can be configured with.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireFilterSetting(FilterSetting setting, double& curr, double& min, double& max);
inquireFilterSetting:

Get the current value of a filter setting.

Parameters:
  • setting[in]: The filter to check.

  • curr[out]: The current value of this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireFilterSetting(FilterSetting setting, int& curr);
inquireFilterSetting:

Get the current value(double) of a filter setting.

Parameters:
  • setting[in]: The filter to check.

  • curr[out]: The current value of this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireFilterSetting(FilterSetting setting, double& curr);
inquireFilterSetting:

Get the current value(bool) of a filter setting.

Parameters:
  • setting[in]: The filter to check.

  • curr[out]: The current value of this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireFilterSetting(FilterSetting setting, bool& curr);
configureFilterSetting:

Configure a filter setting with the given value.

Parameters:
  • setting[in]: The filter to configure.

  • new_val[in]: The value to write to this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureFilterSetting(FilterSetting setting, int new_val);
configureFilterSetting:

Configure a filter setting with the given value (double).

Parameters:
  • setting[in]: The filter to configure.

  • new_val[in]: The value to write to this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureFilterSetting(FilterSetting setting, double new_val);
configureFilterSetting:

Configure a filter setting with the given value (bool).

Parameters:
  • setting[in]: The filter to configure.

  • new_val[in]: The value to write to this setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureFilterSetting(FilterSetting setting, bool new_val);
configureFilterSetting:

Enable or disable a system setting.

Parameters:
  • setting[in]: The system setting to toggle.

  • toggle[in]: Enable or disable.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError enableSystemSetting(SystemSetting setting, bool toggle);
checkEnableSystemSetting:

Check if a system setting is enabled or disabled.

Parameters:
  • setting[in]: The system setting to check.

  • is_enabled[out]: Enable status written to this.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError checkEnableSystemSetting(SystemSetting setting, bool& is_enabled);
inquireSystemSetting:

Check the current value and valid range of a system setting.

Parameters:
  • setting[in]: The system setting to check.

  • curr[out]: Current value of system setting.

  • min[out]: Minimum configurable value of system setting.

  • max[out]: Maximum configurable value of system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSystemSetting(SystemSetting setting, int& curr, int& min, int& max);
inquireSystemSetting:

Check the current value of a system setting.

Parameters:
  • setting[in]: The system setting to check.

  • curr[out]: Current value of system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSystemSetting(SystemSetting setting, int& curr);
inquireSystemSetting:

Check the current value (bool) of a system setting.

Parameters:
  • setting[in]: The system setting to check.

  • curr[out]: Current value of system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSystemSetting(SystemSetting setting, bool& curr);
inquireSystemSetting:

Check the current value (string) of a system setting.

Parameters:
  • setting[in]: The system setting to check.

  • curr[out]: Current value of system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError inquireSystemSetting(SystemSetting setting, std::string& curr);
configureSystemSetting:

Configure a system setting with given value.

Parameters:
  • setting[in]: The system setting to configure.

  • new_val[in]: Value to write to system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureSystemSetting(SystemSetting setting, int new_val);
configureSystemSetting:

Configure a system setting with given value (bool).

Parameters:
  • setting[in]: The system setting to configure.

  • new_val[in]: Value to write to system setting.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError configureSystemSetting(SystemSetting setting, bool new_val);

Class SlcSdkError

#include "error.h"

Public Members & Functions

SlcSdkStatus:

The DaoAI SDK status data structure.

enum DAOAI_API SlcSdkStatus : int
   {
      SlcSdkSuccess,
      SlcSdkErrorInvalidValue,
      SlcSdkErrorGPUMemoryAllocation,
      SlcSdkErrorVirtualFunctionCalled,
      SlcSdkErrorImageAcquisition,
      SlcSdkErrorFileOperation,
      SlcSdkErrorDeviceConnection,
      SlcSdkErrorDeviceOperation,
      SlcSdkErrorTemperatureRegulation,
      SlcSdkErrorWorkspaceVersion,
      SlcSdkErrorRemoteConnection,
      SlcSdkErrorRemoteVersion
   };
Constructor:

Construct the error class with inital value.

DAOAI_API SlcSdkError(SlcSdkStatus status, std::string detail_text);
Constructor:

Construct the error class with default (invalid error) value.

DAOAI_API SlcSdkError();
status:

Get the status code of the error.

Return:
  • SlcSdkStatus: status code of the error.

DAOAI_API SlcSdkStatus status();
details:

Get the detailed description of the error.

Return:
  • std::string: detailed description of the error.

DAOAI_API std::string details();

Class Frame

#include "frame.h"

Public Members & Functions

Constructor:

Construct the error class with inital value.

DAOAI_API Frame();

Copy Constructor:

DAOAI_API explicit Frame(const std::shared_ptr<Frame>& other);
getPointCloud:

Get the Point Cloud from the Frame.

Parameters:
  • [in] pc: PointCloud object to write contained point cloud data to.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError getPointCloud(PointCloud& pc);
save:

Save the frame.

Parameters:
  • file_name[in]: The path to save the frame. Supports .dcf (DaoAI data format), .ply, .pcd and .daf file suffixes.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError save(const std::string &file_name);
load:

Save the frame.

Parameters:
  • file_name[in]: The path to load the frame.

Return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError load(const std::string &file_name);
isEmpty:

Check whether the frame is empty.

Return:
  • bool: True if frame is empty, false otherwise.

DAOAI_API bool isEmpty();

Class Point Cloud

#include "point_cloud.h"

Public Members & Functions

Constructor:

DAOAI_API PointCloud();

Copy Constructor:

DAOAI_API explicit PointCloud(const std::shared_ptr<PointCloud>& other);

Destructor:

DAOAI_API ~PointCloud();
PointCloud:

Allocate an organized point cloud with a given number of rows and columns

Parameters:
  • rows[in]: the height of the point cloud.

  • cols[in]: the width of the point cloud.

DAOAI_API PointCloud(size_t rows, size_t cols);
isEmpty:

Return whether point cloud is empty

return:
  • bool: whether point cloud is empty.

DAOAI_API bool isEmpty() const;
getWidth:

Return width (number of columns) of point cloud

return:
  • int: width (number of columns) of point cloud.

DAOAI_API int getWidth() const;
getHeight:

Return height (number of rows) of point cloud

return:
  • int: height (number of rows) of point cloud.


DAOAI_API int getHeight() const;

getSize:

Return number of points in point cloud

return:
  • int: size (number of points) of point cloud.


DAOAI_API int getSize() const;

getPoint:

Obtain a reference to a point given by a 1D linear index (from 0 to number of points).

Parameters:
  • idx[in]: index value

return:
  • Point: reference to a point


DAOAI_API Point &operator()(size_t idx);

getPoint:

Obtain a constant reference to a point given by a 1D linear index (from 0 to number of points).

Parameters:
  • idx[in]: index value

return:
  • Point: reference to a point


DAOAI_API const Point &operator()(size_t idx) const;

getPoint:

Obtain a reference to a point given by row and column, i is Row & j is Column

Parameters:
  • i: row

  • j: col

return:
  • Point: reference to a point

DAOAI_API Point operator()(size_t i, size_t j);
getPoint:

Obtain a constant reference to a point given by row and column, i is Row & j is Column

Parameters:
  • i: row

  • j: col

return:
  • Point: reference to a point

DAOAI_API const Point &operator()(size_t i, size_t j) const;
resize:

Resize the point cloud to the given number of rows and columns

Parameters:
  • rows: new row number

  • cols: new col number

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API SlcSdkError resize(size_t rows, size_t cols);
getDataPtr:

Obtain a pointer to the first point in the point cloud

return:
  • Point*: a pointer to the first point in the point cloud.

DAOAI_API Point* getDataPtr() const;
getVecX:

Return a vector of all x coordinate data

return:
  • std::vector<float>: a vector of all x coordinate data

DAOAI_API std::vector<float> getVecX() const;
getVecY:

Return a vector of all y coordinate data

return:
  • std::vector<float>: a vector of all y coordinate data

DAOAI_API std::vector<float> getVecY() const;
getVecZ:

Return a vector of all z coordinate data

return:
  • std::vector<float>: a vector of all z coordinate data

DAOAI_API std::vector<float> getVecZ() const;
getVecRgba:

Return a vector of all rgba color data

return:
  • std::vector<uint32_t>: a vector of all rgba color data.

DAOAI_API std::vector<uint32_t> getVecRgba() const;
getVecConfident:

Return a vector of all confident data

return:
  • std::vector<float>: a vector of all confident data

DAOAI_API std::vector<float> getVecConfident() const;
getVecR:

Return a vector of all red channel data

return:
  • std::vector<uint8_t>: a vector of all r data

DAOAI_API std::vector<uint8_t> getVecR() const;
getVecG:

Return a vector of all green channel data

return:
  • std::vector<uint8_t>: a vector of all g data

DAOAI_API std::vector<uint8_t> getVecG() const;
getVecB:

Return a vector of all blue channel data

return:
  • std::vector<uint8_t>: a vector of all b data

DAOAI_API std::vector<uint8_t> getVecB() const;
getVecA:

Return a vector of all Alpha-channel data

return:
  • std::vector<uint8_t>: a vector of all a data

DAOAI_API std::vector<uint8_t> getVecA() const;
clone:

Make a deep copy of the point cloud

return:
  • PointCloud: Copied point cloud.

DAOAI_API PointCloud clone();

Class Point

#include "point.h"

Public Member Functions

Constructor:

DAOAI_API Point();

Destructor:

DAOAI_API ~Point() {}
isNaN:

Return bool if the point is NaN

return:
  • bool: bool if the point is NaN

DAOAI_API bool isNaN();
getX:

Get x value from the point.

return:
  • float: x value from the point.

DAOAI_API inline float getX() const {
   return this->x_;
}
getY:

Get y value from the point.

return:
  • float: y value from the point.

DAOAI_API inline float getY() const {
   return this->y_;
}
getZ:

Get z value from the point.

return:
  • float: z value from the point.

DAOAI_API inline float getZ() const {
   return this->z_;
}
getR:

Get r value from the point.

return:
  • uint8_t: r value from the point.

DAOAI_API inline uint8_t getR() const {
   return ((rgba_ >> 16) & 0xff);
}
getG:

Get g value from the point.

return:
  • uint8_t: g value from the point.

DAOAI_API inline uint8_t getG() const {
   return ((rgba_ >> 8) & 0xff);
}
getB:

Get b value from the point.

return:
  • uint8_t: b value from the point.

DAOAI_API inline uint8_t getB() const {
   return ((rgba_) & 0xff);
}
getA:

Get a value from the point.

return:
  • uint8_t: a value from the point.

DAOAI_API inline uint8_t getA() const {
   return ((rgba_ >> 24) & 0xff);
}
getRgba:

Get rgba value from the point. NOTE: RGBA value is stored in the form 0xAARRGGBB (ARGB format)

return:
  • uint32_t: rgba value from the point.

DAOAI_API inline uint32_t getRgba() const {
   return this->rgba_;
}
getConfident:

Get confident value from the point.

return:
  • float: confident value from the point.

DAOAI_API inline float getConfident() const {
   return this->confident_;
}
setX:

Assign x value to the point.

parameters:
  • x[in]: value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setX(const float x) {
   x_ = x;
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setY:

Assign y value to the point.

parameters:
  • y[in]: value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setY(const float y) {
   y_ = y;
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setZ:

Assign z value to the point.

parameters:
  • z[in]: value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setZ(const float z) {
   z_ = z;
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setRgba:

Assign rgba value to the point.

parameters:
  • r[in]: red value to assign

  • g[in]: green value to assign

  • b[in]: blue value to assign

  • a[in]: alpha value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setRgba(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a)
{
   rgba_ = static_cast<uint32_t>((a << 24) | (r << 16) | (g << 8) | b);
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setRgba:

Assign rgba value to the point.

parameters:
  • rgba[in]:value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setRgba(const uint32_t rgba)
{
   rgba_ = rgba;
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setRgb:

Assign rgb value to the point, and alpha channel will be set to 255.

parameters:
  • r[in]: red value to assign

  • g[in]: green value to assign

  • b[in]: blue value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setRgb(const uint8_t r, const uint8_t g, const uint8_t b) {
   this->setRgba(r, g, b, 255);
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}
setConfident:

Assign confident value to the point.

parameters:
  • confident[in]: confident value to assign

return:
  • SlcSdkError: struct containing status codes and any error messages.

DAOAI_API inline SlcSdkError setConfident(const float confident) {
   confident_ = confident;
   return SlcSdkError(SlcSdkSuccess, "Successfully modified point data.");
}

operator =:

parameters:
  • point[in]: another Point.

return:
  • Point &: return a reference of a Point.

DAOAI_API Point &operator=(const Point& point);