31 Filter(std::shared_ptr<FilterImpl> impl);
57 virtual std::shared_ptr<Frame>
process(std::shared_ptr<Frame> frame);
64 virtual void pushFrame(std::shared_ptr<Frame> frame);
78 virtual const char *
type();
86 template <
typename T>
bool is();
94 template <
typename T> std::shared_ptr<T>
as() {
96 throw std::runtime_error(
"unsupported operation, object's type is not require type");
99 return std::static_pointer_cast<T>(shared_from_this());
593 std::string name =
type();
594 if(name ==
"HDRMerge") {
595 return typeid(T) ==
typeid(
HdrMerge);
597 if(name ==
"SequenceIdFilter") {
600 if(name ==
"ThresholdFilter") {
603 if(name ==
"DisparityTransform") {
606 if(name ==
"NoiseRemovalFilter") {
609 if(name ==
"SpatialAdvancedFilter") {
613 if(name ==
"SpatialFastFilter") {
617 if(name ==
"SpatialModerateFilter") {
621 if(name ==
"TemporalFilter") {
624 if(name ==
"HoleFillingFilter") {
627 if(name ==
"DecimationFilter") {
630 if(name ==
"PointCloudFilter") {
633 if(name ==
"CompressionFilter") {
636 if(name ==
"DecompressionFilter") {
639 if(name ==
"FormatConverter") {
642 if(name ==
"Align") {
643 return typeid(T) ==
typeid(
Align);
645 if(name ==
"EdgeNoiseRemovalFilter") {
OBFormat
Enumeration value describing the pixel format.
OBStreamType
Enumeration value describing the type of data stream.
enum OB_COORDINATE_SYSTEM_TYPE OBCoordinateSystemType
OBCompressionMode
Compression mode.
OBHoleFillingMode
Hole fillig mode.
OBConvertFormat
Enumeration of format conversion types.
Provides SDK structure and enumeration constant definitions (depending on libobsensor/h/ObTypes....
Align for depth to other or other to depth.
OBStreamType getAlignToStreamType()
Get the stream type to be aligned with.
Align(OBStreamType align_to_stream)
Creaet Align filter.
The CompressionFilter class is a subclass of Filter that performs compression.
void setCompressionParams(OBCompressionMode mode, void *params)
Set the compression parameters.
Decimation filter,reducing complexity by subsampling depth maps and losing depth details.
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.
The DecompressionFilter class is a subclass of Filter that performs decompression.
The edge noise removal filter,removing scattering depth pixels.
OBUint16PropertyRange getMarginLeftThRange()
Get the edge noise removal filter margin left th range.
OBUint16PropertyRange getMarginBottomThRange()
Get the edge noise removal filter margin bottom th range.
OBUint16PropertyRange getMarginRightThRange()
Get the edge noise removal filter margin right th range.
OBUint16PropertyRange getMarginTopThRange()
Get the edge noise removal filter margin top th range.
OBEdgeNoiseRemovalFilterParams getFilterParams()
Get the edge noise removal filter params.
void setFilterParams(OBEdgeNoiseRemovalFilterParams filterParams)
Set the edge noise removal filter params.
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 std::shared_ptr< Frame > process(std::shared_ptr< Frame > frame)
Processes a frame synchronously.
std::shared_ptr< T > as()
Convert the filter object to a target type.
Filter(std::shared_ptr< FilterImpl > impl)
void enable(bool enable)
enable the filter
virtual ~Filter()=default
std::shared_ptr< FilterImpl > impl_
virtual const char * type()
Get the type of filter.
virtual void pushFrame(std::shared_ptr< Frame > frame)
Pushes the pending frame into the cache for asynchronous processing.
virtual void setCallBack(FilterCallback callback)
Set the callback function for asynchronous processing.
virtual void reset()
ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pendin...
bool isEnabled()
Return Enable State.
HdrMerge processing block, the processing merges between depth frames with different sub-preset seque...
Hole filling filter,the processing performed depends on the selected hole filling mode.
void setFilterMode(OBHoleFillingMode mode)
Set the HoleFillingFilter mode.
OBHoleFillingMode getFilterMode()
Get the HoleFillingFilter mode.
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.
OBUint16PropertyRange getMaxSizeRange()
Get the noise removal filter max size range.
OBNoiseRemovalFilterParams getFilterParams()
Get the noise removal filter params.
Class representing a list of FrameProcessingBlock.
The PointCloudFilter class is a subclass of Filter that generates point clouds.
void setCoordinateSystem(OBCoordinateSystemType type)
Set the point cloud coordinate system.
void setCameraParam(OBCameraParam param)
Set the camera parameters.
void setPositionDataScaled(float scale)
Set the point cloud coordinate data zoom factor.
void setCreatePointFormat(OBFormat type)
Set the point cloud type parameters.
void setFrameAlignState(bool state)
Set the frame alignment state that will be input to generate point cloud.
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.
OBSequenceIdItem * getSequenceIdList()
Get the current sequence id list.
int getSequenceIdListSize()
Get the sequenceId list size.
Spatial advanced filter smooths the image by calculating frame with alpha and delta settings alpha de...
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.
OBFloatPropertyRange getAlphaRange()
Get the spatial advanced filter alpha range.
OBUint16PropertyRange getDispDiffRange()
Get the spatial advanced filter dispdiff range.
OBIntPropertyRange getMagnitudeRange()
Get the spatial advanced filter magnitude range.
Spatial fast filter smooths the image by calculating frame with filter window size settings.
void setFilterParams(OBSpatialFastFilterParams params)
Set the spatial fast filter params.
OBUint8PropertyRange getSizeRange()
Get the spatial fast filter window size range.
OBSpatialFastFilterParams getFilterParams()
Get the spatial fast filter params.
Spatial moderate filter smooths the image by calculating frame with filter window size,...
OBUint8PropertyRange getSizeRange()
Get the spatial moderate filter window size range.
void setFilterParams(OBSpatialModerateFilterParams params)
Set the spatial moderate filter params.
OBSpatialModerateFilterParams getFilterParams()
Get the spatial moderate filter params.
OBUint16PropertyRange getDispDiffRange()
Get the spatial moderate filter dispdiff range.
OBUint8PropertyRange getMagnitudeRange()
Get the spatial moderate filter magnitude range.
OBFloatPropertyRange getWeightRange()
Get the TemporalFilter weight range.
void setDiffScale(float value)
Set the TemporalFilter diffscale value.
OBFloatPropertyRange getDiffScaleRange()
Get the TemporalFilter diffscale range.
void setWeight(float value)
Set the TemporalFilter weight value.
Creates depth Thresholding filter By controlling min and max options on the block.
bool setValueRange(uint16_t min, uint16_t max)
Get the threshold filter max and min range.
OBIntPropertyRange getMinRange()
Get the threshold filter min range.
OBIntPropertyRange getMaxRange()
Get the threshold filter max range.
std::function< void(std::shared_ptr< Frame >)> FilterCallback
A callback function that takes a shared pointer to a Frame object as its argument.
Structure for camera parameters.
Structure for float range.
Structure for integer range.
SequenceId fliter list item.
Structure for float range.
Structure for float range.