| 75 | } |
| 76 | |
| 77 | Indices OutlierFilter::processRadius(PointViewPtr inView) |
| 78 | { |
| 79 | KD3Index index(*inView); |
| 80 | index.build(); |
| 81 | |
| 82 | point_count_t np = inView->size(); |
| 83 | |
| 84 | PointIdList inliers, outliers; |
| 85 | |
| 86 | for (PointId i = 0; i < np; ++i) |
| 87 | { |
| 88 | auto ids = index.radius(i, m_radius); |
| 89 | if (ids.size() > size_t(m_minK)) |
| 90 | inliers.push_back(i); |
| 91 | else |
| 92 | outliers.push_back(i); |
| 93 | } |
| 94 | |
| 95 | return Indices{inliers, outliers}; |
| 96 | } |
| 97 | |
| 98 | Indices OutlierFilter::processStatistical(PointViewPtr inView) |
| 99 | { |