<a id="e3d-object-extractor"></a>

# Easy3DObject - Extracting 3D Objects

`Easy3DObject` extracts objects and their features from a ZMap.

* The [`E3DObjectExtractor`](../../../doxygen_cpp/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) class uses a set of criteria to select the objects to extract.
* The extracted objects are instances of the [`E3DObject`](../../../doxygen_cpp/classeVision_1_1Easy3D_1_1E3DObject.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1Easy3D_1_1E3DObject.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1Easy3D_1_1E3DObject.html) class.

![image](assets/images/easy3d/easy3dobject/setting_objects_02.webp)

The basic workflow is as follows:

1. Load or build a [ZMap](../easy3d/zmap.html.md) (from an image or a point cloud).
2. Construct an [`E3DObjectExtractor`](../../../doxygen_cpp/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) instance.
3. Set the selection criteria of the [`E3DObjectExtractor`](../../../doxygen_cpp/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1Easy3D_1_1E3DObjectExtractor.html) instance.
4. Extract the 3D objects, with or without an [`ERegion`](../../../doxygen_cpp/classeVision_1_1ERegion.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1ERegion.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1ERegion.html).
5. Get and process the extracted objects list.

### C++

```cpp
#include <eVision/Easy3D/Easy3DObject/E3DObjectExtractor.h>
```

```cpp
using namespace eVision;
using namespace eVision::Easy3D;
// EZmap constructor
EZMap8 zMap;

// Extractor constructor
E3DObjectExtractor extractor;

// Setting a selection criterion
extractor.SetWidthRange(EFloatRange(10, 500));

// Extracts the objects from the EZMap
int regionNB = extractor.Extract(zMap);

// Retrieve the extracted objects
std::vector<E3DObject> objects = extractor.GetObjects();
```

### C#

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

```cs
// EZmap constructor
EZMap8 zMap = new EZMap8();

// Extractor constructor
E3DObjectExtractor extractor = new E3DObjectExtractor();

// Setting a selection criterion
extractor.WidthRange = new EFloatRange(10, 500);

// Extracts the objects from the EZMap
int regionNB = extractor.Extract(zMap);

// Retrieve the extracted objects
E3DObject[] objects = extractor.Objects;
```

### Python

```py
import eVision
from eVision import Easy3D
# EZmap constructor
zmap = Easy3D.EZMap8()

# Extractor constructor
extractor = Easy3D.E3DObjectExtractor()

# Setting a selection criterion
extractor.WidthRange = eVision.EFloatRange(10, 500)

# Extracts the objects from the EZMap
regionNB = extractor.Extract(zmap)

# Retrieve the extracted objects
objects = extractor.Objects
```

## Contents

Features that can be retrieved from a 3D object.

How to extract and use 3D objects.

## Quick Links

List of all Classes, Structs and Enumerations of the **Easy3DObject** library.

Code snippets for the **Easy3DObject** library.

#### SEE ALSO
The **3D objects extractor** sample in **eVision Studio** illustrates how to use the **Easy3DObject** library.
