{"id":91308,"date":"2026-08-07T17:00:45","date_gmt":"2026-08-07T09:00:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/91308.html"},"modified":"2026-08-07T17:00:45","modified_gmt":"2026-08-07T09:00:45","slug":"pcl%e7%82%b9%e4%ba%91%e5%ba%93%e5%ad%a6%e4%b9%a0%ef%bc%88%e4%b8%89%ef%bc%89-kdtree","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/91308.html","title":{"rendered":"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree"},"content":{"rendered":"<p>k-d\u6811&#xff0c;\u6216\u79f0k\u7ef4\u6811&#xff0c;\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7528\u4e8e\u5728k\u7ef4\u7a7a\u95f4\u4e2d\u7ec4\u7ec7\u82e5\u5e72\u70b9\u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\u3002\u5b83\u662f\u4e00\u79cd\u5e26\u6709\u989d\u5916\u7ea6\u675f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u3002k-d\u6811\u5728\u8303\u56f4\u641c\u7d22\u548c\u6700\u8fd1\u90bb\u641c\u7d22\u4e2d\u975e\u5e38\u6709\u7528\u3002\u5c31\u6211\u4eec\u7684\u76ee\u7684\u800c\u8a00&#xff0c;\u6211\u4eec\u901a\u5e38\u53ea\u5904\u7406\u4e09\u7ef4\u70b9\u4e91&#xff0c;\u56e0\u6b64\u6211\u4eec\u6240\u6709\u7684k-d\u6811\u90fd\u662f\u4e09\u7ef4\u7684\u3002k-d\u6811\u7684\u6bcf\u4e00\u5c42\u90fd\u4f7f\u7528\u5782\u76f4\u4e8e\u76f8\u5e94\u8f74\u7684\u8d85\u5e73\u9762&#xff0c;\u6cbf\u7279\u5b9a\u7ef4\u5ea6\u5212\u5206\u6240\u6709\u5b50\u8282\u70b9\u3002\u5728\u6811\u7684\u6839\u8282\u70b9&#xff0c;\u6240\u6709\u5b50\u8282\u70b9\u5c06\u6839\u636e\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u5212\u5206&#xff08;\u5373&#xff0c;\u5982\u679c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u7684\u5750\u6807\u5c0f\u4e8e\u6839\u8282\u70b9&#xff0c;\u5219\u5b83\u5c06\u4f4d\u4e8e\u5de6\u5b50\u6811\u4e2d&#xff1b;\u5982\u679c\u5927\u4e8e\u6839\u8282\u70b9&#xff0c;\u5219\u663e\u7136\u4f4d\u4e8e\u53f3\u5b50\u6811\u4e2d&#xff09;\u3002\u6811\u4e2d\u6bcf\u4e0b\u964d\u4e00\u5c42&#xff0c;\u5c31\u6cbf\u4e0b\u4e00\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u5212\u5206&#xff0c;\u5728\u6240\u6709\u5176\u4ed6\u7ef4\u5ea6\u90fd\u7528\u5b8c\u540e\u8fd4\u56de\u5230\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u3002\u6784\u5efak-d\u6811\u6700\u6709\u6548\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u4e00\u79cd\u5206\u533a\u65b9\u6cd5&#xff0c;\u7c7b\u4f3c\u4e8e\u5feb\u901f\u6392\u5e8f\u4f7f\u7528\u7684\u65b9\u6cd5&#xff0c;\u5c06\u4e2d\u503c\u70b9\u653e\u5728\u6839\u8282\u70b9&#xff0c;\u4e00\u7ef4\u503c\u8f83\u5c0f\u7684\u653e\u5728\u5de6\u4fa7&#xff0c;\u8f83\u5927\u7684\u653e\u5728\u53f3\u4fa7\u3002\u7136\u540e&#xff0c;\u60a8\u5728\u5de6\u5b50\u6811\u548c\u53f3\u5b50\u6811\u4e0a\u91cd\u590d\u6b64\u8fc7\u7a0b&#xff0c;\u76f4\u5230\u8981\u5206\u533a\u7684\u6700\u540e\u6811\u53ea\u5305\u542b\u4e00\u4e2a\u5143\u7d20\u4e3a\u6b62\u3002<\/p>\n<h2>1.\u00a0\u6784\u5efa\u8fc7\u7a0b&#xff08;\u4e8c\u7ef4\u793a\u4f8b&#xff09;<\/h2>\n<p>\u5047\u8bbe\u6709\u8fd9\u4e9b\u70b9&#xff1a;(2,3), (5,4), (9,6), (4,7), (8,1), (7,2)<\/p>\n<p>\u6b65\u9aa41&#xff1a;\u6309X\u5750\u6807\u6392\u5e8f&#xff0c;\u53d6\u4e2d\u4f4d\u6570\u4f5c\u4e3a\u6839\u8282\u70b9<br \/>\n    \u70b9&#xff1a;2, 4, 5, 7, 8, 9<br \/>\n    \u4e2d\u4f4d\u6570&#xff1a;7 \u2192 (7,2) \u662f\u6839\u8282\u70b9<\/p>\n<p>    \u5de6\u5b50\u6811&#xff08;X &lt; 7&#xff09;&#xff1a;(2,3), (4,7), (5,4)<br \/>\n    \u53f3\u5b50\u6811&#xff08;X &gt; 7&#xff09;&#xff1a;(8,1), (9,6)<\/p>\n<p>\u6b65\u9aa42&#xff1a;\u5bf9\u5de6\u53f3\u5b50\u6811\u6309Y\u5750\u6807\u6392\u5e8f<br \/>\n    \u5de6\u5b50\u6811&#xff1a;(4,7) \u662f\u4e2d\u4f4d\u6570 \u2192 \u5de6\u5b50\u8282\u70b9<br \/>\n    \u53f3\u5b50\u6811&#xff1a;(8,1) \u662f\u4e2d\u4f4d\u6570 \u2192 \u53f3\u5b50\u8282\u70b9<\/p>\n<p>\u6b65\u9aa43&#xff1a;\u7ee7\u7eed\u9012\u5f52&#8230; <\/p>\n<h2>2.\u00a0\u53ef\u89c6\u5316\u7ed3\u6784<\/h2>\n<p>text<\/p>\n<p>                   (7,2)  \u2190 \u6839\u8282\u70b9&#xff08;\u6309X\u5206\u5272&#xff09;<br \/>\n                  \/     \\\\<br \/>\n              (5,4)    (9,6)  \u2190 \u7b2c\u4e8c\u5c42&#xff08;\u6309Y\u5206\u5272&#xff09;<br \/>\n             \/     \\\\      \\\\<br \/>\n         (2,3)   (4,7)   (8,1)  \u2190 \u7b2c\u4e09\u5c42&#xff08;\u6309X\u5206\u5272&#xff09; <\/p>\n<h2>3.\u00a0\u5206\u5272\u6548\u679c\u56fe<\/h2>\n<p>text<\/p>\n<p>Y\u8f74<br \/>\n\u2191<br \/>\n8 |     (4,7)<br \/>\n7 |<br \/>\n6 |              (9,6)<br \/>\n5 |<br \/>\n4 |  (5,4)<br \/>\n3 |  (2,3)<br \/>\n2 |              (7,2)<br \/>\n1 |                       (8,1)<br \/>\n0 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2192 X\u8f74<br \/>\n  0  1  2  3  4  5  6  7  8  9 <\/p>\n<h2>4.\u4ee3\u7801\u5b9e\u73b0<\/h2>\n<p>#include &lt;pcl\/point_cloud.h&gt;<br \/>\n#include &lt;pcl\/kdtree\/kdtree_flann.h&gt;<\/p>\n<p>#include &lt;iostream&gt;<br \/>\n#include &lt;vector&gt;<br \/>\n#include &lt;ctime&gt;<\/p>\n<p>int main()<br \/>\n{<br \/>\nsrand(time(NULL));<\/p>\n<p>pcl::PointCloud&lt;pcl::PointXYZ&gt;::Ptr cloud(new pcl::PointCloud&lt;pcl::PointXYZ&gt;);<\/p>\n<p>cloud-&gt;width &#061; 1000;<br \/>\ncloud-&gt;height &#061; 1;<br \/>\ncloud-&gt;points.resize(cloud-&gt;width * cloud-&gt;height);<\/p>\n<p>for (std::size_t i &#061; 0; i &lt; cloud-&gt;size(); &#043;&#043;i)<br \/>\n{<br \/>\n(*cloud)[i].x &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);<br \/>\n(*cloud)[i].y &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);<br \/>\n(*cloud)[i].z &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);<br \/>\n}<\/p>\n<p>pcl::KdTreeFLANN&lt;pcl::PointXYZ&gt; kdtree;\/\/ \u521b\u5efaKD\u6811\u5bf9\u8c61&#xff08;\u4f7f\u7528FLANN\u5e93\u5b9e\u73b0&#xff09;<br \/>\nkdtree.setInputCloud(cloud);\/\/ \u5c06\u70b9\u4e91\u6570\u636e\u8bbe\u7f6e\u5230KD\u6811\u4e2d&#xff0c;\u5efa\u7acb\u7d22\u5f15\u7ed3\u6784<\/p>\n<p>pcl::PointXYZ searchPoint;\/\/ \u521b\u5efa\u4e00\u4e2a\u67e5\u8be2\u70b9<\/p>\n<p>searchPoint.x &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);\/\/ \u4e3a\u67e5\u8be2\u70b9\u751f\u6210\u968f\u673a\u5750\u6807&#xff08;\u8303\u56f40-1024&#xff09;<br \/>\nsearchPoint.y &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);<br \/>\nsearchPoint.z &#061; 1024.0f * rand() \/ (RAND_MAX &#043; 1.0f);<\/p>\n<p>int k &#061; 10;\/\/ \u8bbe\u7f6eK\u8fd1\u90bb\u641c\u7d22\u4e2dK\u7684\u503c\u4e3a10&#xff08;\u627e10\u4e2a\u6700\u8fd1\u90bb&#xff09;<\/p>\n<p>std::vector&lt;int&gt; pointIdxKNNSearch(k);\/\/ \u521b\u5efa\u5411\u91cf\u5b58\u50a8K\u8fd1\u90bb\u641c\u7d22\u7684\u7ed3\u679c<br \/>\nstd::vector&lt;float&gt; pointKNNSquareDistance(k);\/\/ \u5b58\u50a8\u5bf9\u5e94\u70b9\u5230\u67e5\u8be2\u70b9\u7684\u8ddd\u79bb\u5e73\u65b9<\/p>\n<p>std::cout &lt;&lt; &#034;k nearest neighbor search at (&#034; &lt;&lt; searchPoint.x<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; searchPoint.y<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; searchPoint.z<br \/>\n&lt;&lt; &#034;) with k&#061;&#034; &lt;&lt; k &lt;&lt; std::endl;<\/p>\n<p>if (kdtree.nearestKSearch(searchPoint, k, pointIdxKNNSearch,\/\/ \u8f93\u51fa&#xff1a;\u90bb\u5c45\u7684\u7d22\u5f15<br \/>\n  pointKNNSquareDistance\/\/ \u8f93\u51fa&#xff1a;\u5230\u90bb\u5c45\u7684\u8ddd\u79bb\u5e73\u65b9<br \/>\n) &gt; 0)\/\/ \u6267\u884cK\u8fd1\u90bb\u641c\u7d22 \u8fd4\u56de\u503c&#xff1a;\u5b9e\u9645\u627e\u5230\u7684\u90bb\u5c45\u6570\u91cf&#xff08;&gt;0\u8868\u793a\u627e\u5230\u4e86&#xff09;<br \/>\n{<br \/>\nfor (std::size_t i &#061; 0; i &lt; pointIdxKNNSearch.size(); &#043;&#043;i)\/\/ \u904d\u5386\u6240\u6709\u627e\u5230\u7684\u90bb\u5c45\u70b9<br \/>\n{<br \/>\nstd::cout &lt;&lt; &#034;    &#034; &lt;&lt; (*cloud)[pointIdxKNNSearch[i]].x<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; (*cloud)[pointIdxKNNSearch[i]].y<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; (*cloud)[pointIdxKNNSearch[i]].z<br \/>\n&lt;&lt; &#034;(squared distance: &#034; &lt;&lt; pointKNNSquareDistance[i] &lt;&lt; &#034;)&#034; &lt;&lt; std::endl;\/\/ \u8f93\u51fa\u90bb\u5c45\u70b9\u7684\u5750\u6807\u548c\u8ddd\u79bb\u5e73\u65b9<br \/>\n}<br \/>\n}<\/p>\n<p>std::vector&lt;int&gt; pointIdxRadiusSearch;\/\/ \u51c6\u5907\u534a\u5f84\u641c\u7d22\u7684\u5bb9\u5668&#xff08;\u5927\u5c0f\u52a8\u6001\u8c03\u6574&#xff09;<br \/>\nstd::vector&lt;float&gt; pointRadiusSquareDistance;\/\/ \u5b58\u50a8\u534a\u5f84\u5185\u70b9\u7684\u8ddd\u79bb\u5e73\u65b9<\/p>\n<p>float radius &#061; 256.0f * rand() \/ (RAND_MAX &#043; 1.0f);\/\/ \u751f\u6210\u968f\u673a\u534a\u5f84&#xff08;0-256\u8303\u56f4\u5185&#xff09;<\/p>\n<p>std::cout &lt;&lt; &#034;Neighbors within radius search at (&#034; &lt;&lt; searchPoint.x\/\/ \u8f93\u51fa\u534a\u5f84\u641c\u7d22\u7684\u4fe1\u606f<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; searchPoint.y<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; searchPoint.z<br \/>\n&lt;&lt; &#034;) with radius&#061; &#034; &lt;&lt; radius &lt;&lt; std::endl;<\/p>\n<p>if (kdtree.radiusSearch(searchPoint, radius, pointIdxRadiusSearch, pointRadiusSquareDistance) &gt; 0)\/\/ \u6267\u884c\u534a\u5f84\u641c\u7d22&#xff1a;\u67e5\u627e\u6240\u6709\u5728radius\u8303\u56f4\u5185\u7684\u70b9<br \/>\n{<br \/>\nfor (std::size_t i &#061; 0; i &lt; pointIdxRadiusSearch.size(); &#043;&#043;i)\/\/ \u904d\u5386\u6240\u6709\u5728\u534a\u5f84\u5185\u7684\u70b9<br \/>\n{<br \/>\nstd::cout &lt;&lt; &#034;    &#034; &lt;&lt; (*cloud)[pointIdxRadiusSearch[i]].x<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; (*cloud)[pointIdxRadiusSearch[i]].y<br \/>\n&lt;&lt; &#034; &#034; &lt;&lt; (*cloud)[pointIdxRadiusSearch[i]].z<br \/>\n&lt;&lt; &#034; (squared distance: &#034; &lt;&lt; pointRadiusSquareDistance[i] &lt;&lt; &#034;)&#034; &lt;&lt; std::endl;\/\/ \u8f93\u51fa\u70b9\u7684\u5750\u6807\u548c\u8ddd\u79bb\u5e73\u65b9<br \/>\n}<br \/>\n}<\/p>\n<p>return 0;<br \/>\n} <\/p>\n<p>\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b&#xff0c;\u4ee3\u7801\u5206\u522b\u4f7f\u7528kdtree\u8fdb\u884c\u4e86k\u8fd1\u90bb\u641c\u7d22&#xff0c;\u548c\u534a\u5f84\u9886\u57df\u641c\u7d22&#xff0c;\u8fd0\u884c\u7ed3\u679c\u53ef\u4ee5\u770b\u51fa\u80fd\u641c\u7d22\u7b5b\u9009\u51fa\u4e86\u4e0b\u8ff0\u8fd9\u4e9b\u70b9\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"755\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260807090043-6a759ebbc4abe.png\" width=\"1019\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>k-d\u6811&#xff0c;\u6216\u79f0k\u7ef4\u6811&#xff0c;\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7528\u4e8e\u5728k\u7ef4\u7a7a\u95f4\u4e2d\u7ec4\u7ec7\u82e5\u5e72\u70b9\u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\u3002\u5b83\u662f\u4e00\u79cd\u5e26\u6709\u989d\u5916\u7ea6\u675f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u3002k-d\u6811\u5728\u8303\u56f4\u641c\u7d22\u548c\u6700\u8fd1\u90bb\u641c\u7d22\u4e2d\u975e\u5e38\u6709\u7528\u3002\u5c31\u6211\u4eec\u7684\u76ee\u7684\u800c\u8a00&#xff0c;\u6211\u4eec\u901a\u5e38\u53ea\u5904\u7406\u4e09\u7ef4\u70b9\u4e91&#xff0c;\u56e0\u6b64\u6211\u4eec\u6240\u6709\u7684k-d\u6811\u90fd\u662f\u4e09\u7ef4\u7684\u3002k-d\u6811\u7684\u6bcf\u4e00\u5c42\u90fd\u4f7f\u7528\u5782\u76f4\u4e8e\u76f8\u5e94\u8f74\u7684\u8d85\u5e73\u9762&#xff0c;\u6cbf\u7279\u5b9a\u7ef4\u5ea6\u5212\u5206\u6240\u6709\u5b50\u8282\u70b9\u3002\u5728\u6811\u7684\u6839\u8282\u70b9&#xff0c;\u6240\u6709\u5b50\u8282\u70b9\u5c06\u6839\u636e\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u5212\u5206&#xff08;\u5373&#xff0c;\u5982\u679c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6<\/p>\n","protected":false},"author":2,"featured_media":91307,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[371],"topic":[],"class_list":["post-91308","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-371"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/91308.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"k-d\u6811&#xff0c;\u6216\u79f0k\u7ef4\u6811&#xff0c;\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7528\u4e8e\u5728k\u7ef4\u7a7a\u95f4\u4e2d\u7ec4\u7ec7\u82e5\u5e72\u70b9\u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\u3002\u5b83\u662f\u4e00\u79cd\u5e26\u6709\u989d\u5916\u7ea6\u675f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u3002k-d\u6811\u5728\u8303\u56f4\u641c\u7d22\u548c\u6700\u8fd1\u90bb\u641c\u7d22\u4e2d\u975e\u5e38\u6709\u7528\u3002\u5c31\u6211\u4eec\u7684\u76ee\u7684\u800c\u8a00&#xff0c;\u6211\u4eec\u901a\u5e38\u53ea\u5904\u7406\u4e09\u7ef4\u70b9\u4e91&#xff0c;\u56e0\u6b64\u6211\u4eec\u6240\u6709\u7684k-d\u6811\u90fd\u662f\u4e09\u7ef4\u7684\u3002k-d\u6811\u7684\u6bcf\u4e00\u5c42\u90fd\u4f7f\u7528\u5782\u76f4\u4e8e\u76f8\u5e94\u8f74\u7684\u8d85\u5e73\u9762&#xff0c;\u6cbf\u7279\u5b9a\u7ef4\u5ea6\u5212\u5206\u6240\u6709\u5b50\u8282\u70b9\u3002\u5728\u6811\u7684\u6839\u8282\u70b9&#xff0c;\u6240\u6709\u5b50\u8282\u70b9\u5c06\u6839\u636e\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u5212\u5206&#xff08;\u5373&#xff0c;\u5982\u679c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/91308.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-07T09:00:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260807090043-6a759ebbc4abe.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91308.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/91308.html\",\"name\":\"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-07T09:00:45+00:00\",\"dateModified\":\"2026-08-07T09:00:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/91308.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/91308.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/91308.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/91308.html","og_locale":"zh_CN","og_type":"article","og_title":"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"k-d\u6811&#xff0c;\u6216\u79f0k\u7ef4\u6811&#xff0c;\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u7528\u4e8e\u5728k\u7ef4\u7a7a\u95f4\u4e2d\u7ec4\u7ec7\u82e5\u5e72\u70b9\u7684\u4e00\u79cd\u6570\u636e\u7ed3\u6784\u3002\u5b83\u662f\u4e00\u79cd\u5e26\u6709\u989d\u5916\u7ea6\u675f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u3002k-d\u6811\u5728\u8303\u56f4\u641c\u7d22\u548c\u6700\u8fd1\u90bb\u641c\u7d22\u4e2d\u975e\u5e38\u6709\u7528\u3002\u5c31\u6211\u4eec\u7684\u76ee\u7684\u800c\u8a00&#xff0c;\u6211\u4eec\u901a\u5e38\u53ea\u5904\u7406\u4e09\u7ef4\u70b9\u4e91&#xff0c;\u56e0\u6b64\u6211\u4eec\u6240\u6709\u7684k-d\u6811\u90fd\u662f\u4e09\u7ef4\u7684\u3002k-d\u6811\u7684\u6bcf\u4e00\u5c42\u90fd\u4f7f\u7528\u5782\u76f4\u4e8e\u76f8\u5e94\u8f74\u7684\u8d85\u5e73\u9762&#xff0c;\u6cbf\u7279\u5b9a\u7ef4\u5ea6\u5212\u5206\u6240\u6709\u5b50\u8282\u70b9\u3002\u5728\u6811\u7684\u6839\u8282\u70b9&#xff0c;\u6240\u6709\u5b50\u8282\u70b9\u5c06\u6839\u636e\u7b2c\u4e00\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u5212\u5206&#xff08;\u5373&#xff0c;\u5982\u679c\u7b2c\u4e00\u4e2a\u7ef4\u5ea6","og_url":"https:\/\/www.wsisp.com\/helps\/91308.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-07T09:00:45+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260807090043-6a759ebbc4abe.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/91308.html","url":"https:\/\/www.wsisp.com\/helps\/91308.html","name":"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-07T09:00:45+00:00","dateModified":"2026-08-07T09:00:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/91308.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/91308.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/91308.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"PCL\u70b9\u4e91\u5e93\u5b66\u4e60\uff08\u4e09\uff09\u2014\u2014 KdTree"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91308","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=91308"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/91308\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/91307"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=91308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=91308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=91308"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=91308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}