get_divide_by_sum_projection_matrix - Projects RGB data into rg space
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const Matrix *input_mp,
This routine projects RGB data into the rg chromaticity space.
The input matrix should have either 3 or 4 columns. The number of columns of
the output matrix is one less than that of the input matrix. If the input
matrix has 4 columns, the first column is assumed to be a value which should
be propogated into the chromaticity output, and it is copied to the first
column of the output matrix.
The argument "max_projection_coordinate" is used to specify the reciprocal of
the smallest value of the sum which is considered valid. For example, if
"max_projection_coordinate" is 1000, then any triplet with R+G+B < 0.001 is
considered invalid, and an action dictated by invalid_chromaticity_action is
taken. Possible actions are SKIP_INVALID_CHROMATICITY,
ZERO_INVALID_CHROMATICITY, and NEGATE_INVALID_CHROMATICITY.
The name and behaviour of "max_projection_coordinate" is currently chosen to
be consistent with the arguments to the more general function
If "max_projection_coordinate" is negative, then a default value is used.
If "error_points_mpp" is not NULL, then a result representing the range of
points based on the "absolute_pixel_error" and "relative_pixel_error" is
computed. If "error_points_mpp" is NULL, then the error parameters "
absolute_pixel_error" and "relative_pixel_error" are ignored, but by
convention they should have the value DBL_NOT_SET.
A more general routine get_projection_matrix() is available.
NO_ERROR on success; ERROR on failure.
The semantics of the routines in this module are ugly, and hopefully they
will be changed for the better. However, it is recomended that these
routines are used for colour projection regardless, to be consistent.
The number of rows in the projected data can be less than that of the
input. Similarly, the number of rows in the error results are not easily
determined from the input size.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
Kobus Barnard, Lindsay Martin