project_matrix - Projects RGB data 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 Matrix *input_mp,
Output chromaticity matrix.
const Matrix *input_mp
Input RGB matrix.
Type of chromaticity.
Possible values for a
are as follows:
The first four are set based on backwards compatability. Hopefully all
the dependencies on the specific values have been purged, but by using
the same numeric values as before, things won't break regardless.
- DIVIDE_BY_RED - 0.
- DIVIDE_BY_GREEN - 1.
- DIVIDE_BY_BLUE - 2.
This routine projects RGB data into a 2-D space, normally a chromaticity
space specified by the argument "projection_method".
"projection method" should be one of
DIVIDE_BY_RED, DIVIDE_BY_GREEN, DIVIDE_BY_BLUE, DIVIDE_BY_SUM,
ONTO_RG_PLANE, ONTO_GB_PLANE, or ONTO_RB_PLANE.
This projection routine is a simpler interface to similar functionality as
provided by get_projection_matrix(). If more options are required, then that
routine should be used instead. Note, however, that the result of the two
routines can differ when the data is small or negative.
NO_ERROR on success and ERROR on failure. The usuall reason for failure is
that a projection denominator is less than DBL_EPSILON.
I am still working on this library. Be prepared for change!
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
Kobus Barnard, Lindsay Martin