Functions

colorbalance_lib.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned char * colorbalance_rgb_u8 (unsigned char *rgb, size_t size, size_t nb_min, size_t nb_max)
 simplest color balance on RGB channels
float * colorbalance_irgb_f32 (float *rgb, size_t size, size_t nb_min, size_t nb_max)
 simplest color balance based on the I axis applied to the RGB channels, bounded

Function Documentation

float* colorbalance_irgb_f32 ( float *  rgb,
size_t  size,
size_t  nb_min,
size_t  nb_max 
)

simplest color balance based on the I axis applied to the RGB channels, bounded

The input image is normalized by affine transformation on the I axis, saturating a percentage of the pixels at the beginning and end of the axis. This transformation is linearly applied to the R, G and B channels. The RGB cube is not stable by this operation, so some projections towards (0,0,0) on the RGB cube will be performed if needed.

Todo:
compute I=R+G+B instead of (R+G+B)/3 to save a division

Definition at line 72 of file colorbalance_lib.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char* colorbalance_rgb_u8 ( unsigned char *  rgb,
size_t  size,
size_t  nb_min,
size_t  nb_max 
)

simplest color balance on RGB channels

The input image is normalized by affine transformation on each RGB channel, saturating a percentage of the pixels at the beginning and end of the color space on each channel.

Definition at line 46 of file colorbalance_lib.c.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Files Functions Variables Defines