<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.cloudcompare.org/doc/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_compare_two_3D_entities</id>
	<title>How to compare two 3D entities - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.cloudcompare.org/doc/wiki/index.php?action=history&amp;feed=atom&amp;title=How_to_compare_two_3D_entities"/>
	<link rel="alternate" type="text/html" href="https://www.cloudcompare.org/doc/wiki/index.php?title=How_to_compare_two_3D_entities&amp;action=history"/>
	<updated>2026-04-29T22:56:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://www.cloudcompare.org/doc/wiki/index.php?title=How_to_compare_two_3D_entities&amp;diff=46626&amp;oldid=prev</id>
		<title>Daniel: /* Data comparison */</title>
		<link rel="alternate" type="text/html" href="https://www.cloudcompare.org/doc/wiki/index.php?title=How_to_compare_two_3D_entities&amp;diff=46626&amp;oldid=prev"/>
		<updated>2015-02-17T20:36:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Data comparison&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Load data ==&lt;br /&gt;
&lt;br /&gt;
Open the two 3D entities you want to compare with the « &amp;#039;&amp;#039;&amp;#039;File/Open&amp;#039;&amp;#039;&amp;#039; » menu entry [[Image:CcOpen_small.png]].&lt;br /&gt;
&lt;br /&gt;
These two entities can be:&lt;br /&gt;
* 2 point clouds&lt;br /&gt;
* 2 models (triangular meshes only - see [[FILE_I/O | supported formats]])&lt;br /&gt;
* or one of each&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Data preparation ==&lt;br /&gt;
&lt;br /&gt;
=== Scaling the entities ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;(if the two entities have already the same scale you can skip this step)&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* first choose an accurate element, visible in the two entities: edge, cornice, line or any other rectilinear element. If you can&amp;#039;t find such an element, then choose two specific points/vertices clearly visible in the two entities: crossing of two lines or curves, corner, etc.&lt;br /&gt;
* then measure the length of this element (or the distance between the two specific points) on the entity with the larger scale. To do this launch use the [[Point picking]] [[Image:CcPointPicking small.png]] tool.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note: if you work with a model (mesh), you&amp;#039;ll have first to make its vertices visible (by enabling the &amp;#039;vertices&amp;#039; entity in the database tree) or alternatively to sample points on the mesh - see last remark at the end of this tutorial.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:CCPointPickingDistance.jpg|frame|center|Distance measurement between two points]]&lt;br /&gt;
&lt;br /&gt;
* let&amp;#039;s call the measured distance D&amp;lt;sub&amp;gt;max&amp;lt;/sub&amp;gt;. Note it down (hint: it will also be displayed in the Console window or you can also save the corresponding label).&lt;br /&gt;
* repeat the process on the other entity (i.e. the one with the smaller scale). Let&amp;#039;s call the resulting distance D&amp;lt;sub&amp;gt;min&amp;lt;/sub&amp;gt;.&lt;br /&gt;
* compute the scaling factor &amp;#039;&amp;#039;Sf = D&amp;lt;sub&amp;gt;max&amp;lt;/sub&amp;gt; / D&amp;lt;sub&amp;gt;min&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* eventually apply this scaling factor on the smaller entity with the &amp;#039;Edit &amp;gt; [[Multiply/Scale]]&amp;#039; tool (use the &amp;#039;&amp;#039;Sf&amp;#039;&amp;#039; factor for all dimensions).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: conversely, you can scale-down the model with the larger scale by applying the inverse factor on it.&lt;br /&gt;
&lt;br /&gt;
=== Roughly registering the entities ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;(you can skip this step if the two models are already roughly registered)&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* first, if the entities are far apart, select both of them and use the &amp;#039;Tools &amp;gt; Registration &amp;gt; [[Alignment_and_Registration#Match_bounding-box_centers | Match bounding box centers]]&amp;#039; method (to make their centers of gravity match).&lt;br /&gt;
* then select one of the two entities (ideally the one that should move)&lt;br /&gt;
* eventually with the help of [[Interactive Transformation Tool]] [[Image:CCMoveIcon.png]], you can interactively rotate and translate the entity so as to (roughly) superimpose both entities.&lt;br /&gt;
&lt;br /&gt;
[[Image:CCRotateTranslateTool.jpg|frame|center|Manual registration of two entities with the &amp;#039;Rotate/Translate&amp;#039; tool]]&lt;br /&gt;
&lt;br /&gt;
=== Finely registering the entities ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;(you can skip this step if the two entities are already finely registered)&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* refine and finish the registration of the two entities with at least the [[Align | Align (point pairs picking)]] [[File:Cc_pointPairAlignIcon.png‎]] tool and ideally the [[ICP | Fine registration (ICP)]] [[File:CCRegisterIcon.png‎]] tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CCICPRegisterTool.jpg|frame|center|Automatic registration of two entities with the &amp;#039;Register&amp;#039; tool (ICP)]]&lt;br /&gt;
&lt;br /&gt;
== Data comparison ==&lt;br /&gt;
&lt;br /&gt;
You can now compute the distances between the two entities.&lt;br /&gt;
&lt;br /&gt;
Select both of them and choose the appropriate distance computation tool:&lt;br /&gt;
* for cloud/cloud comparison, use the [[Cloud-to-Cloud_Distance]] [[Image:CloudCloudDistanceIcon.png]] tool&lt;br /&gt;
&lt;br /&gt;
* for cloud/model comparison, use the [[Cloud-to-Mesh Distance]] [[File:CloudMeshDistanceIcon.png]] tool. Warning: in this case the model will always be considered as the &amp;#039;Reference&amp;#039; by CloudCompare.  If you want to use the model as the &amp;#039;compared&amp;#039; entity, you&amp;#039;ll have either to select its vertices - if they are dense enough - or sample points on the model as suggested at the end of this tutorial. Eventually you&amp;#039;ll have to perform a cloud/cloud comparison (see above).&lt;br /&gt;
&lt;br /&gt;
* for model/model comparison, use the [[Cloud-to-Mesh Distance]] [[Image:CloudMeshDistanceIcon.png]] tool as well. Warning: in this case CloudCompare will only use the vertices of the &amp;#039;Compared&amp;#039; mesh. If they are too sparse, you can also sample points on the model as suggested at the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: depending on the size of the entities and their spatial extents, this process can take from a few seconds to... a much longer time. To optimize the process, try to avoid as much as possible large non-overlapping areas (you can manually segment the entities with the [[Interactive Segmentation Tool]] [[File:CCSegmentIcon.png]]).&lt;br /&gt;
&lt;br /&gt;
Once the computation is done, the color scale can be adjusted in the &amp;#039;&amp;#039;Properties&amp;#039;&amp;#039; of the compared entity so as to display the results in a better way.&lt;br /&gt;
&lt;br /&gt;
[[Image:CCDistanceComputationResult.jpg|frame|center|Typical result of a distance computation process, with color scale display parameters adjusted]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dealing with sparse mesh vertices ===&lt;br /&gt;
&lt;br /&gt;
If the compared entity is a mesh, CloudCompare will only compute the distances from its vertices to the reference entity.&lt;br /&gt;
&lt;br /&gt;
If those vertices are too sparse (i.e. with a too low density), you may want to sample points on the mesh first (with a high sampling density). To do this, use the &amp;#039;Edit &amp;gt; Mesh &amp;gt; [[Mesh\Sample points | Sample points]]&amp;#039; [[File:CCSamplePointsIcon.png]] tool. Then use the resulting cloud as &amp;#039;compared&amp;#039; entity instead of the original model.&lt;/div&gt;</summary>
		<author><name>Daniel</name></author>
	</entry>
</feed>