<div dir="ltr"><div>Piero,</div><div><br></div>This isn't going to be any kind of silver bullet, but you could start playing around with a pipeline similar to:<div><br></div><div><div>{</div><div>  "pipeline": [</div><div>    {</div><div>      "type": "filters.assign",</div><div>      "assignment": "Classification[:]=0"</div><div>    },</div><div>    {</div><div>      "type": "filters.smrf"</div><div>    },</div><div>    {</div><div>      "type": "filters.hag"</div><div>    },</div><div>    {</div><div>      "type": "filters.range",</div><div>      "limits": "HeightAboveGround[2:)"</div><div>    },</div><div>    {</div><div>      "type": "filters.approximatecoplanar",</div><div>      "knn": 10</div><div>    },</div><div>    {</div><div>      "type": "filters.range",</div><div>      "limits": "Coplanar[1:1]"</div><div>    }</div><div>  ]</div><div>}</div></div><div><br></div><div>If you already have ground returns labeled, you could skip the first two steps altogether. You could also plugin PMF in place of SMRF in you prefer.</div><div><br></div><div>The first range filter is used to cut out not only ground, but also near ground points using the height above ground value computed in the previous HAG step.</div><div><br></div><div>The ApproximateCoplanar filter is borrowed from [1] and compares eigenvalues computed from 10 nearest neighbors to estimate planarity.</div><div><br></div><div>The final range filter cuts out the non-planar points, returning only the (roughly) planar ones. If you are writing to a format that accommodates the Coplanar dimension then you don't need to use the range filter, just write out the Coplanar dimension and analyze the results using your tool of choice.</div><div><br></div><div>It's been a while since I ran this pipeline, but IIRC the truly planar objects tended to be marked planar pretty reliably, whereas the non-planar objects tended to have some noise mixed in. That is, it wasn't uncommon to find points within the vegetation whose ten neighbors just happened to look approximately planar. Anyway, it may be a starting point. There is clearly more work that could be done in this area!</div><div><br></div><div>Brad</div><div><br></div>[1] F. A. Limberger and M. M. Oliveira, “Real-time detection of planar regions in unorganized point clouds,” Pattern Recognit., vol. 48, no. 6, pp. 2043–2053, 2015.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 28, 2017 at 11:46 PM Piero Toffanin <<a href="mailto:pt@masseranolabs.com">pt@masseranolabs.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
I was wondering if somebody could point me in the right direction; I'm<br>
trying to classify (roughly) a set of non-ground points into buildings<br>
and vegetation for the purpose of filtering out vegetation and retaining<br>
only the buildings. I was thinking of using an approach similar to<br>
lasclassify (check for planarity or roughness)<br>
<a href="https://rapidlasso.com/lastools/lasclassify/" rel="noreferrer" target="_blank">https://rapidlasso.com/lastools/lasclassify/</a>, but I'm not sure which<br>
would be the best way to approach this.<br>
<br>
Suggestions?<br>
<br>
Thank you!<br>
<br>
-Piero<br>
<br>
_______________________________________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/pdal</a></blockquote></div>