|
OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
|
The Filter class is the base class for all filters in the SDK. More...
#include <Filter.hpp>
Public Member Functions | |
| 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 () |
Protected Member Functions | |
| Filter ()=default | |
| Default constructor with nullptr impl, used for derived classes only. | |
| virtual void | init (ob_filter *impl) |
Protected Attributes | |
| ob_filter * | impl_ = nullptr |
| std::string | name_ |
| FilterCallback | callback_ |
| std::vector< OBFilterConfigSchemaItem > | configSchemaVec_ |
The Filter class is the base class for all filters in the SDK.
Definition at line 76 of file Filter.hpp.
|
protecteddefault |
Default constructor with nullptr impl, used for derived classes only.
|
inlineexplicit |
Definition at line 112 of file Filter.hpp.
|
inlinevirtualnoexcept |
Definition at line 116 of file Filter.hpp.
|
inlineprotectedvirtual |
Definition at line 89 of file Filter.hpp.
Referenced by ob::Align::Align(), ob::DecimationFilter::DecimationFilter(), ob::DisparityTransform::DisparityTransform(), Filter(), ob::FormatConvertFilter::FormatConvertFilter(), ob::HdrMerge::HdrMerge(), ob::HoleFillingFilter::HoleFillingFilter(), ob::NoiseRemovalFilter::NoiseRemovalFilter(), ob::PointCloudFilter::PointCloudFilter(), ob::SequenceIdFilter::SequenceIdFilter(), ob::SpatialAdvancedFilter::SpatialAdvancedFilter(), ob::SpatialFastFilter::SpatialFastFilter(), ob::SpatialModerateFilter::SpatialModerateFilter(), ob::TemporalFilter::TemporalFilter(), and ob::ThresholdFilter::ThresholdFilter().
|
inline |
Get the Impl object of the filter.
Definition at line 129 of file Filter.hpp.
|
inlinevirtual |
Get the type of filter.
Definition at line 138 of file Filter.hpp.
Referenced by type().
|
inlinevirtual |
Reset the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
Definition at line 146 of file Filter.hpp.
|
inlinevirtual |
enable the filter
Definition at line 155 of file Filter.hpp.
Referenced by enable(), and isEnabled().
|
inlinevirtual |
Return Enable State.
Definition at line 164 of file Filter.hpp.
|
inlinevirtual |
Processes a frame synchronously.
| frame | The frame to be processed. |
Definition at line 177 of file Filter.hpp.
|
inlinevirtual |
Pushes the pending frame into the cache for asynchronous processing.
| frame | The pending frame. The processing result is returned by the callback function. |
Definition at line 192 of file Filter.hpp.
|
inlinevirtual |
Set the callback function for asynchronous processing.
| callback | The processing result callback. |
Definition at line 203 of file Filter.hpp.
|
inlinevirtual |
Get config schema of the filter.
The returned string is a csv format string representing the configuration schema of the filter. The format of the string is: <parameter_name>, <parameter_type: "int", "float", "bool">, <minimum_value>, <maximum_value>, <value_step>, <default_value>, <parameter_description>
Definition at line 217 of file Filter.hpp.
|
inlinevirtual |
Get the Config Schema Vec object.
The returned vector contains the config schema items. Each item in the vector is an OBFilterConfigSchemaItem object.
Definition at line 230 of file Filter.hpp.
Referenced by ob::SpatialAdvancedFilter::getAlphaRange(), ob::TemporalFilter::getDiffScaleRange(), ob::NoiseRemovalFilter::getDispDiffRange(), ob::SpatialAdvancedFilter::getDispDiffRange(), ob::SpatialModerateFilter::getDispDiffRange(), ob::SpatialAdvancedFilter::getMagnitudeRange(), ob::SpatialModerateFilter::getMagnitudeRange(), ob::ThresholdFilter::getMaxRange(), ob::NoiseRemovalFilter::getMaxSizeRange(), ob::ThresholdFilter::getMinRange(), ob::SpatialAdvancedFilter::getRadiusRange(), ob::SpatialFastFilter::getRadiusRange(), ob::SpatialModerateFilter::getRadiusRange(), and ob::TemporalFilter::getWeightRange().
|
inlinevirtual |
Set the filter config value by name.
| configName | The name of the config. |
| value | The value of the config. |
Definition at line 243 of file Filter.hpp.
Referenced by ob::Align::Align(), ob::SequenceIdFilter::selectSequenceId(), ob::PointCloudFilter::setColorDataNormalization(), ob::PointCloudFilter::setCoordinateDataScaled(), ob::PointCloudFilter::setCoordinateSystem(), ob::PointCloudFilter::setCreatePointFormat(), ob::TemporalFilter::setDiffScale(), ob::HoleFillingFilter::setFilterMode(), ob::NoiseRemovalFilter::setFilterParams(), ob::SpatialAdvancedFilter::setFilterParams(), ob::SpatialFastFilter::setFilterParams(), ob::SpatialModerateFilter::setFilterParams(), ob::FormatConvertFilter::setFormatConvertType(), ob::Align::setMatchTargetResolution(), ob::DecimationFilter::setScaleValue(), ob::ThresholdFilter::setValueRange(), and ob::TemporalFilter::setWeight().
|
inlinevirtual |
Get the Config Value object by name.
| configName | The name of the config. |
Definition at line 258 of file Filter.hpp.
Referenced by ob::Align::getAlignToStreamType(), ob::SpatialAdvancedFilter::getAlphaRange(), ob::TemporalFilter::getDiffScaleRange(), ob::NoiseRemovalFilter::getDispDiffRange(), ob::SpatialAdvancedFilter::getDispDiffRange(), ob::SpatialModerateFilter::getDispDiffRange(), ob::HoleFillingFilter::getFilterMode(), ob::NoiseRemovalFilter::getFilterParams(), ob::SpatialAdvancedFilter::getFilterParams(), ob::SpatialFastFilter::getFilterParams(), ob::SpatialModerateFilter::getFilterParams(), ob::SpatialAdvancedFilter::getMagnitudeRange(), ob::SpatialModerateFilter::getMagnitudeRange(), ob::ThresholdFilter::getMaxRange(), ob::NoiseRemovalFilter::getMaxSizeRange(), ob::ThresholdFilter::getMinRange(), ob::SpatialAdvancedFilter::getRadiusRange(), ob::SpatialFastFilter::getRadiusRange(), ob::SpatialModerateFilter::getRadiusRange(), ob::DecimationFilter::getScaleRange(), ob::DecimationFilter::getScaleValue(), ob::SequenceIdFilter::getSelectSequenceId(), and ob::TemporalFilter::getWeightRange().
|
inlinevirtual |
Definition at line 273 of file Filter.hpp.
Referenced by is(), ob::PointCloudFilter::setCoordinateSystem(), and ob::FormatConvertFilter::setFormatConvertType().
| bool ob::Filter::is | ( | ) |
Check if the runtime type of the filter object is compatible with a given type.
Define the is() template function for the Filter class.
| T | The given type. |
Definition at line 1179 of file Filter.hpp.
|
inline |
Definition at line 285 of file Filter.hpp.
|
protected |
Definition at line 78 of file Filter.hpp.
Referenced by enable(), getConfigSchema(), getConfigValue(), getImpl(), init(), isEnabled(), process(), pushFrame(), reset(), ob::Align::setAlignToStreamProfile(), setCallBack(), setConfigValue(), and ~Filter().
|
protected |
Definition at line 79 of file Filter.hpp.
|
protected |
Definition at line 80 of file Filter.hpp.
Referenced by setCallBack().
|
protected |
Definition at line 81 of file Filter.hpp.
Referenced by getConfigSchemaVec(), ob::DecimationFilter::getScaleRange(), and init().