EasyColor - Pre-Processing Color Images

EasyColor

A gray-level image pseudo-colored by the EasyColor library.

Purpose

The EasyColor library provides efficient color image processing:

  • Conversion between color systems: RGB, XYZ, L*a*b*, L*u*v*, YUV, YCbCr, YIQ, LCH, ISH / LSH, VSH and YSH.

  • Lookup table-based transforms for color balance, gamma precompensation, color calibration, and gain / offset.

  • Bayer pattern decoding (demosaicing) with several interpolation modes.

  • Extraction, composition, and replacement of color components.

  • Pseudo-coloring of gray-level images and separation of color objects.

Converting a Color Image to Another Color System

To convert a color image from RGB to another color system:

#include <eVision/EasyColor/EColorLookup.h>
#include <eVision/EasyColor/EasyColor.h>
using namespace eVision;
// Images constructor
EImageC24 srcImage;
EImageC24 dstImage;
// ...
// Prepare a lookup table for
// the RGB to La*b* conversion
EColorLookup lookup;
lookup.ConvertFromRgb(EColorSystem_Lab);
// Source and destination images must have the same size
dstImage.SetSize(&srcImage);
// Perform the color conversion
EasyColor::Transform(&srcImage, &dstImage, &lookup);
using eVision;
// Images constructor
EImageC24 srcImage = new EImageC24();
EImageC24 dstImage = new EImageC24();
// ...
// Prepare a lookup table for
// the RGB to La*b* conversion
EColorLookup lookup = new EColorLookup();
lookup.ConvertFromRgb(EColorSystem.Lab);
// Source and destination images must have the same size
dstImage.SetSize(srcImage);
// Perform the color conversion
EasyColor.Transform(srcImage, dstImage, lookup);
import eVision
# Images constructor
src_image = eVision.EImageC24()
dst_image = eVision.EImageC24()
# ...
# Prepare a lookup table for
# the RGB to La*b* conversion
lookup = eVision.EColorLookup()
lookup.ConvertFromRgb(eVision.EColorSystem.Lab)
# Source and destination images must have the same size
dst_image.SetSize(src_image)
# Perform the color conversion
eVision.EasyColor.Transform(src_image, dst_image, lookup)

Contents

Using EasyColor

Color systems, LUT transforms, components, pseudo-coloring, and RGB/BGR conversion.

Using EasyColor
Lookup Table Operations

Color balance, gamma, calibration, and gain / offset using precomputed lookup tables.

EasyColor - Lookup Table Operations
Bayer Conversion

Converting Bayer-encoded images to true color.

EasyColor - Bayer Conversion