<div dir="ltr">Andrew,<div><br></div><div>A look at the cloud compare code suggests it works very differently from PDAL filters.sample and depends on the way that points are distributed in an octree.  Rather than checking actual distance, CC tries to remove points in octree cells, that may be closer than the specified distance, depending on the octree organization.  You might try setting the distance smaller in PDAL to see if you get results more to your liking.  (This is based on a very cursory look at the CC code, so take it with a grain of salt.)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 8:59 AM Andrew Bell <<a href="mailto:andrew.bell.ia@gmail.com">andrew.bell.ia@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div>filters.sample works in 3D.  I'm not sure about the difference you're seeing.  I don't know what cloud compare is doing.  You're welcome to submit a bug report if you have some data that you think isn't being handled properly.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 8:56 AM Andrew Cunliffe <<a href="mailto:andrewmcunliffe@gmail.com" target="_blank">andrewmcunliffe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Thanks for the suggestion Mike,</div><div><br></div><div></div><div></div><div>I just tried running <br></div><div>                        {<br>                            "type": "filters.sample",<br>                            "radius": 0.001<br>                        },</div><div>on a test cloud with 
 n = 6650 points. With a 0.001 m threshold CloudCompare removes 1782 as duplicates (ca. 27%), and makes no visible difference to the displayed cloud, so the points removed appear genuine. However, with the above parameters, this PDAL pipeline only removes 6 duplicates.<br></div><div><br></div><div>I wondered whether filters.sample perhaps only considers proximity in XY space? (this isn't currently specified in the <a href="https://pdal.io/stages/filters.sample.html" target="_blank">documentation</a>). Apologies if I have missed something simple, I'm still learning PDAL, but I like it.</div><div><div><div><br></div><div>Thanks,</div><div>Andy<br></div><div><br></div>

</div>

</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 13 May 2019 at 13:26, Michael Smith <<a href="mailto:michael.smith.erdc@gmail.com" target="_blank">michael.smith.erdc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-4023172893496487537gmail-m_-2634020936246925819gmail-m_-3754680664947939958WordSection1"><p class="MsoNormal">Andrew,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">You can use filters.sample and just set a small radius.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Mike<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:10.5pt;color:black">-- <u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">Michael Smith<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">Remote Sensing/GIS Center<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10.5pt;color:black">US Army Corps of Engineers</span><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in"><p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">pdal <<a href="mailto:pdal-bounces@lists.osgeo.org" target="_blank">pdal-bounces@lists.osgeo.org</a>> on behalf of Andrew Cunliffe <<a href="mailto:andrewmcunliffe@gmail.com" target="_blank">andrewmcunliffe@gmail.com</a>><br><b>Date: </b>Monday, May 13, 2019 at 8:21 AM<br><b>To: </b>PDAL Mailing List <<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a>><br><b>Subject: </b>[pdal] filtering duplicate points<u></u><u></u></span></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">Dear all,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I am hoping someone might be able to help me to use PDAL to filter for duplicate points in a point cloud. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">By duplicate, I mean points that are less than a threshold distance (e.g. 0.001 m) from other points in the cloud. I'm working with photogrammetrically-generated point clouds, in some cases ca. 20-30% of the points are 'duplicates' so removing these has some big benefits later in the pipeline.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm looking for a filter that functions like '<a href="https://www.cloudcompare.org/doc/wiki/index.php?title=Remove_duplicate_points" target="_blank">Remove duplicate points</a>' in CloudCompare. I wasn't able to see anything suitable under the filters > cull documentation, unless<span class="gmail-m_-4023172893496487537gmail-m_-2634020936246925819gmail-m_-3754680664947939958gmail-s2"> filters.voxelcenternearestneighbor</span> would achieve this with cell set to 0.001?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">If anyone else thinks that a filter.duplicate function might be helpful, I'm happy to submit a feature request via Github.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks<u></u><u></u></p></div><div><p class="MsoNormal">Andy<u></u><u></u></p></div><div><p class="MsoNormal"><br>-- <u></u><u></u></p><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><p class="MsoNormal"><span style="font-size:7.5pt;color:rgb(153,153,153)">Dr Andrew Cunliffe<br><br>Research Fellow<br>School of Geography<br>University of Exeter</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><p class="MsoNormal">_______________________________________________ pdal mailing list <a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a> <a href="https://lists.osgeo.org/mailman/listinfo/pdal" target="_blank">https://lists.osgeo.org/mailman/listinfo/pdal</a><u></u><u></u></p></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-4023172893496487537gmail-m_-2634020936246925819gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font size="1"><span style="color:rgb(153,153,153)">Dr Andrew Cunliffe<br><br>Research Fellow in Dryland Carbon Dynamics</span><span style="color:rgb(153,153,153)"><br>School of Geography, College of Life and Environmental Science,<br></span><span style="color:rgb(153,153,153)"><span style="color:rgb(153,153,153)">University of Exeter</span></span><span style="color:rgb(153,153,153)"><span><span style="color:rgb(153,153,153)"><br><br></span></span></span></font></div><div><font size="1"><span style="color:rgb(153,153,153)"><span><span style="color:rgb(153,153,153)"><a href="http://geography.exeter.ac.uk/staff/index.php?web_id=Andy_cunliffe" target="_blank">UoEx Profile</a><br></span></span></span></font></div><div><font size="1"><span style="color:rgb(153,153,153)"><a href="https://scholar.google.co.uk/citations?user=GEfm3PIAAAAJ&hl=en" target="_blank">Google Scholar</a><br></span></font></div><div><span style="color:rgb(153,153,153)"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-4023172893496487537gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>