> For the complete documentation index, see [llms.txt](https://stage-precision.gitbook.io/grid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stage-precision.gitbook.io/grid/spatial-interactive-experiences/building-an-interactive-tracking-project/clean-the-point-cloud.md).

# Clean the Point Cloud

After the tracking area has been defined, the remaining point cloud should be cleaned before clustering begins.

The goal at this stage is not to create perfectly stable tracked objects yet. Instead, remove measurements that clearly should not contribute to the clustering process.

A useful starting point is:

**Tracking Area → Floor Removal → Noise Reduction → Clustering**

Grid Studio provides a configurable list of **Input Filters** inside the Point Cloud Volume. Different filters can be combined depending on the sensor data and the requirements of the installation.

***

## Add an Input Filter

To add a filter:

1. Select the **Point Cloud Volume** in the Project Tree.
2. Open **Pipeline** in the Inspector.
3. Locate **Input Filters**.
4. Click the **+** button.
5. Select the required filter from the menu.

Input Filters are processed **from top to bottom**.

Their order can be changed at any time by dragging a filter to a different position in the list.

{% hint style="info" %}
Filter order matters.

Each filter receives the result of the filters above it, so changing the order can also change the final point cloud.
{% endhint %}

{% hint style="warning" %}
Input Filters can have a significant performance cost.

Depending on the filter, Grid Studio may need to evaluate and compare millions of points every frame. Aggressive settings or unnecessarily long filter chains can therefore increase processing time and eventually affect real-time performance.

Only use a filter when it produces a measurable improvement in the final tracking result.

If enabling or disabling a filter makes no meaningful difference to the point cloud or clustering result, remove it from the pipeline.

The goal is not to use as many filters as possible, but to use the smallest amount of processing required to produce reliable clusters.
{% endhint %}

***

## Remove the Floor

A good first filter for many room-based tracking projects is the dedicated **Floor** filter.

To add it:

1. Click **+** under **Input Filters**.
2. Open **Clipping**.
3. Select **Floor**.

<div align="left"><figure><img src="/files/wgjrpHIwpRVBc23WdPI3" alt="" width="306"><figcaption></figcaption></figure></div>

The Floor filter removes points around the detected floor level.

Use the **Tolerance** parameter to control how much space above the floor should be removed.

The value is defined in meters.

Start with a small value and adjust it while observing the live point cloud in the Viewport.

<figure><img src="/files/9KSvpTpUhRZjZAeLwd1s" alt=""><figcaption></figcaption></figure>

The goal is to remove remaining floor measurements without cutting into useful data such as feet or objects close to the ground.

{% hint style="info" %}
This is why the floor did not need to be removed perfectly while defining the Include area.

The tracking geometry establishes the main spatial boundaries, while the Floor filter can handle the remaining floor measurements more precisely.
{% endhint %}

***

## Remove Isolated Noise

After the floor has been removed, inspect the remaining point cloud for isolated or scattered measurements.

These points may originate from sensor noise, reflections, unstable surfaces, or individual measurements that do not belong to any meaningful physical object.

A useful starting filter for this is **Radius**.

To add it:

1. Click **+** under **Input Filters**.
2. Open **Outliners**.
3. Select **Radius**.

The Radius filter evaluates the local neighborhood around each point.

<figure><img src="/files/Fb7ku1fXK0TgUrfv4e6r" alt=""><figcaption></figcaption></figure>

Two important parameters are:

* **Search Radius** — defines how far around a point the filter searches for neighboring points.
* **Min Neighbors** — defines how many neighboring points must exist inside that radius.

If a point does not have enough neighboring measurements, it is removed.

For example:

**Search Radius: 0.10 m**\
**Min Neighbors: 6**

means that a point must have at least six neighboring points within a 10 cm radius to remain in the point cloud.

The correct values depend on:

* Sensor resolution
* Distance from the sensor
* Point density
* Number and placement of sensors
* Size of the objects you want to detect

Avoid making the filter unnecessarily aggressive. Small but valid parts of an object may also contain fewer neighboring points.

***

## Tune Filters Visually

Input filtering should be adjusted while continuously observing the point cloud in the Viewport.

A useful workflow is:

1. Add one filter.
2. Adjust its parameters.
3. Inspect what disappears from the point cloud.
4. Verify that useful measurements remain.
5. Only then add the next filter.

Avoid adding many filters at once and tuning them together. It becomes much harder to understand which processing stage is responsible for a particular result.

The VBO Snapshots can remain useful during this process because they still show the original environment while the live point cloud reflects the current Input Filter pipeline.

***

## Keep the Filter Chain as Simple as Possible

Grid Studio provides additional Input Filters for tasks such as:

* Background removal
* Additional outlier removal
* Temporal filtering
* Point-density reduction
* Automatic occlusion
* Rendering and image generation

Not every project requires all of them.

Use filters to solve specific problems visible in the incoming data rather than building a long filter chain by default.

{% hint style="success" %}
A clean tracking area combined with a small number of well-tuned filters is usually easier to understand and maintain than compensating for poor spatial setup with increasingly aggressive processing.
{% endhint %}

Automatic background and occlusion methods are not used in this guide. Their behavior, advantages, and limitations are covered separately in the **Point Filters** reference.

***

## Verify the Point Cloud

Before configuring clustering, inspect the remaining point cloud from several viewpoints and under realistic sensor conditions.

Verify that:

* The floor has been sufficiently removed.
* Large permanent geometry is already excluded by the tracking area.
* Isolated noise has been reduced.
* People or objects still produce sufficiently complete point data.
* Small but relevant measurements are not being removed unnecessarily.
* The Input Filter order produces the expected result.

The point cloud should now contain primarily the measurements that are useful for the intended detection task.

Continue with **Configure Clustering**.
