Class RGBD

Inheritance Relationships

Base Type

Class Documentation

class RGBD : public dai::NodeCRTP<ThreadedHostNode, RGBD>

RGBD node. Combines depth and color frames into a single point cloud.

Public Functions

RGBD()
~RGBD()
std::shared_ptr<RGBD> build()
std::shared_ptr<RGBD> build(bool autocreate, StereoDepth::PresetMode mode = StereoDepth::PresetMode::DEFAULT, std::pair<int, int> size = {640, 400}, std::optional<float> fps = std::nullopt)

Build RGBD node with specified size. Note that this API is global and if used autocreated cameras can’t be reused.

Parameters:
  • autocreate – If true, will create color and depth nodes if they don’t exist.

  • size – Size of the frames

void runSyncOnHost(bool runOnHost)
void setSyncThreshold(std::chrono::nanoseconds syncThreshold)
void setDepthUnit(StereoDepthConfig::AlgorithmControl::DepthUnit depthUnit)
void useCPU()

Use single-threaded CPU for processing.

void useCPUMT(uint32_t numThreads = 2)

Use multi-threaded CPU for processing.

Parameters:

numThreads – Number of threads to use

void useGPU(uint32_t device = 0)

Use GPU for processing (needs to be compiled with Kompute support)

Parameters:

device – GPU device index

void printDevices()

Print available GPU devices.

void buildInternal() override

Public Members

Subnode<node::Sync> sync = {*this, "sync"}
InputMap &inputs = sync->inputs
std::string colorInputName = "inColorSync"
std::string depthInputName = "inDepthSync"
Input &inColor = inputs[colorInputName]
Input &inDepth = inputs[depthInputName]
Output pcl = {*this, {"pcl", DEFAULT_GROUP, {{DatatypeEnum::PointCloudData, true}}}}

Output point cloud.

Output rgbd = {*this, {"rgbd", DEFAULT_GROUP, {{DatatypeEnum::RGBDData, true}}}}

Output RGBD frames.

Public Static Attributes

static constexpr const char *NAME = "RGBD"