I am working with some LiDAR data, and have a problem I just can’t seem to solve myself...
The image below shows a point cloud representation of a utility pole. In this point cloud, there is the pole itself, some portions of the power lines, and also a streetlight attached to the pole. I have labeled those accordingly. The area in the red box is the pole itself. It is not common for poles to have some amount of lean to them, as this pole demonstrates.
I am looking to isolate the points from just the pole (i.e. inside the red box). I have tried using both intensity and return index, but just don't get satisfactory results. To me, this seems like a nn (nearest neighbor) problem. If I could just filter out points that don't have another point X distance underneath them - problem solved.
I have a fairly simple approach in mind:
- Divide LiDAR Extent into regularly spaced 3d grid. Each grid cell would span the full Z range.
- For each cell - compute z distance between all points. Remove all points that are > X distance from other point. Continue doing this until no points removed - at which point we move to next cell.
The problem I don't account for here is the pole lean. It is likely the lean will cause a pole to span multiple cells. Points near the boundaries of these cells will not appear to have points beneath them (in that same cell) - and thus I end up removing pole points...
I've been staring at this problem for 2 days now, and my ideas just keep getting more and more cockameny. I'm hoping some fresh eyes and different perspectives may have simpler approaches.
For what it is worth, these point clouds will be very small - never more than a couple hundred of points. So brute force is fine by me. I am familiar with PDAL and Laspy - but even rough pseudocode approach would be very welcome.
Statistical Outlier Removal Filter
tool inTools > Clean > SOR Filter
. – Kazuhito Oct 5 '19 at 23:57