IM: Color Processing Operations

IM - Imaging Libray

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_image3, imImage *dst_image)
void imProcessSplitComponents (const imImage *src_image, imImage **dst_image)
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 have the same size.

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. Destiny images are all IM_GRAY/IM_BYTE.
Source and destiny have the same size. See HSI Color Coordinate System Conversions .

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

Merge HSI planes into a RGB image.
Source images must be IM_GRAY/IM_BYTE. Destiny image is all IM_RGB/IM_BYTE.
Source and destiny have the same size. See HSI Color Coordinate System Conversions .

void imProcessSplitComponents const imImage src_image,
imImage **  dst_image
 

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.

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.

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.

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_COMPLEX.