EasyColor - Pre-Processing Color Images¶
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:
Create an
EColorLookup.NET Python object and prepare it withEColorLookup::ConvertFromRgb.NET Python.Call
EasyColor::Transform.NET Python to apply the lookup table to the source image.
#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¶
Color systems, LUT transforms, components, pseudo-coloring, and RGB/BGR conversion.
Color balance, gamma, calibration, and gain / offset using precomputed lookup tables.
Converting Bayer-encoded images to true color.
Quick Links¶
List of all Classes, Structs and Enumerations of the EasyColor library.
Easy to understand, ready to copy code snippets for the EasyColor library.