# Reading a set of Code

This code snippet shows how to read codes of any type.

## C++

```cpp
#include <eVision/EasyID/ECodeReader.h>
```

```cpp
using namespace eVision;

// Image constructor
EImageBW8 srcImage;

// Bar code reader constructor
ECodeReader reader;

// Set the max number of codes of each type to find
reader.SetMaxNumCodesPerType(2);

// Read the barcodes in the source image
std::vector<ECode> results = reader.Read(srcImage);

// Get decoded string
std::string decodedString = results[0].GetDecodedString();
```

#### SEE ALSO
[`ECodeReader::Read`](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#ac4d131d9f3d4f049ec792cb09e748a0f) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a5ed82f035549f108343a03613f51703f) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECodeReader.html#af120d89e856a5a6bdf8d96a33bb67da4), [`ECodeReader::SetMaxNumCodesPerType`](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#a2ce92772d0cf02cc1931d04e069b397e) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a877a54ca991ba17f0690dbeaf95938df) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECodeReader.html#a88c46efd9fc1a01a27335ecbffe580da), [`ECode::GetDecodedString`](../../../../doxygen_cpp/classeVision_1_1ECode.html#ac85cb88a6dbd8283e1274cb53cbdfecf) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECode.html#a9af2f11e45081455eea4f4241eaafe9a) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECode.html#a0349c8feddaf3759fe2566042c0f2319)

## C#

```cs
using eVision;
```

```cs
// Image constructor
EImageBW8 srcImage = new EImageBW8();

// Bar code reader constructor
ECodeReader reader = new ECodeReader();

// Set the max number of codes of each type to find
reader.MaxNumCodesPerType = 2;

// Read the bar codes in the source image
ECode[] results = reader.Read(srcImage);

// Get decoded string
string decodedString = results[0].DecodedString;
```

#### SEE ALSO
[`ECodeReader.Read`](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a5ed82f035549f108343a03613f51703f) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#ac4d131d9f3d4f049ec792cb09e748a0f) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECodeReader.html#af120d89e856a5a6bdf8d96a33bb67da4), [`ECodeReader.MaxNumCodesPerType`](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a877a54ca991ba17f0690dbeaf95938df) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#a19e2c5f1c7cf68585c2b6c4977959b0d) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECodeReader.html#a88c46efd9fc1a01a27335ecbffe580da), [`ECode.DecodedString`](../../../../doxygen_cs/classeVision_1_1ECode.html#a9af2f11e45081455eea4f4241eaafe9a) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECode.html#ac85cb88a6dbd8283e1274cb53cbdfecf) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1ECode.html#a0349c8feddaf3759fe2566042c0f2319)

## Python

```py
import eVision

# Image constructor
srcImage = eVision.EImageBW8()

# Bar code reader constructor
reader = eVision.ECodeReader()

# Set the max number of codes of each type to find
reader.MaxNumCodesPerType = 2

# Read the bar codes in the source image
results = reader.Read(srcImage)

# Get decoded string
decodedString = results[0].DecodedString
```

#### SEE ALSO
[`ECodeReader.Read`](../../../../doxygen_python/classeVision_1_1ECodeReader.html#af120d89e856a5a6bdf8d96a33bb67da4) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#ac4d131d9f3d4f049ec792cb09e748a0f) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a5ed82f035549f108343a03613f51703f), [`ECodeReader.MaxNumCodesPerType`](../../../../doxygen_python/classeVision_1_1ECodeReader.html#a88c46efd9fc1a01a27335ecbffe580da) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECodeReader.html#a19e2c5f1c7cf68585c2b6c4977959b0d) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECodeReader.html#a877a54ca991ba17f0690dbeaf95938df), [`ECode.DecodedString`](../../../../doxygen_python/classeVision_1_1ECode.html#a0349c8feddaf3759fe2566042c0f2319) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1ECode.html#ac85cb88a6dbd8283e1274cb53cbdfecf) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1ECode.html#a9af2f11e45081455eea4f4241eaafe9a)
