<trclass="memdesc:ga3724a082502fbef6222c11843ca56b58"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the complexity of surface normals in a point cloud of type <code><aclass="el"href="classrtabmap_1_1LaserScan.html"title="Represents 2D or 3D laser scan data with support for multiple point data formats.">LaserScan</a></code>. <br/></td></tr>
<trclass="memdesc:ga5a68422282e99f8d05c0821eac491895"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the complexity of surface normals in a point cloud of type <code>pcl::Normal</code>. <br/></td></tr>
<trclass="memdesc:ga13a6d7525494d390041c9ef0337e02dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the complexity of surface normals in a point cloud of type <code>pcl::PointNormal</code>. <br/></td></tr>
<trclass="memdesc:ga6e03130bf686d43ea527dc8e6f5cce55"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the complexity of surface normals in a point cloud of type <code>pcl::PointXYZINormal</code>. <br/></td></tr>
<trclass="memdesc:ga3e024c51a6a49d1c8e6b64c230148137"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes the complexity of surface normals in a point cloud of type <code>pcl::PointXYZRGBNormal</code>. <br/></td></tr>
<p>Computes the complexity of surface normals in a point cloud using PCA. </p>
<p>This function performs a Principal Component Analysis (PCA) on the normals of a point cloud and returns a scalar measure of their spread (complexity). A low value indicates that normals are aligned (e.g., flat surface), while a high value indicates variation in orientation (e.g., curved or rough surface).</p>
<p>If a transformation is provided, the normals are rotated accordingly before PCA. The result is normalized to lie between 0 and 1, where 0 represents minimal complexity (the normals are confined to a lower-dimensional subspace, e.g. a flat surface) and 1 represents maximal complexity (the normal directions are isotropic).</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">cloud</td><td>The input point cloud or laser scan containing normals (pcl::PointNormal), or simply normals. </td></tr>
<tr><tdclass="paramname">t</td><td>The transform to apply to the normals (only the rotation is used). </td></tr>
<tr><tdclass="paramname">is2d</td><td>Set to true if the data is 2D (normals will be analyzed in 2D space). </td></tr>
<tr><tdclass="paramname">pcaEigenVectors</td><td>(Optional) Output matrix containing the eigenvectors computed by PCA. </td></tr>
<tr><tdclass="paramname">pcaEigenValues</td><td>(Optional) Output matrix containing the eigenvalues computed by PCA. </td></tr>
<tr><tdclass="paramname">centered</td><td>When true (default), use covariance PCA (centered at mean). Use false for the uncentered second-moment matrix <code>M = (1/N) sum(n_i * n_i^T)</code>, which measures span of normal directions and correctly identifies degeneracy even when there are only N (rather than N+1) distinct viewpoint-flipped normal directions in N-D space.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A float value between 0 and 1 representing the complexity of the normal distribution. Returns 0 if not enough valid normals are available.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>Invalid normals (containing NaN or Inf) are automatically filtered out. The result is the smallest eigenvalue (2nd in 2D, 3rd in 3D) scaled by the number of dimensions (2 or 3), so that it is normalized against the unit-norm normals. </dd></dl>
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<ul>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.8 </li>