<a id="bayer-pattern-decoding"></a>

# Bayer Pattern Decoding

This code snippet shows how to perform Bayer pattern decoding.

## C++

```cpp
#include <eVision/EasyColor/EasyColor.h>
```

```cpp
using namespace eVision;
// Images constructor
EImageBW8 bayerImage;
EImageC24 dstImage;
// ...
// Source and destination images must have the same size
dstImage.SetSize(&bayerImage);
// Convert to true color with simple interpolation, default parity assumed
EasyColor::BayerToC24(&bayerImage, &dstImage);
```

#### SEE ALSO
[`EasyColor::BayerToC24`](../../../../doxygen_cpp/classeVision_1_1EasyColor.html#a577e7b4455e073ec17f9c64f69c93209) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1EasyColor.html#ad7499313af628d4613e86bc180641968) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1EasyColor.html#aa01976665ec8dd01c6118d1029938dcd)

## C#

```cs
using eVision;
```

```cs
// Images constructor
EImageBW8 bayerImage = new EImageBW8();
EImageC24 dstImage = new EImageC24();
// ...
// Source and destination images must have the same size
dstImage.SetSize(bayerImage);
// Convert to true color with simple interpolation, default parity assumed
EasyColor.BayerToC24(bayerImage, dstImage);
```

#### SEE ALSO
[`EasyColor.BayerToC24`](../../../../doxygen_cs/classeVision_1_1EasyColor.html#ad7499313af628d4613e86bc180641968) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1EasyColor.html#a577e7b4455e073ec17f9c64f69c93209) [<sub>Python</sub>](../../../../doxygen_python/classeVision_1_1EasyColor.html#aa01976665ec8dd01c6118d1029938dcd)

## Python

```py
import eVision
# Images constructor
bayer_image = eVision.EImageBW8()
dst_image = eVision.EImageC24()
# ...
# Source and destination images must have the same size
dst_image.SetSize(bayer_image)
# Convert to true color with simple interpolation, default parity assumed
eVision.EasyColor.BayerToC24(bayer_image, dst_image)
```

#### SEE ALSO
[`EasyColor.BayerToC24`](../../../../doxygen_python/classeVision_1_1EasyColor.html#aa01976665ec8dd01c6118d1029938dcd) [<sub>C++</sub>](../../../../doxygen_cpp/classeVision_1_1EasyColor.html#a577e7b4455e073ec17f9c64f69c93209) [<sub>.NET</sub>](../../../../doxygen_cs/classeVision_1_1EasyColor.html#ad7499313af628d4613e86bc180641968)
