# Reading QR Codes

This code snippet shows how to read a QR code and retrieve the decoded data.

## C++

```cpp
#include <eVision/EasyQRCode/EQRCodeReader.h>
```

```cpp
using namespace eVision;

// Image constructor
EImageBW8 srcImage;

// QR code reader constructor
EQRCodeReader reader;

// ...

// Read
std::vector<EQRCode> qrCodes = reader.Read(srcImage);

// Retrieve the decoded string in best guess mode from the first QR Code
std::string decoded_string = qrCodes[0].GetDecodedString(EByteInterpretationMode_Auto);
```

#### SEE ALSO
[`EQRCodeReader::Read`](../../../../doxygen_cpp/classeVision_1_1EQRCodeReader.html#aca78237d6203febd6221ed2e05cdc19b) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1EQRCodeReader.html#af3a09d6c336baba0d2d1f078f37c6877) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1EQRCodeReader.html#a98fbd0bb085de6d6d609875e6cc82ae4)

## C#

```cs
using eVision;
```

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

// QR code reader constructor
EQRCodeReader reader = new EQRCodeReader();

// ...

// Read
EQRCode[] qrCodes = reader.Read(srcImage);

// Retrieve the decoded string in best guess mode from the first QR Code
string decoded_string = qrCodes[0].GetDecodedString(EByteInterpretationMode.Auto);
```

#### SEE ALSO
[`EQRCodeReader.Read`](../../../../doxygen_cs/classeVision_1_1EQRCodeReader.html#af3a09d6c336baba0d2d1f078f37c6877) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1EQRCodeReader.html#aca78237d6203febd6221ed2e05cdc19b) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1EQRCodeReader.html#a98fbd0bb085de6d6d609875e6cc82ae4)

## Python

```py
import eVision
# Image constructor
src_image = eVision.EImageBW8()

# QR code reader constructor
reader = eVision.EQRCodeReader()

# ...

# Detect QRCodes in src_image
qr_codes = reader.Read(src_image)

# Retrieve the decoded string in best guess mode from the first QR Code
decoded_string = qr_codes[0].GetDecodedString(eVision.EByteInterpretationMode.Auto)
```

#### SEE ALSO
[`EQRCodeReader.Read`](../../../../doxygen_python/classeVision_1_1EQRCodeReader.html#a98fbd0bb085de6d6d609875e6cc82ae4) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1EQRCodeReader.html#aca78237d6203febd6221ed2e05cdc19b) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1EQRCodeReader.html#af3a09d6c336baba0d2d1f078f37c6877)
