NAME

get_projection_vector - Projects RGB vector into a 2-D 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_projection_vector
(
	Vector **output_vpp,
	const Vector *input_vp,
	Projection_method projection_method,
	double max_projection_coordinate
);

DESCRIPTION

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, and ONTO_RB_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.

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. Comments are welcome. (In other words, help use fix (and test!) this stuff, rather than reinventing the wheel).

DISCLAIMER

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

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

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