Functions

Color Processing Operations
[Image Processing]

Collaboration diagram for Color Processing Operations:

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)
void imProcessSetAlphaColor (const imImage *src_image, imImage *dst_image, float *src_color, float dst_alpha)

Detailed Description

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

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 target 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 can be IM_RGB/IM_BYTE or IM_RGB/IM_FLOAT only. Target 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 target 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. Target image can be IM_RGB/IM_BYTE or IM_RGB/IM_FLOAT only.
Source and target 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, including alpha.
Target images must be IM_GRAY. Size and data types must be all the same.
The number of target images must match the depth of the source image, including alpha.

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, including alpha.
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 target image, including alpha.

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).
It will not change the alpha channel if any. Target is IM_FLOAT, except if source is IM_DOUBLE.

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 target 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 complex.

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] 
void imProcessSetAlphaColor ( const imImage src_image,
imImage dst_image,
float *  src_color,
float  dst_alpha 
)

Sets the alpha channel in target where the given color occours in source, elsewhere alpha remains untouched.
The color must have the same number of components of the source image.
If target does not have an alpha channel, then its plane=0 is used.
Supports all color spaces for source and all data types except complex. Images must have the same size.

im.ProcessSetAlphaColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_alpha: number) [in Lua 5]