DOC Skip to main content

What is a Filter

Update on 2026-08-11 03:58:20

ON THIS PAGE

1.1 What is a Filter?

A Filter is a post-processing module provided by OrbbecSDK v2 for processing raw frames from the sensor. Common use cases include:

• Removing noise and holes from depth maps

• Spatial and temporal smoothing of depth maps

• Downsampling images to reduce resolution, data size, and improve downstream processing performance

• Software-based alignment of depth and color streams

• Converting frame pixel formats

• Generating point cloud data

⚠ Note: Filters are not limited to Depth streams. Some Filters also support Color or IR streams. Always check the applicable stream type for each Filter.

1.2 Two Ways to Use Filters

Method

Description

Use Case

Create Filter Directly

Explicitly specify which Filter to use and configure its parameters

Fine-grained control, custom scenarios

Recommended Filter List

Obtained from a specific Sensor. The SDK returns a recommended Filter combination based on the Sensor's stream type. Can only process frames of the matching stream type.

Quick integration, general-purpose scenarios

✅ Tip: Not sure which method your device supports, or which one to choose? Start with the Recommended Filter List to get up and running quickly. Switch to "Create Filter Directly" when you need custom configuration.

1.3 Complete Filter Quick Reference

Filter Name

Applicable Stream

Description

Type

PointCloudFilter

Depth / Depth+Color

Converts depth frames to XYZ point clouds, or depth+color frames to RGBD point clouds (XYZ+RGB)

Transformation

Align

Depth + Color

Software-based spatial alignment between depth and color streams

Transformation

FormatConvertFilter

Color / IR

Pixel format conversion (e.g., MJPG→RGB, YUYV→BGR, etc.)

Transformation

DisparityTransform

Depth

Bidirectional conversion between depth and disparity maps

Transformation

SequenceIdFilter

Depth / IR

Filters frames by sequence ID, used with HDR

Flow Control

DecimationFilter

Depth / IR / Color

Downsamples the image to reduce resolution

Sampling / Threshold

ThresholdFilter

Depth

Zeroes out depth values outside the specified range

Sampling / Threshold

NoiseRemovalFilter

Depth

Removes noise from depth maps (basic)

Noise Reduction

FalsePositiveFilter

Depth

Removes various types of noise from depth maps (advanced)

Noise Reduction

SpatialAdvancedFilter

Depth

Edge-preserving spatial smoothing, high quality

Spatial Smoothing

SpatialFastFilter

Depth

Fast spatial smoothing, low CPU usage

Spatial Smoothing

SpatialModerateFilter

Depth

Balanced spatial smoothing between speed and quality

Spatial Smoothing

HoleFillingFilter

Depth

Fills holes in depth maps

Spatial Smoothing

TemporalFilter

Depth

Temporal smoothing by fusing adjacent frame data

Temporal Smoothing

Note: NoiseRemovalFilter is called automatically inside the SDK. You can only enable/disable it or adjust its parameters. It cannot be created independently. All other Filters are public types - create them directly with no activation code required.

1.4 Two Frame Processing Modes

Synchronous Processing (recommended, suitable for most scenarios)

auto outFrame = filter->process(inFrame);

if(outFrame) {

    // Use the processed frame

}

Asynchronous Processing (suitable for high frame rate or pipeline scenarios)

// Set the callback, triggered automatically when processing completes

filter->setCallBack([](std::shared_ptr<ob::Frame> outFrame) {

    if(outFrame) {

        // Use the processed frame

    }

});

// Push the frame into the Filter's processing queue

filter->pushFrame(inFrame);

⚠ Note: `process()` may return `nullptr` in some cases. Always check the return value before using it.

ON THIS PAGE

Add

  • Name:

  • Link Address:

Cancel

Add

  • Name:

  • Link Address:

Cancel
Questions or
Feedback?

Feedback

  • Your feedback matters! Share your thoughts on this page, report errors, or let us know how we can improve to better support your needs. If applicable, please include the specific sentence or section to help us identify and address the issue.