# NAME

get_divide_by_sum_projection_matrix - Projects RGB data into rg space
# SYNOPSIS

#include "c/c_projection.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_divide_by_sum_projection_matrix
(
Matrix **output_mpp,
const Matrix *input_mp,
Invalid_chromaticity_action invalid_chromaticity_action,
double max_projection_coordinate,
double absolute_pixel_error,
double relative_pixel_error,
Matrix **error_points_mpp
);

# DESCRIPTION

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
get_projection_matrix().
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.
# RETURNS

NO_ERROR on success; ERROR on failure.
# NOTE

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.
# NOTE

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.
# RELATED

get_projection_matrix
# DISCLAIMER

This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
# AUTHOR

Kobus Barnard
# DOCUMENTER

Kobus Barnard, Lindsay Martin
# SEE ALSO

get_projection_matrix
,
project_matrix
,
divide_by_sum_project_matrix
,
project_matrix_onto_unit_sphere
,
get_projection_vector
,
project_vector
,
back_project_matrix
,
back_project_vector