# EPointCloudMerger Sample

This code snippet shows how to perform sensor fusion.

## C++

```cpp
#include <eVision/Easy3D/Easy3DMatch/EPointCloudMerger.h>
```

```cpp
using namespace eVision;
using namespace eVision::Easy3D;

// Calibration
EPointCloudMerger merger;
std::vector<EPointCloud> calibrationClouds;  // TODO: load or grab
float calibrationObjectSize = 100.f;  // size of an edge of the cube in the calibrationClouds
float calibrationScore = merger.Calibrate(calibrationClouds, calibrationObjectSize, true);

// Merging
std::vector<EPointCloud*> clouds;  // TODO: load or grab, must be in same order as calibrationClouds
EPointCloud mergedCloud;
merger.Merge(clouds, mergedCloud);
```

## C#

```cs
using eVision.Easy3D;
```

```cs
// Calibration
EPointCloudMerger merger = new EPointCloudMerger();
EPointCloud[] calibrationClouds = new EPointCloud[4];  // TODO: load or grab
float calibrationObjectSize = 100.0f;  // size of an edge of the cube in the calibrationClouds
float calibrationScore = merger.Calibrate(calibrationClouds, calibrationObjectSize, true);

// Merging
EPointCloud[] clouds = new EPointCloud[4];  // TODO: load or grab, must be in same order as calibrationClouds
EPointCloud mergedCloud = new EPointCloud();
merger.Merge(clouds, mergedCloud);
```

## Python

```py
from eVision import Easy3D
# Calibration
merger = Easy3D.EPointCloudMerger()
calibration_clouds: list[Easy3D.EPointCloud | None] = [Easy3D.EPointCloud(), Easy3D.EPointCloud(),
    Easy3D.EPointCloud(), Easy3D.EPointCloud()]  # TODO: load or grab
calibration_object_size = 100.  # size of an edge of the cube in the calibration_clouds
calibration_score = merger.Calibrate(calibration_clouds, calibration_object_size, True)

# Merging
clouds: list[Easy3D.EPointCloud | None] = [Easy3D.EPointCloud(), Easy3D.EPointCloud(),
    Easy3D.EPointCloud(), Easy3D.EPointCloud()]  # TODO: load or grab, must be in same order as calibration_clouds
mergedCloud = Easy3D.EPointCloud()
merger.Merge(clouds, mergedCloud)
```
