Syntax
[T,DVL,FL]=TplanesofPCnormals(pc)
Input Parameter
pc : | | point cloud or vertex list |
Output Parameter
T : | | cell list of transformation matrices |
DVL : | | Triangle vertex list |
FL : | | facet list |
Examples
loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415
VLdownsample(VL_D415a,30); NVL=ans; whos('VL_D415a'), whos ('NVL')
TplanesofPCnormals(NVL)
Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, TplanesofPCnormals
, processes a point cloud to generate transformation matrices, a triangle vertex list, and a facet list. It is part of the SG-Library and was developed by Tim Lueth.
Input Parameters
- pc: A point cloud or vertex list. If the input is a 3-column matrix, it is converted to a point cloud object.
Output Results
- T: A cell list of transformation matrices for each point in the point cloud.
- DVL: A triangle vertex list, which is a matrix containing the vertices of triangles.
- FL: A facet list, which is a matrix containing indices of vertices that form each triangle.
Algorithm Steps
- Check if the input
pc
is a 3-column matrix. If so, convert it to a point cloud object using pointCloud(pc)
.
- Determine the number of vertices
nv
in the point cloud using size(pc.Location,1)
.
- If the normals of the point cloud are empty, compute them using
pcnormals(pc)
.
- Initialize a cell array
T
to store transformation matrices for each vertex.
- For each vertex in the point cloud, compute a transformation matrix using
TofPez
and store it in T
.
- Calculate the size of the bounding box
s
using sofBB(pc.Location)
.
- Initialize matrices
DVL
and FL
to store triangle vertices and facets, respectively.
- For each vertex, compute the triangle vertices using the transformation matrix and update
DVL
and FL
.
- If no output arguments are specified, plot the transformation matrices using
tfplot
and set the view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 07:44. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21