OrbbecSDK 2.10.6
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::EnhancedDepthFilter Class Reference

Enhanced depth filter that requires a device for activation. More...

#include <Filter.hpp>

Inheritance diagram for ob::EnhancedDepthFilter:

Public Member Functions

template<typename T>
 EnhancedDepthFilter (std::shared_ptr< T > device, const std::string &modelPath="")
 Construct an EnhancedDepthFilter and activate it for the given device.
 ~EnhancedDepthFilter () noexcept override=default
void setResolution (uint32_t width, uint32_t height)
 Set the working resolution of the enhanced depth filter.
uint32_t getCurrentWidth () const
 Get the current configured frame width.
uint32_t getCurrentHeight () const
 Get the current configured frame height.
void setConfidenceThreshold (uint32_t value)
 Set the confidence threshold for depth values.
OBIntPropertyRange getConfidenceThresholdRange ()
 Get the property range of the confidence threshold range.
Public Member Functions inherited from ob::Filter
 Filter (ob_filter *impl)
virtual ~Filter () noexcept
ob_filter * getImpl () const
 Get the Impl object of the filter.
virtual const std::string & getName () const
 Get the type of filter.
virtual void reset () const
 Reset the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
virtual void enable (bool enable) const
 enable the filter
virtual bool isEnabled () const
 Return Enable State.
virtual std::shared_ptr< Frame > process (std::shared_ptr< const Frame > frame) const
 Processes a frame synchronously.
virtual void pushFrame (std::shared_ptr< Frame > frame) const
 Pushes the pending frame into the cache for asynchronous processing.
virtual void setCallBack (FilterCallback callback)
 Set the callback function for asynchronous processing.
virtual std::string getConfigSchema () const
 Get config schema of the filter.
virtual std::vector< OBFilterConfigSchemaItem > getConfigSchemaVec () const
 Get the Config Schema Vec object.
virtual void setConfigValue (const std::string &configName, double value) const
 Set the filter config value by name.
virtual double getConfigValue (const std::string &configName) const
 Get the Config Value object by name.
virtual const char * type ()
template<typename T>
bool is ()
 Check if the runtime type of the filter object is compatible with a given type.
template<typename T>
std::shared_ptr< T > as ()

Static Public Member Functions

static const std::vector< std::pair< uint32_t, uint32_t > > & getSupportedResolutions ()
 Get the resolutions supported by the enhanced depth filter for the constrained (aligned-to) stream.
static std::vector< OBFormat > getSupportedFormats (OBStreamType streamType)
 Get the frame formats supported by the enhanced depth filter for a given stream type.
static bool isSupportedResolution (OBStreamType sourceStreamType, OBStreamType alignToStreamType, uint32_t width, uint32_t height)
 Check whether a resolution is supported by the enhanced depth filter for a given stream alignment pair.
static bool isSupportedFormat (OBStreamType streamType, OBFormat format)
 Check whether a frame format is supported by the enhanced depth filter for a given stream type.

Additional Inherited Members

Protected Member Functions inherited from ob::Filter
 Filter ()=default
 Default constructor with nullptr impl, used for derived classes only.
virtual void init (ob_filter *impl)
Protected Attributes inherited from ob::Filter
ob_filter * impl_ = nullptr
std::string name_
FilterCallback callback_
std::vector< OBFilterConfigSchemaItem > configSchemaVec_

Detailed Description

Enhanced depth filter that requires a device for activation.

Note
The constructor is a template so that Filter.hpp does not need to include Device.hpp. The template is instantiated at the call site where the device type is complete.

Definition at line 2099 of file Filter.hpp.

Constructor & Destructor Documentation

◆ EnhancedDepthFilter()

template<typename T>
ob::EnhancedDepthFilter::EnhancedDepthFilter ( std::shared_ptr< T > device,
const std::string & modelPath = "" )
inlineexplicit

Construct an EnhancedDepthFilter and activate it for the given device.

Parameters
[in]deviceThe device the filter is bound to.
[in]modelPathOptional path to the inference model file used during activation. When empty, the filter falls back to its default model file at extensions/filters/enhanced_depth_filter/model.sm4 (located next to the filter library).

Definition at line 2109 of file Filter.hpp.

◆ ~EnhancedDepthFilter()

ob::EnhancedDepthFilter::~EnhancedDepthFilter ( )
overridedefaultnoexcept

Member Function Documentation

◆ getSupportedResolutions()

const std::vector< std::pair< uint32_t, uint32_t > > & ob::EnhancedDepthFilter::getSupportedResolutions ( )
inlinestatic

Get the resolutions supported by the enhanced depth filter for the constrained (aligned-to) stream.

Returns
The list of supported {width, height} pairs. This is the single source of truth used by isSupportedResolution.

Definition at line 2138 of file Filter.hpp.

Referenced by getSupportedResolutions(), and isSupportedResolution().

◆ getSupportedFormats()

std::vector< OBFormat > ob::EnhancedDepthFilter::getSupportedFormats ( OBStreamType streamType)
inlinestatic

Get the frame formats supported by the enhanced depth filter for a given stream type.

Parameters
[in]streamTypeThe stream type. Only color and depth streams are supported.
Returns
The list of supported formats (color: OB_FORMAT_RGB; depth: OB_FORMAT_Y10, OB_FORMAT_Y11, OB_FORMAT_Y12, OB_FORMAT_Y14, OB_FORMAT_Y16, OB_FORMAT_Z16). Empty for unsupported stream types. This is the single source of truth used by isSupportedFormat.

Definition at line 2156 of file Filter.hpp.

Referenced by isSupportedFormat().

◆ isSupportedResolution()

bool ob::EnhancedDepthFilter::isSupportedResolution ( OBStreamType sourceStreamType,
OBStreamType alignToStreamType,
uint32_t width,
uint32_t height )
inlinestatic

Check whether a resolution is supported by the enhanced depth filter for a given stream alignment pair.

Parameters
[in]sourceStreamTypeThe source stream type that provides the input frames.
[in]alignToStreamTypeThe target stream type that the source stream is aligned to.
[in]widthThe frame width to validate.
[in]heightThe frame height to validate.
Returns
true if the resolution is supported for the specified alignment combination, otherwise false.

Definition at line 2176 of file Filter.hpp.

◆ isSupportedFormat()

bool ob::EnhancedDepthFilter::isSupportedFormat ( OBStreamType streamType,
OBFormat format )
inlinestatic

Check whether a frame format is supported by the enhanced depth filter for a given stream type.

Parameters
[in]streamTypeThe stream type to validate. Only color and depth streams are supported.
[in]formatThe frame format to validate.
Returns
true if the format is supported for the given stream type, otherwise false.

Definition at line 2198 of file Filter.hpp.

◆ setResolution()

void ob::EnhancedDepthFilter::setResolution ( uint32_t width,
uint32_t height )
inline

Set the working resolution of the enhanced depth filter.

Parameters
[in]widthThe target frame width.
[in]heightThe target frame height.

Definition at line 2213 of file Filter.hpp.

◆ getCurrentWidth()

uint32_t ob::EnhancedDepthFilter::getCurrentWidth ( ) const
inline

Get the current configured frame width.

Returns
uint32_t The current width.

Definition at line 2223 of file Filter.hpp.

◆ getCurrentHeight()

uint32_t ob::EnhancedDepthFilter::getCurrentHeight ( ) const
inline

Get the current configured frame height.

Returns
uint32_t The current height.

Definition at line 2232 of file Filter.hpp.

◆ setConfidenceThreshold()

void ob::EnhancedDepthFilter::setConfidenceThreshold ( uint32_t value)
inline

Set the confidence threshold for depth values.

Parameters
valueThe confidence threshold.

Definition at line 2241 of file Filter.hpp.

◆ getConfidenceThresholdRange()

OBIntPropertyRange ob::EnhancedDepthFilter::getConfidenceThresholdRange ( )
inline

Get the property range of the confidence threshold range.

Definition at line 2248 of file Filter.hpp.


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