A point-cloud filter can label a point an outlier using nearby distances while still depending on points far away. The apparent contradiction disappears when the local score and the global decision threshold are treated as two different stages.

Statistical outlier removal commonly assigns each point a mean neighbor-distance score, then compares those scores with a threshold derived across the cloud. The original hand calculation below shows why adding a distant group can change a decision even when the point's own neighborhood has not changed.

Define the score and the reference population

For this educational model, each point's score is its Euclidean distance to its single nearest other point. Exclude a zero-distance self-match. Distances are in millimeters, and the finite clouds contain no invalid or repeated points.

Using one neighbor makes the arithmetic transparent. It is not a recommendation for a perception pipeline. With more neighbors, the local score would be their mean distance and the numerical values would need to be recomputed.

For all N scored points, calculate the score mean m and the sample standard deviation s using denominator N - 1. Define threshold T = m + s. Reject scores strictly greater than T; retain scores equal to T.

These conventions fully specify the hand model. They should not be mistaken for a report of executing a particular Point Cloud Library build. PCL's official tutorial and class reference establish the local-distance/global-threshold structure; exact software settings and implementation details remain separate.

A compact cloud with one distant endpoint

Place five points on the x-axis at coordinates 0, 1, 2, 3, and 10 mm, with y and z both zero. The nearest-other-point distances are 1, 1, 1, 1, and 7 mm.

Their mean is m = 11/5 = 2.2 mm. Four deviations are -1.2 mm and the fifth is +4.8 mm. The squared deviations sum to 28.8 square millimeters, so the sample variance is 28.8/4 = 7.2 square millimeters.

Thus s is approximately 2.68328 mm and T is approximately 4.88328 mm. The point at x = 10 has a seven-millimeter score and is rejected. The other four points are retained.

That decision identifies a large local-spacing score relative to this particular population. The arithmetic does not establish whether x = 10 is a faulty measurement, an edge, or a legitimate isolated feature.

Add a distant group without changing the old neighborhood

Now add four points at x = 100, 110, 120, and 130 mm. Suppose the added group represents a legitimate sparsely sampled structure in this invented scene. That semantic description is an assumption supplied for the example, not something inferred by the filter.

Each new point's nearest-other-point distance is ten millimeters. All five original nearest distances remain unchanged: in particular, the nearest point to x = 10 is still x = 3, seven millimeters away.

The nine scores are now 1, 1, 1, 1, 7, 10, 10, 10, and 10 mm. Their sum is 51 mm, giving m = 51/9, approximately 5.66667 mm.

The squared deviations from that new mean sum to 164 square millimeters. Dividing by eight gives sample variance 20.5 square millimeters, so s is approximately 4.52769 mm. The threshold becomes approximately 10.19436 mm.

The unchanged seven-millimeter score now passes. Even the four ten-millimeter scores pass. Adding distant points changed the population statistics enough to change the original point's classification.

The threshold is a property of the chosen cloud

This is not a search error. The local nearest-other-point distances were correctly computed in both clouds. The decision changed because a global reference distribution was redefined.

A cropped region, a combined scan, or a differently sampled surface can therefore produce different labels with the same multiplier. A multiplier alone does not describe a fixed millimeter cutoff or a universal definition of measurement quality.

There is a related subset distinction in the cited PCL class reference: restricting query indices does not necessarily restrict the population available as neighbors, which can still include all input-cloud points. A region-based experiment must therefore define both the query population and the search population. They are different parts of the rule.

Units survive the calculation

Uniformly scale every coordinate in either cloud by a positive factor of two. All nearest distances, m, s, and T double. Every strict comparison keeps the same outcome in exact arithmetic.

Changing coordinate units from millimeters to meters is another uniform scale change. It should not change this model's labels if all calculations use matching units. A squared-distance result, however, must first be interpreted correctly before averaging ordinary distances; mixing the two implements another statistic.

Moving or rotating the entire cloud rigidly also preserves Euclidean neighbor distances. Adding or removing a group generally does not preserve the global score distribution, even if it leaves one point's nearest neighbors intact.

An outlier label needs a semantic check

The Gaussian-distribution motivation described in the tutorial is a statistical modeling assumption. A mixture of dense and sparse structures need not behave like one homogeneous population of neighbor scores. A one-standard-deviation multiplier does not promise a specified fraction of physically false returns in such a scene.

Evaluating a filter therefore requires retaining the rejected points, their scores, and the population used to set the threshold. Representative feature evidence can then show whether meaningful geometry was removed or unwanted returns survived. Neither outcome is established by a cleaner-looking cloud alone.

The narrow lesson is reproducible: a local score combined with a global threshold is a population-dependent decision. Recording both stages explains why a point can change labels without moving and without acquiring a new nearest neighbor.

Sources checked October 23, 2026:

Point Cloud Library, StatisticalOutlierRemoval tutorial, master web edition: https://pcl.readthedocs.io/projects/tutorials/en/master/statistical_outlier.html

Point Cloud Library, StatisticalOutlierRemoval class reference, displayed 1.15.1-dev: https://pointclouds.org/documentation/classpcl_1_1_statistical_outlier_removal.html

All point coordinates, score arrays, variance conventions, and arithmetic are original hypothetical examples; no source cloud or software output is reproduced.

Illustration note: The accompanying robot sensing scene is a generic concept illustration. It does not show the invented points, executed outlier filtering, or validated perception performance.