User Tools

Site Tools


groimp-platform:pointcloudtools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
groimp-platform:pointcloudtools [2024/11/11 17:52] – [Split by leaf] gaetangroimp-platform:pointcloudtools [2024/12/06 12:04] (current) – [Point cloud tools] gaetan
Line 3: Line 3:
 This wiki present the base tools included in the [[https://gitlab.com/grogra/groimp-plugins/Pointcloud|Pointcloud plugin]]. The version used in 1.7. This wiki present the base tools included in the [[https://gitlab.com/grogra/groimp-plugins/Pointcloud|Pointcloud plugin]]. The version used in 1.7.
  
-Every tools presented here are available both from GUI or from RGG code. The projects used to create the images are available from the example explorer embedded in GroIMP. The tools consider the local/global transformation of the point cloud. +Every tools presented here are available both from GUI or from RGG code. The projects used to create the images are available from the example explorer embedded in GroIMP. The tools consider the local transformation of the point cloud. The coordinate of the Point are local in relatively to the Point cloud Node
  
 See more:  See more: 
Line 26: Line 26:
 To use the tools in RGG you should import the following packages: To use the tools in RGG you should import the following packages:
 <code java> <code java>
-import de.grogra.pointcloud.groimp.*; 
-import de.grogra.pointcloud.groimp.PointCloud; 
 import de.grogra.pointcloud.objects.impl.*; import de.grogra.pointcloud.objects.impl.*;
 import de.grogra.pointcloud.tools.Tools; import de.grogra.pointcloud.tools.Tools;
Line 33: Line 31:
  
  
 +===== Local transformation =====
 +
 +It is key to understand that in GroIMP each node have a local transformation, and the global coordinate of a node depends on the resolution of all previous local transformations from its parents in the graph.
 +
 +For point clouds nodes, it means that two point clouds with points that have the SAME coordinates, might be displayed at different global coordinates. The coordinates of Points are local by default. For instance, the two following point clouds are imported from the same file (and thus have the same local coordinates):
 +
 +{{:groimp-platform:pc_relativepos2.png?200| PC F}} {{ :groimp-platform:pc_relativepos1.png?200|F PC}}
 +
 +The first image results from //PointCloud F// and the second from //F PointCloud//
 +
 +It is possible to force a point cloud to have global coordinates by moving it to the root of the graph and transforming it with its globalTransformation with :
 +
 +<code java>
 +PointCloud myPC = ...;
 +Matrix34d transfo = de.grogra.pointcloud.utils.Utils.getGlobalTransform( myPC);
 +Matrix4d localT = myPC.getLocalTransformation();
 +myPC.setTransform( transfo.transform( localT ) );
 +[c:PointCloud ==> ^c;]
 +</code>
  
 ===== Split by plane ===== ===== Split by plane =====
Line 97: Line 114:
 {{:groimp-platform:pc1_merge2.png?200| Before split}} {{ :groimp-platform:pc1_splitleaf.png?200|After split}} {{:groimp-platform:pc1_merge2.png?200| Before split}} {{ :groimp-platform:pc1_splitleaf.png?200|After split}}
  
-==== Merge ====+===== Merge =====
  
 Turning several point clouds into one. The end result will be of the format (graph/list/array) of the first selected point cloud.  Turning several point clouds into one. The end result will be of the format (graph/list/array) of the first selected point cloud. 
 +
 +The merge tool is considering the coordinate of the point relatively to the Point cloud Node. For Node added to the root of the project graph, their local transformations are equivalent to a global one. Thus, Point clouds added at the root of the project graph, or having not transforming parent to the root, have "global coordinate".
 +
 +However, if the point clouds are under other transformations in the graph, the merged Points will be added to the other Point cloud with their local coordinate.
  
 === GUI === === GUI ===
Line 118: Line 139:
  
  
 +=== Output === 
 +
 +Point clouds added to the Project graph root:
 +
 +{{:groimp-platform:pc1_merge1.png?200|Before merge}} {{ :groimp-platform:pc1_merge2.png?200|After merge}}
 +
 +Point clouds with local transformations (as part branch of Nodes with transformations).
 +In the following example, the two point clouds are added each after a F build by the following code (where //PC1// and //PC2// are the Point cloud nodes:
 +<code java>
 +Axiom ==> F PC1 F PC2 ;
 +</code>
 +
 +In that example, the points of PC1 are translated by the //F// Node, but their local coordinates do not include this translation. Similarly, the points of PC2 are translated twice, once per F.
 +
 +If we merge the //RED// point cloud (PC2) into the //BLACK// one we have the following result (the points of PC2 are translated only by the first F):
  
 +{{:groimp-platform:pc2_merge1.png?200|Before merge}} {{ :groimp-platform:pc2_merge2.png?200|After the merge}}
  
 ==== Cluster ==== ==== Cluster ====
groimp-platform/pointcloudtools.1731343920.txt.gz · Last modified: 2024/11/11 17:52 by gaetan