Orbbec SDK K4A Wrapper
Loading...
Searching...
No Matches
k4a::capture Class Reference

#include <k4a/k4a.hpp>

Public Member Functions

 capture (k4a_capture_t handle=nullptr) noexcept
 
 capture (const capture &other) noexcept
 
 capture (capture &&other) noexcept
 
captureoperator= (const capture &other) noexcept
 
captureoperator= (capture &&other) noexcept
 
captureoperator= (std::nullptr_t) noexcept
 
bool operator== (const capture &other) const noexcept
 
bool operator== (std::nullptr_t) const noexcept
 
bool operator!= (const capture &other) const noexcept
 
bool operator!= (std::nullptr_t) const noexcept
 
 operator bool () const noexcept
 
bool is_valid () const noexcept
 
k4a_capture_t handle () const noexcept
 
void reset () noexcept
 
image get_color_image () const noexcept
 
image get_depth_image () const noexcept
 
image get_ir_image () const noexcept
 
void set_color_image (const image &color_image) noexcept
 
void set_depth_image (const image &depth_image) noexcept
 
void set_ir_image (const image &ir_image) noexcept
 
void set_temperature_c (float temperature_c) noexcept
 
float get_temperature_c () const noexcept
 

Static Public Member Functions

static capture create ()
 

Detailed Description

Wrapper for k4a_capture_t

Wraps a handle for a capture. Copying/moving is cheap, copies are shallow.

Definition at line 426 of file k4a.hpp.

Constructor & Destructor Documentation

◆ capture() [1/3]

k4a::capture::capture ( k4a_capture_t  handle = nullptr)
inlinenoexcept

Creates a capture from a k4a_capture_t Takes ownership of the handle, i.e. assuming that handle has a refcount of 1, you should not call k4a_capture_release on the handle after giving it to the capture; the capture will take care of that.

Definition at line 434 of file k4a.hpp.

◆ capture() [2/3]

k4a::capture::capture ( const capture other)
inlinenoexcept

Creates a shallow copy of another capture

Definition at line 438 of file k4a.hpp.

◆ capture() [3/3]

k4a::capture::capture ( capture &&  other)
inlinenoexcept

Moves another capture into a new capture

Definition at line 448 of file k4a.hpp.

◆ ~capture()

k4a::capture::~capture ( )
inline

Definition at line 453 of file k4a.hpp.

Member Function Documentation

◆ create()

static capture k4a::capture::create ( )
inlinestatic

Create an empty capture object. Throws error on failure.

See also
k4a_capture_create

Definition at line 642 of file k4a.hpp.

◆ get_color_image()

image k4a::capture::get_color_image ( ) const
inlinenoexcept

Get the color image associated with the capture

See also
k4a_capture_get_color_image

Definition at line 565 of file k4a.hpp.

◆ get_depth_image()

image k4a::capture::get_depth_image ( ) const
inlinenoexcept

Get the depth image associated with the capture

See also
k4a_capture_get_depth_image

Definition at line 574 of file k4a.hpp.

◆ get_ir_image()

image k4a::capture::get_ir_image ( ) const
inlinenoexcept

Get the IR image associated with the capture

See also
k4a_capture_get_ir_image

Definition at line 583 of file k4a.hpp.

◆ get_temperature_c()

float k4a::capture::get_temperature_c ( ) const
inlinenoexcept

Get temperature (in Celsius) associated with the capture.

Attention
For the Orbbec SDK K4A wrapper, this function is not yet supported.
See also
k4a_capture_get_temperature_c

Definition at line 632 of file k4a.hpp.

◆ handle()

k4a_capture_t k4a::capture::handle ( ) const
inlinenoexcept

Returns the underlying k4a_capture_t handle

Note that this function does not increment the reference count on the k4a_capture_t. The caller is responsible for incrementing the reference count on the k4a_capture_t if the caller needs the k4a_capture_t to outlive this C++ object. Otherwise, the k4a_capture_t will be destroyed by this C++ object.

Definition at line 545 of file k4a.hpp.

◆ is_valid()

bool k4a::capture::is_valid ( ) const
inlinenoexcept

Returns true if the capture is valid, false otherwise

Definition at line 533 of file k4a.hpp.

◆ operator bool()

k4a::capture::operator bool ( ) const
inlineexplicitnoexcept

Returns true if the capture is valid, false otherwise

Definition at line 526 of file k4a.hpp.

◆ operator!=() [1/2]

bool k4a::capture::operator!= ( const capture other) const
inlinenoexcept

Returns true if two captures wrap different k4a_capture_t instances, false otherwise

Definition at line 512 of file k4a.hpp.

◆ operator!=() [2/2]

bool k4a::capture::operator!= ( std::nullptr_t  ) const
inlinenoexcept

Returns true if the capture is valid, false otherwise

Definition at line 519 of file k4a.hpp.

◆ operator=() [1/3]

capture & k4a::capture::operator= ( capture &&  other)
inlinenoexcept

Moves another capture into this capture; other is set to invalid

Definition at line 477 of file k4a.hpp.

◆ operator=() [2/3]

capture & k4a::capture::operator= ( const capture other)
inlinenoexcept

Sets capture to a shallow copy of the other image

Definition at line 461 of file k4a.hpp.

◆ operator=() [3/3]

capture & k4a::capture::operator= ( std::nullptr_t  )
inlinenoexcept

Invalidates this capture

Definition at line 490 of file k4a.hpp.

◆ operator==() [1/2]

bool k4a::capture::operator== ( const capture other) const
inlinenoexcept

Returns true if two captures refer to the same k4a_capture_t, false otherwise

Definition at line 498 of file k4a.hpp.

◆ operator==() [2/2]

bool k4a::capture::operator== ( std::nullptr_t  ) const
inlinenoexcept

Returns false if the capture is valid, true otherwise

Definition at line 505 of file k4a.hpp.

◆ reset()

void k4a::capture::reset ( )
inlinenoexcept

Releases the underlying k4a_capture_t; the capture is set to invalid.

Definition at line 552 of file k4a.hpp.

◆ set_color_image()

void k4a::capture::set_color_image ( const image color_image)
inlinenoexcept

Set / add a color image to the capture

See also
k4a_capture_set_color_image

Definition at line 592 of file k4a.hpp.

◆ set_depth_image()

void k4a::capture::set_depth_image ( const image depth_image)
inlinenoexcept

Set / add a depth image to the capture

See also
k4a_capture_set_depth_image

Definition at line 601 of file k4a.hpp.

◆ set_ir_image()

void k4a::capture::set_ir_image ( const image ir_image)
inlinenoexcept

Set / add an IR image to the capture

See also
k4a_capture_set_ir_image

Definition at line 610 of file k4a.hpp.

◆ set_temperature_c()

void k4a::capture::set_temperature_c ( float  temperature_c)
inlinenoexcept

Set the temperature associated with the capture in Celsius.

Attention
For the Orbbec SDK K4A wrapper, this function is not yet supported.
See also
k4a_capture_set_temperature_c

Definition at line 621 of file k4a.hpp.


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