Bayer Pattern Decoding

This code snippet shows how to perform Bayer pattern decoding.

C++

#include <eVision/EasyColor/EasyColor.h>
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);

C#

using eVision;
// 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);

Python

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)