IM: Color Processing Operations

IM - An Imaging Tool

Color Processing Operations
[Image Processing]


Detailed Description

Operations to change the color components configuration.
See im_process_pon.h


Functions

void imProcessSplitYChroma (const imImage *src_image, imImage *y_image, imImage *chroma_image)
void imProcessSplitHSI (const imImage *src_image, imImage *h_image, imImage *s_image, imImage *i_image)
void imProcessMergeHSI (const imImage *h_image, const imImage *s_image, const imImage *i_image, imImage *dst_image)
void imProcessSplitComponents (const imImage *src_image, imImage **dst_image_list)
void imProcessMergeComponents (const imImage **src_image_list, imImage *dst_image)
void imProcessNormalizeComponents (const imImage *src_image, imImage *dst_image)
void imProcessReplaceColor (const imImage *src_image, imImage *dst_image, float *src_color, float *dst_color)

Function Documentation

void imProcessSplitYChroma const imImage src_image,
imImage y_image,
imImage chroma_image
 

Split a RGB image into luma and chroma.
Chroma is calculated as R-Y,G-Y,B-Y. Source image must be IM_RGB/IM_BYTE.
luma image is IM_GRAY/IM_BYTE and chroma is IM_RGB/IM_BYTE.
Source and destiny must have the same size.

im.ProcessSplitYChroma(src_image: imImage, y_image: imImage, chroma_image: imImage) [in Lua 5] 
im.ProcessSplitYChromaNew(src_image: imImage) -> y_image: imImage, chroma_image: imImage [in Lua 5] 

void imProcessSplitHSI const imImage src_image,
imImage h_image,
imImage s_image,
imImage i_image
 

Split a RGB image into HSI planes.
Source image must be IM_RGB/IM_BYTE,IM_FLOAT. Destiny images are all IM_GRAY/IM_FLOAT.
Source images must normalized to 0-1 if type is IM_FLOAT (imProcessToneGamut can be used). See HSI Color Coordinate System Conversions for a definition of the color conversion.
Source and destiny must have the same size.

im.ProcessSplitHSI(src_image: imImage, h_image: imImage, s_image: imImage, i_image: imImage) [in Lua 5] 
im.ProcessSplitHSINew(src_image: imImage) -> h_image: imImage, s_image: imImage, i_image: imImage [in Lua 5] 

void imProcessMergeHSI const imImage h_image,
const imImage s_image,
const imImage i_image,
imImage dst_image
 

Merge HSI planes into a RGB image.
Source images must be IM_GRAY/IM_FLOAT. Destiny image can be IM_RGB/IM_BYTE,IM_FLOAT.
Source and destiny must have the same size. See HSI Color Coordinate System Conversions for a definition of the color conversion.

im.ProcessMergeHSI(h_image: imImage, s_image: imImage, i_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessMergeHSINew(h_image: imImage, s_image: imImage, i_image: imImage) -> dst_image: imImage [in Lua 5] 

void imProcessSplitComponents const imImage src_image,
imImage **  dst_image_list
 

Split a multicomponent image into separate components.
Destiny images must be IM_GRAY. Size and data types must be all the same.
The number of destiny images must match the depth of the source image.

im.ProcessSplitComponents(src_image: imImage, dst_image_list: table of imImage) [in Lua 5] 
im.ProcessSplitComponentsNew(src_image: imImage) -> dst_image_list: table of imImage [in Lua 5] 

void imProcessMergeComponents const imImage **  src_image_list,
imImage dst_image
 

Merges separate components into a multicomponent image.
Source images must be IM_GRAY. Size and data types must be all the same.
The number of source images must match the depth of the destiny image.

im.ProcessMergeComponents(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] 
im.ProcessMergeComponentsNew(src_image_list: table of imImage) -> dst_image: imImage [in Lua 5] 

void imProcessNormalizeComponents const imImage src_image,
imImage dst_image
 

Normalize the color components by their sum. Example: c1 = c1/(c1+c2+c3).
Destiny image must be IM_FLOAT.

im.ProcessNormalizeComponents(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessNormalizeComponentsNew(src_image: imImage) -> new_image: imImage [in Lua 5] 

void imProcessReplaceColor const imImage src_image,
imImage dst_image,
float *  src_color,
float *  dst_color
 

Replaces the source color by the destiny color.
The color will be type casted to the image data type.
The colors must have the same number of components of the images.
Supports all color spaces and all data types except IM_CFLOAT.

im.ProcessReplaceColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_color: table of numbers) [in Lua 5] 
im.ProcessReplaceColorNew(src_image: imImage, src_color: table of numbers, dst_color: table of numbers) -> new_image: imImage [in Lua 5]