24#include <unordered_map>
65 range.cur =
static_cast<valueType
>(cur);
66 range.def =
static_cast<valueType
>(item.
def);
67 range.max =
static_cast<valueType
>(item.
max);
68 range.min =
static_cast<valueType
>(item.
min);
69 range.step =
static_cast<valueType
>(item.
step);
76class Filter :
public std::enable_shared_from_this<Filter> {
101 for(uint32_t i = 0; i < count; i++) {
117 if(
impl_ !=
nullptr) {
178 virtual std::shared_ptr<Frame>
process(std::shared_ptr<const Frame> frame)
const {
185 return std::make_shared<Frame>(result);
193 virtual void pushFrame(std::shared_ptr<Frame> frame)
const {
269 static void filterCallback(
ob_frame *frame,
void *userData) {
270 auto filter =
static_cast<Filter *
>(userData);
271 filter->
callback_(std::make_shared<Frame>(frame));
287 template <
typename T>
bool is();
289 template <
typename T> std::shared_ptr<T>
as() {
291 throw std::runtime_error(
"unsupported operation, object's type is not require type");
294 return std::static_pointer_cast<T>(shared_from_this());
310 return std::make_shared<Filter>(impl);
320 static std::shared_ptr<Filter>
createPrivateFilter(
const std::string &name,
const std::string &activationKey) {
324 return std::make_shared<Filter>(impl);
448 setConfigValue(
"AlignType",
static_cast<double>(alignToStreamType));
451 virtual ~Align() noexcept override = default;
530 std::map<float, std::string> sequenceIdList_{ { 0.f,
"all" }, { 1.f,
"1" } };
533 void initSequenceIdList() {
537 for(
const auto &pair: sequenceIdList_) {
538 outputSequenceIdList_[i].sequenceSelectId =
static_cast<int>(pair.first);
539 strncpy(outputSequenceIdList_[i].name, pair.second.c_str(),
sizeof(outputSequenceIdList_[i].name) - 1);
540 outputSequenceIdList_[i].name[
sizeof(outputSequenceIdList_[i].name) - 1] =
'\0';
551 initSequenceIdList();
555 if(outputSequenceIdList_) {
556 delete[] outputSequenceIdList_;
557 outputSequenceIdList_ =
nullptr;
580 return outputSequenceIdList_;
589 return static_cast<int>(sequenceIdList_.size());
659 for(
const auto &item: schemaVec) {
660 if(strcmp(item.name,
"min") == 0) {
676 for(
const auto &item: schemaVec) {
677 if(strcmp(item.name,
"max") == 0) {
722 for(
const auto &item: schemaVec) {
723 if(strcmp(item.name,
"alpha") == 0) {
739 for(
const auto &item: schemaVec) {
740 if(strcmp(item.name,
"disp_diff") == 0) {
756 for(
const auto &item: schemaVec) {
757 if(strcmp(item.name,
"radius") == 0) {
773 for(
const auto &item: schemaVec) {
774 if(strcmp(item.name,
"magnitude") == 0) {
832 for(
const auto &item: schemaVec) {
833 if(strcmp(item.name,
"radius") == 0) {
885 for(
const auto &item: schemaVec) {
886 if(strcmp(item.name,
"magnitude") == 0) {
902 for(
const auto &item: schemaVec) {
903 if(strcmp(item.name,
"radius") == 0) {
919 for(
const auto &item: schemaVec) {
920 if(strcmp(item.name,
"disp_diff") == 0) {
1006 setConfigValue(
"max_size",
static_cast<double>(filterParams.max_size));
1007 setConfigValue(
"min_diff",
static_cast<double>(filterParams.disp_diff));
1031 for(
const auto &item: schemaVec) {
1032 if(strcmp(item.name,
"min_diff") == 0) {
1047 for(
const auto &item: schemaVec) {
1048 if(strcmp(item.name,
"max_size") == 0) {
1079 for(
const auto &item: schemaVec) {
1080 if(strcmp(item.name,
"diff_scale") == 0) {
1105 for(
const auto &item: schemaVec) {
1106 if(strcmp(item.name,
"weight") == 0) {
1145 for(
const auto &item: schemaVec) {
1146 if(strcmp(item.name,
"margin_x_th") == 0) {
1161 for(
const auto &item: schemaVec) {
1162 if(strcmp(item.name,
"margin_y_th") == 0) {
1177 for(
const auto &item: schemaVec) {
1178 if(strcmp(item.name,
"limit_x_th") == 0) {
1193 for(
const auto &item: schemaVec) {
1194 if(strcmp(item.name,
"limit_y_th") == 0) {
1209 for(
const auto &item: schemaVec) {
1210 if(strcmp(item.name,
"enable_vertical_direction") == 0) {
1225 for(
const auto &item: schemaVec) {
1226 if(strcmp(item.name,
"width") == 0) {
1241 for(
const auto &item: schemaVec) {
1242 if(strcmp(item.name,
"height") == 0) {
1306 for(
const auto &item: schemaVec) {
1307 if(strcmp(item.name,
"fpEdgeBleedFilterEnable") == 0) {
1323 for(
const auto &item: schemaVec) {
1324 if(strcmp(item.name,
"fpebfROIMinXRatio") == 0) {
1340 for(
const auto &item: schemaVec) {
1341 if(strcmp(item.name,
"fpebfROIMaxXRatio") == 0) {
1357 for(
const auto &item: schemaVec) {
1358 if(strcmp(item.name,
"fpebfROIMinYRatio") == 0) {
1374 for(
const auto &item: schemaVec) {
1375 if(strcmp(item.name,
"fpebfROIMaxYRatio") == 0) {
1391 for(
const auto &item: schemaVec) {
1392 if(strcmp(item.name,
"fpTextureSparsityFilterEnable") == 0) {
1408 for(
const auto &item: schemaVec) {
1409 if(strcmp(item.name,
"fptsfROIMinXRatio") == 0) {
1425 for(
const auto &item: schemaVec) {
1426 if(strcmp(item.name,
"fptsfROIMaxXRatio") == 0) {
1442 for(
const auto &item: schemaVec) {
1443 if(strcmp(item.name,
"fptsfROIMinYRatio") == 0) {
1459 for(
const auto &item: schemaVec) {
1460 if(strcmp(item.name,
"fptsfROIMaxYRatio") == 0) {
1476 for(
const auto &item: schemaVec) {
1477 if(strcmp(item.name,
"fptsfMaxNoiseLevel") == 0) {
1493 for(
const auto &item: schemaVec) {
1494 if(strcmp(item.name,
"fptsfMaxSpeckleSize") == 0) {
1510 for(
const auto &item: schemaVec) {
1511 if(strcmp(item.name,
"fpPatternAmbiguityFilterEnable") == 0) {
1527 for(
const auto &item: schemaVec) {
1528 if(strcmp(item.name,
"fppafROIMinXRatio") == 0) {
1544 for(
const auto &item: schemaVec) {
1545 if(strcmp(item.name,
"fppafROIMaxXRatio") == 0) {
1561 for(
const auto &item: schemaVec) {
1562 if(strcmp(item.name,
"fppafROIMinYRatio") == 0) {
1578 for(
const auto &item: schemaVec) {
1579 if(strcmp(item.name,
"fppafROIMaxYRatio") == 0) {
1595 for(
const auto &item: schemaVec) {
1596 if(strcmp(item.name,
"fppafMaxNoiseLevel") == 0) {
1612 for(
const auto &item: schemaVec) {
1613 if(strcmp(item.name,
"fppafMaxSpeckleSize") == 0) {
1641 setConfigValue(
"max_width_left",
static_cast<double>(filterParams.max_width_left));
1642 setConfigValue(
"max_width_right",
static_cast<double>(filterParams.max_width_right));
1643 setConfigValue(
"max_radius",
static_cast<double>(filterParams.max_radius));
1644 setConfigValue(
"margin_x_th",
static_cast<double>(filterParams.margin_x_th));
1645 setConfigValue(
"margin_y_th",
static_cast<double>(filterParams.margin_y_th));
1646 setConfigValue(
"limit_x_th",
static_cast<double>(filterParams.limit_x_th));
1647 setConfigValue(
"limit_y_th",
static_cast<double>(filterParams.limit_y_th));
1648 setConfigValue(
"width",
static_cast<double>(filterParams.width));
1649 setConfigValue(
"height",
static_cast<double>(filterParams.height));
1677 for(
const auto &item: schemaVec) {
1678 if(strcmp(item.name,
"max_width_left") == 0) {
1693 for(
const auto &item: schemaVec) {
1694 if(strcmp(item.name,
"max_width_right") == 0) {
1709 for(
const auto &item: schemaVec) {
1710 if(strcmp(item.name,
"max_radius") == 0) {
1725 for(
const auto &item: schemaVec) {
1726 if(strcmp(item.name,
"margin_x_th") == 0) {
1741 for(
const auto &item: schemaVec) {
1742 if(strcmp(item.name,
"margin_y_th") == 0) {
1757 for(
const auto &item: schemaVec) {
1758 if(strcmp(item.name,
"limit_x_th") == 0) {
1773 for(
const auto &item: schemaVec) {
1774 if(strcmp(item.name,
"limit_y_th") == 0) {
1789 for(
const auto &item: schemaVec) {
1790 if(strcmp(item.name,
"width") == 0) {
1805 for(
const auto &item: schemaVec) {
1806 if(strcmp(item.name,
"height") == 0) {
1834 for(
int i = 0; i < 16; ++i) {
1835 setConfigValue(
"max_lut_" + std::to_string(i),
static_cast<double>(filterParams.max_lut[i]));
1837 setConfigValue(
"min_diff",
static_cast<double>(filterParams.min_diff));
1838 setConfigValue(
"width",
static_cast<double>(filterParams.width));
1839 setConfigValue(
"height",
static_cast<double>(filterParams.height));
1848 for(
int i = 0; i < 16; ++i) {
1864 if(index < 0 || index >= 16) {
1867 std::string name =
"max_lut_" + std::to_string(index);
1869 for(
const auto &item: schemaVec) {
1870 if(strcmp(item.name, name.c_str()) == 0) {
1885 for(
const auto &item: schemaVec) {
1886 if(strcmp(item.name,
"min_diff") == 0) {
1901 for(
const auto &item: schemaVec) {
1902 if(strcmp(item.name,
"width") == 0) {
1917 for(
const auto &item: schemaVec) {
1918 if(strcmp(item.name,
"height") == 0) {
1944 ob_filter_list_t *impl_;
1978 return std::make_shared<Filter>(filter);
1992 static const std::unordered_map<std::string, std::type_index> filterTypeMap = {
2005 return filterTypeMap;
2015 std::string name =
type();
2018 auto it = filterTypeMap.find(name);
2019 if(it != filterTypeMap.end()) {
2020 return std::type_index(
typeid(T)) == it->second;
This file defines the Error class, which describes abnormal errors within the SDK....
The processing unit of the SDK can perform point cloud generation, format conversion and other functi...
OB_EXPORT const char * ob_filter_get_vendor_specific_code(const char *name, ob_error **error)
Get the vendor specific code of a filter by filter name.
OB_EXPORT void ob_align_filter_set_align_to_stream_profile(ob_filter *filter, const ob_stream_profile *align_to_stream_profile, ob_error **error)
Set the align to stream profile for the align filter.
OB_EXPORT void ob_delete_filter_list(ob_filter_list *filter_list, ob_error **error)
Delete a list of ob_filter objects.
OB_EXPORT void ob_filter_push_frame(ob_filter *filter, const ob_frame *frame, ob_error **error)
Push the frame into the pending cache for the filter (asynchronous callback interface).
OB_EXPORT ob_frame * ob_filter_process(ob_filter *filter, const ob_frame *frame, ob_error **error)
Process the frame (synchronous interface).
OB_EXPORT ob_filter_config_schema_item ob_filter_config_schema_list_get_item(const ob_filter_config_schema_list *config_schema_list, uint32_t index, ob_error **error)
Get the config schema item by index.
OB_EXPORT void ob_filter_reset(ob_filter *filter, ob_error **error)
Reset the filter, clears the cache, and resets the state. If the asynchronous interface is used,...
OB_EXPORT const char * ob_filter_get_config_schema(const ob_filter *filter, ob_error **error)
Get config schema of the filter.
OB_EXPORT ob_filter * ob_create_private_filter(const char *name, const char *activation_key, ob_error **error)
Create a private Filter object with activation key.
OB_EXPORT void ob_filter_set_callback(ob_filter *filter, ob_filter_callback callback, void *user_data, ob_error **error)
Set the processing result callback function for the filter (asynchronous callback interface).
OB_EXPORT bool ob_filter_is_enabled(const ob_filter *filter, ob_error **error)
Get the enable status of the frame post processing.
OB_EXPORT uint32_t ob_filter_config_schema_list_get_count(const ob_filter_config_schema_list *config_schema_list, ob_error **error)
Get the number of config schema items in the config schema list.
OB_EXPORT const char * ob_filter_get_name(const ob_filter *filter, ob_error **error)
Get the name of ob_filter.
OB_EXPORT void ob_delete_filter(ob_filter *filter, ob_error **error)
Delete the filter.
OB_EXPORT double ob_filter_get_config_value(const ob_filter *filter, const char *config_name, ob_error **error)
Get the filter config value by name and cast to double.
OB_EXPORT ob_filter * ob_filter_list_get_filter(const ob_filter_list *filter_list, uint32_t index, ob_error **error)
Get the filter by index.
OB_EXPORT ob_filter * ob_create_filter(const char *name, ob_error **error)
Create a Filter object.
OB_EXPORT uint32_t ob_filter_list_get_count(const ob_filter_list *filter_list, ob_error **error)
Get the number of filter in the list.
OB_EXPORT void ob_filter_set_config_value(ob_filter *filter, const char *config_name, double value, ob_error **error)
Set the filter config value by name.
OB_EXPORT void ob_filter_enable(ob_filter *filter, bool enable, ob_error **error)
Enable the frame post processing.
OB_EXPORT ob_filter_config_schema_list * ob_filter_get_config_schema_list(const ob_filter *filter, ob_error **error)
Get the filter config schema list of the filter.
OB_EXPORT void ob_delete_filter_config_schema_list(ob_filter_config_schema_list *config_schema_list, ob_error **error)
Delete a list of filter config schema items.
Frame related function is mainly used to obtain frame data and frame information.
Frame related type, which is mainly used to obtain frame data and frame information.
struct ob_frame_t ob_frame
OBFormat
Enumeration value describing the pixel format.
OBStreamType
Enumeration value describing the type of data stream.
struct ob_filter_t ob_filter
enum OB_COORDINATE_SYSTEM_TYPE OBCoordinateSystemType
OBHoleFillingMode
Hole fillig mode.
OBConvertFormat
Enumeration of format conversion types.
Align for depth to other or other to depth.
Align(OBStreamType alignToStreamType)
virtual ~Align() noexcept override=default
OBStreamType getAlignToStreamType()
void setMatchTargetResolution(bool state)
Sets whether the output frame resolution should match the target resolution. When enabled,...
void setAlignToStreamProfile(std::shared_ptr< const StreamProfile > profile)
Set the Align To Stream Profile.
Decimation filter, reducing complexity by subsampling depth maps and losing depth details.
virtual ~DecimationFilter() noexcept override=default
OBUint8PropertyRange getScaleRange()
Get the property range of the decimation filter scale value.
uint8_t getScaleValue()
Get the decimation filter scale value.
void setScaleValue(uint8_t value)
Set the decimation filter scale value.
OBUint16PropertyRange getVerticalDirectionEnableRange()
Get the edge noise removal filter vertical direction enable range.
OBUint16PropertyRange getLimitXthRange()
Get the edge noise removal filter limit x th range.
EdgeNoiseRemovalFilter(const std::string &activationKey="")
OBUint16PropertyRange getHeightRange()
Get the edge noise removal filter height range.
OBUint16PropertyRange getWidthRange()
Get the edge noise removal filter width range.
OBEdgeNoiseRemovalFilterParams getFilterParams()
Get the edge noise removal filter params.
~EdgeNoiseRemovalFilter() noexcept override=default
OBUint16PropertyRange getMarginYthRange()
Get the edge noise removal filter margin y th range.
OBUint16PropertyRange getLimitYthRange()
Get the edge noise removal filter limit y th range.
OBUint16PropertyRange getMarginXthRange()
Get the edge noise removal filter margin x th range.
void setFilterParams(OBEdgeNoiseRemovalFilterParams filterParams)
Set the edge noise removal filter params.
static void handle(ob_error **error, bool throw_exception=true)
A static function to handle the ob_error and throw an exception if needed.
OBFloatPropertyRange getfppafROIMaxYRatioRange()
Get the FalsePositive filter fppafROIMaxYRatio range.
OBFloatPropertyRange getfptsfROIMinXRatioRange()
Get the FalsePositive filter fptsfROIMinXRatio range.
OBFloatPropertyRange getfptsfROIMaxYRatioRange()
Get the FalsePositive filter fptsfROIMaxYRatio range.
OBFloatPropertyRange getfpebfROIMinXRatioRange()
Get the FalsePositive filter fpebfROIMinXRatio range.
OBFloatPropertyRange getfptsfROIMinYRatioRange()
Get the FalsePositive filter fptsfROIMinYRatio range.
OBUint16PropertyRange getfppafMaxNoiseLevelRange()
Get the FalsePositive filter fppafMaxNoiseLevel range.
OBUint16PropertyRange getfptsfMaxSpeckleSizeRange()
Get the FalsePositive filter fptsfMaxSpeckleSize range.
virtual ~FalsePositiveFilter() noexcept override=default
OBUint8PropertyRange getfpPatternAmbiguityFilterEnableRange()
Get the FalsePositive filter fpPatternAmbiguityFilterEnable range.
OBUint8PropertyRange getfpTextureSparsityFilterEnableRange()
Get the FalsePositive filter fpTextureSparsityFilterEnable range.
OBFloatPropertyRange getfppafROIMinYRatioRange()
Get the FalsePositive filter fppafROIMinYRatio range.
OBUint8PropertyRange getfpEdgeBleedFilterEnableRange()
Get the FalsePositive filter fpEdgeBleedFilterEnable range.
FalsePositiveFilter(const std::string &activationKey="")
OBUint16PropertyRange getfptsfMaxNoiseLevelRange()
Get the FalsePositive filter fptsfMaxNoiseLevel range.
OBFloatPropertyRange getfptsfROIMaxXRatioRange()
Get the FalsePositive filter fptsfROIMaxXRatio range.
OBFloatPropertyRange getfppafROIMinXRatioRange()
Get the FalsePositive filter fppafROIMinXRatio range.
OBUint16PropertyRange getfppafMaxSpeckleSizeRange()
Get the FalsePositive filter fppafMaxSpeckleSize range.
OBFloatPropertyRange getfpebfROIMaxYRatioRange()
Get the FalsePositive filter fpebfROIMaxYRatio range.
OBFloatPropertyRange getfppafROIMaxXRatioRange()
Get the FalsePositive filter fppafROIMaxXRatio range.
OBFloatPropertyRange getfpebfROIMinYRatioRange()
Get the FalsePositive filter fpebfROIMinYRatio range.
OBFloatPropertyRange getfpebfROIMaxXRatioRange()
Get the FalsePositive filter fpebfROIMaxXRatio range.
A factory class for creating filters.
static std::string getFilterVendorSpecificCode(const std::string &name)
Get the vendor specific code of a filter by filter name.
static std::shared_ptr< Filter > createFilter(const std::string &name)
Create a filter by name.
static std::shared_ptr< Filter > createPrivateFilter(const std::string &name, const std::string &activationKey)
Create a private filter by name and activation key.
The Filter class is the base class for all filters in the SDK.
bool is()
Check if the runtime type of the filter object is compatible with a given type.
virtual void init(ob_filter *impl)
std::shared_ptr< T > as()
virtual const std::string & getName() const
Get the type of filter.
virtual std::vector< OBFilterConfigSchemaItem > getConfigSchemaVec() const
Get the Config Schema Vec object.
virtual void enable(bool enable) const
enable the filter
virtual void setConfigValue(const std::string &configName, double value) const
Set the filter config value by name.
virtual std::string getConfigSchema() const
Get config schema of the filter.
std::vector< OBFilterConfigSchemaItem > configSchemaVec_
virtual bool isEnabled() const
Return Enable State.
Filter()=default
Default constructor with nullptr impl, used for derived classes only.
virtual void pushFrame(std::shared_ptr< Frame > frame) const
Pushes the pending frame into the cache for asynchronous processing.
virtual std::shared_ptr< Frame > process(std::shared_ptr< const Frame > frame) const
Processes a frame synchronously.
ob_filter * getImpl() const
Get the Impl object of the filter.
virtual void reset() const
Reset the filter, freeing the internal cache, stopping the processing thread, and clearing the pendin...
virtual const char * type()
virtual double getConfigValue(const std::string &configName) const
Get the Config Value object by name.
virtual void setCallBack(FilterCallback callback)
Set the callback function for asynchronous processing.
virtual ~Filter() noexcept
HdrMerge processing block, the processing merges between depth frames with different sub-preset seque...
virtual ~HdrMerge() noexcept override=default
Hole filling filter,the processing performed depends on the selected hole filling mode.
void setFilterMode(OBHoleFillingMode mode)
Set the HoleFillingFilter mode.
HoleFillingFilter(const std::string &activationKey="")
OBHoleFillingMode getFilterMode()
Get the HoleFillingFilter mode.
~HoleFillingFilter() noexcept override=default
OBUint16PropertyRange getHeightRange()
Get the lut noise removal filter height range.
OBUint16PropertyRange getMinDiffRange()
Get the lut noise removal filter min_diff range.
OBLutNoiseRemovalFilterParams getFilterParams()
Get the lut noise removal filter params.
OBUint16PropertyRange getWidthRange()
Get the lut noise removal filter width range.
OBUint16PropertyRange getMaxLutRange(int index)
Get the lut noise removal filter max_lut range for a given index (0-15).
~LutNoiseRemovalFilter() noexcept override=default
LutNoiseRemovalFilter(const std::string &activationKey="")
void setFilterParams(OBLutNoiseRemovalFilterParams filterParams)
Set the lut noise removal filter params.
OBUint16PropertyRange getWidthRange()
Get the mgc noise removal filter width range.
OBUint16PropertyRange getHeightRange()
Get the mgc noise removal filter height range.
OBUint16PropertyRange getMaxWidthRightRange()
Get the mgc noise removal filter max_width_right range.
OBUint16PropertyRange getMaxWidthLeftRange()
Get the mgc noise removal filter max_width_left range.
OBUint16PropertyRange getLimitYthRange()
Get the mgc noise removal filter limit_y_th range.
void setFilterParams(OBMgcNoiseRemovalFilterParams filterParams)
Set the mgc noise removal filter params.
MgcNoiseRemovalFilter(const std::string &activationKey="")
OBUint16PropertyRange getMarginXthRange()
Get the mgc noise removal filter margin_x_th range.
OBUint16PropertyRange getLimitXthRange()
Get the mgc noise removal filter limit_x_th range.
OBMgcNoiseRemovalFilterParams getFilterParams()
Get the mgc noise removal filter params.
OBUint16PropertyRange getMarginYthRange()
Get the mgc noise removal filter margin_y_th range.
~MgcNoiseRemovalFilter() noexcept override=default
OBUint16PropertyRange getMaxRadiusRange()
Get the mgc noise removal filter max_radius range.
The noise removal filter,removing scattering depth pixels.
OBUint16PropertyRange getDispDiffRange()
Get the noise removal filter disp diff range.
void setFilterParams(OBNoiseRemovalFilterParams filterParams)
Set the noise removal filter params.
NoiseRemovalFilter(const std::string &activationKey="")
~NoiseRemovalFilter() noexcept override=default
OBUint16PropertyRange getMaxSizeRange()
Get the noise removal filter max size range.
OBNoiseRemovalFilterParams getFilterParams()
Get the noise removal filter params.
uint32_t getCount() const
Get the number of filters.
std::shared_ptr< Filter > getFilter(uint32_t index)
Get the Filter object at the specified index.
OBFilterList(ob_filter_list_t *impl)
The PointCloudFilter class is a subclass of Filter that generates point clouds.
void setCoordinateSystem(OBCoordinateSystemType type)
Set the point cloud coordinate system.
void setCoordinateDataScaled(float factor)
Set the point cloud coordinate data zoom factor.
void setCameraParam(OBCameraParam param)
void setPositionDataScaled(float scale)
void setCreatePointFormat(OBFormat format)
Set the output pointcloud frame format.
virtual ~PointCloudFilter() noexcept override=default
void setFrameAlignState(bool state)
OBIntPropertyRange getDecimationFactorRange()
Get the property range of the decimation factor range.
void setDecimationFactor(int value)
Set the point cloud decimation factor. Calling this function to decimation factor will output thedown...
void setColorDataNormalization(bool state)
Set point cloud color data normalization.
Create SequenceIdFilter processing block.
int getSelectSequenceId()
Get the current sequence id.
void selectSequenceId(int sequence_id)
Set the sequenceId filter params.
virtual ~SequenceIdFilter() noexcept override
OBSequenceIdItem * getSequenceIdList()
int getSequenceIdListSize()
Get the sequenceId list size.
Spatial advanced filte smooths the image by calculating frame with alpha and delta settings alpha def...
void setFilterParams(OBSpatialAdvancedFilterParams params)
Set the spatial advanced filter params.
OBSpatialAdvancedFilterParams getFilterParams()
Get the spatial advanced filter params.
OBUint16PropertyRange getRadiusRange()
Get the spatial advanced filter radius range.
SpatialAdvancedFilter(const std::string &activationKey="")
OBFloatPropertyRange getAlphaRange()
Get the spatial advanced filter alpha range.
OBUint16PropertyRange getDispDiffRange()
Get the spatial advanced filter dispdiff range.
virtual ~SpatialAdvancedFilter() noexcept override=default
OBIntPropertyRange getMagnitudeRange()
Get the spatial advanced filter magnitude range.
The Spatial Fast Filter utilizes an enhanced median smoothing algorithm, designed to significantly re...
virtual ~SpatialFastFilter() noexcept override=default
SpatialFastFilter(const std::string &activationKey="")
void setFilterParams(OBSpatialFastFilterParams params)
Set the spatial fast filter params.
OBSpatialFastFilterParams getFilterParams()
Get the spatial fast filter params.
OBIntPropertyRange getRadiusRange()
Get the spatial fast filter radius range.
The Spatial Moderate Filter utilizes an optimized average smoothing algorithm, to achieve a balance b...
SpatialModerateFilter(const std::string &activationKey="")
OBIntPropertyRange getRadiusRange()
Get the spatial moderate filter radius range.
virtual ~SpatialModerateFilter() noexcept override=default
void setFilterParams(OBSpatialModerateFilterParams params)
Set the spatial moderate filter params.
OBSpatialModerateFilterParams getFilterParams()
Get the spatial moderate filter params.
OBIntPropertyRange getMagnitudeRange()
Get the spatial moderate filter magnitude range.
OBIntPropertyRange getDispDiffRange()
Get the spatial moderate filter disp diff range.
OBFloatPropertyRange getWeightRange()
Get the TemporalFilter weight range.
void setDiffScale(float value)
Set the TemporalFilter diffscale value.
~TemporalFilter() noexcept override=default
OBFloatPropertyRange getDiffScaleRange()
Get the TemporalFilter diffscale range.
void setWeight(float value)
Set the TemporalFilter weight value.
TemporalFilter(const std::string &activationKey="")
Creates depth Thresholding filter By controlling min and max options on the block.
bool setValueRange(uint16_t min, uint16_t max)
Set the threshold filter max and min range.
OBIntPropertyRange getMinRange()
Get the threshold filter min range.
virtual ~ThresholdFilter() noexcept override=default
OBIntPropertyRange getMaxRange()
Get the threshold filter max range.
const std::unordered_map< std::string, std::type_index > & getFilterTypeMap()
Returns the mapping of filter type names to their corresponding type_index.
std::function< void(std::shared_ptr< Frame >)> FilterCallback
A callback function that takes a shared pointer to a Frame object as its argument.
T getPropertyRange(const OBFilterConfigSchemaItem &item, const double cur)
Get T Property Range.
Structure for camera parameters.
int limit_y_th
Maximum vertical threshold.
int margin_x_th
Horizontal threshold settings.
uint32_t height
Image height.
uint32_t width
Image width.
bool enable_direction
Set to true for horizontal and vertical, false for horizontal only.
int limit_x_th
Maximum horizontal threshold.
int margin_y_th
Vertical threshold settings.
Configuration Item for the filter.
double min
Minimum value casted to double.
double max
Maximum value casted to double.
double def
Default value casted to double.
double step
Step value casted to double.
Structure for float range.
Structure for integer range.
Configuration parameters for the LUT noise removal filter.
uint32_t width
Depth map width the above parameters correspond to.
uint32_t height
Depth map height the above parameters correspond to.
uint16_t max_lut[16]
LUT max size of noise pixels (4x4 LUT, 16 entries total)
uint16_t min_diff
Difference threshold between neighbor pixels.
Configuration parameters for the MGC noise removal filter.
int limit_y_th
Maximum vertical threshold.
int limit_x_th
Maximum horizontal threshold.
int max_radius
Chamfer radius threshold settings.
int max_width_right
Right chamfer threshold settings.
int margin_y_th
Vertical threshold settings.
uint32_t height
Depth map height the above parameters correspond to.
uint32_t width
Depth map width the above parameters correspond to.
int max_width_left
Left chamfer threshold settings.
int margin_x_th
Horizontal threshold settings.
SequenceId fliter list item.
Structure for float range.
Structure for float range.
Get the type of a PropertyRange member.
The error class exposed by the SDK, users can get detailed error information according to the error.