Skip to content

Commit

Permalink
ADD: cmd_registrationRI
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Oct 6, 2023
1 parent dabdd80 commit 1570525
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/cmd_description/Cockroach_ClusterColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parent: Cmd Description

![img_planesegmentation](https://github.com/ibois-epfl/Cockroach-documentation/blob/docu-alpha/img/cmds/cockroach_clustercolor.jpg?raw=true)

<font size="2"><i> On the left: a gryscale cloud; on the right: the result of the color clustering. If you want to see an example of how the color clustering is used check out the <a href="[mailto:[email protected]](https://ibois-epfl.github.io/Cockroach-documentation/docs/tutorials/digital-twin-of-masonry-stone-wall-b/)">digital-twin-masonry-tutorial</a>. </i></font>
<font size="2"><i> On the left: a gryscale cloud; on the right: the result of the color clustering. If you want to see an example of how the color clustering is used check out the <a href="https://ibois-epfl.github.io/Cockroach-documentation/docs/tutorials/digital-twin-of-masonry-stone-wall-b/">digital-twin-masonry-tutorial</a>. </i></font>

This is a clustering technique based on color. It will cluster the pointcloud based on the color of the points . It is often useful to cluster a pointcloud based on color to separate different colored component of a pointcloud. Note that this command can be used also with *grayscale* colors as in the image. As many clustering techniques the command uses a [KNNsearch](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm) to find the colors relations of neighbors of each point.

Expand Down
35 changes: 32 additions & 3 deletions docs/cmd_description/Cockroach_RegistrationRIManual.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,42 @@ parent: Cmd Description

![cockroach_reg](https://github.com/ibois-epfl/Cockroach-documentation/blob/docu-alpha/img/cmds/cockroach_registrationrimanual.jpg?raw=true)

//
This command stich two clouds together.
This is also called a *registration* or *alignement* of two point clouds. To be working correctly the two clouds should share app. 1/3 of their points. The command will output a cloud that is the result of the registration of the two input clouds.
Note that this is a *supervised* algorithm, meaning that you will need to press `Space` to repeat the algorithm. The algorithm will stop when you decide after each step to stop. Besides visual clous of a good point cloud match, you can also check the log output in the terminal. This is what you will see:
```
-------------------------0 / 21------------- 👈 the number of iterations
Registration RI took: 0.0971272 seconds 👈 the time it took to compute the registration
Registration fitness result: 0.464567 👈 fitness is how well the two clouds match
Registration RMSE result: 0.0108833 👈 the RMSE is the distance between the two clouds
```
For the *fitness* values: the closer to `1` the better the match. For the *RMSE* values: the smaller the better the match.

![cockroach_reg_demo](https://github.com/ibois-epfl/Cockroach-documentation/blob/docu-alpha/img/cmds/cmd_registrationrimanual_demo.gif?raw=true)

<font size="2"><i> The rhino command will show you the red as the source cloud and green as the target cloud. At each iteration you can decide to stop or continue untill satisfied with the result. For example of application check out this <a href="http://localhost:4000/Cockroach-documentation/docs/tutorials/digital-twin-of-masonry-stone-wall-c/#register-stones-into-the-wall-layer" >digital-twin-masonry-tutorial</a>. </i></font>

The function is an iterative loop based on the registration algorithms from Open3d [`open3d::pipelines::registration::RegistrationRANSACBasedOnFeatureMatching`](http://www.open3d.org/html/cpp_api/namespaceopen3d_1_1pipelines_1_1registration.html), and ICP (Point to plane), [`open3d::pipelines::registration::RegistrationICP`](http://www.open3d.org/html/cpp_api/namespaceopen3d_1_1pipelines_1_1registration.htmll) combined.


> 🔎 There is also a command version full authomatic `Cockroach_RegistrationRI`. But we reccomand to use this manual one since you can stop the stiching process whenever you want.

**Command options:**
```
RadiusSearch=0.003
VoxelSize=0.005
```
{: .fs-6 .fw-300 }
When we perform the registration we are not performing the algorithm on the full resolution point cloud, but on a downsampled one. The computed rigid transformation will be applied to the full resolution though. If the cloud is already downsampled, set this value to `0`.

```
NnumberRepetion=20
```
{: .fs-6 .fw-300 }
It's the number of total repetitions of the registration algorithm.

```
ColorPointCloud=False
```
{: .fs-6 .fw-300 }
The radius of the search for each point of the *cutter* cloud. The bigger the value the more rough the substraction will be.
Whether to color the output cloud with random colors or keep the original colors.
Binary file modified img/cmds/cockroach_registrationrimanual.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1570525

Please sign in to comment.