get_projection_vector - Projects RGB vector into a 2-D 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 Vector *input_vp,
This routine projects RGB data into a 2-D space, normally a chromaticity
space. The projection method used is specified by the argument
"projection_method". This argument should be one of DIVIDE_BY_RED,
DIVIDE_BY_GREEN, DIVIDE_BY_BLUE, DIVIDE_BY_SUM, ONTO_RG_PLANE, ONTO_GB_PLANE,
If "projection_method" is one of DIVIDE_BY_RED, DIVIDE_BY_GREEN,
DIVIDE_BY_BLUE, then the argument "max_projection_coordinate" should be used
to limit the size of the result in the case of denominators being too close
to zero. If "projection_method" is DIVIDE_BY_SUM, then this argument is
over-loaded to perform a similar function, but now it is the reciprocal of
the smallest value of the sum which is considered valid. For example, if
"max_projection_coordinate" is 1000, and R+G+B < 0.001, then that pixel is
considered invalid, and ERROR is returned.
If "projection_method" not one of the above, then this argument is
essentially ignored, but it should be DBL_NOT_SET.
If "max_projection_coordinate" is negative, then a default value is used.
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.
Comments are welcome. (In other words, help use fix (and test!) this
stuff, rather than reinventing the wheel).
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.