normalize_illum_spectra - Normalizes illumination spectra.


#include "c/c_sensor.h"

Example compile flags (system dependent):
   -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 normalize_illum_spectra
	Spectra **normalized_illum_sp_ptr,
	const Spectra *illum_sp,
	const Spectra *sensor_sp,
	double max_rgb


This routine normalizes illumination spectra using the sensors in sensor_sp, or, if sensor_sp is NULL, the ones managed by the KJB library. If KJB library options are made available to the user, then the sensors used can be changed using the "sensor-file" or "sf" option. If the user has not specified sensors, then default ones are used. The illumination spectra are normalized so that the maximal response is set to the parameter max_rgb which is often 255.0. If the value of max_rgb is negative then normalization is not done. The routine can be used with any kind of spectra, but since it really only makes sense (under foreseable conditions) to perform this operation on illuminant spectra, the routine name is chosen to reflect this.


If the sensors are supplied, then this routine returns NO_ERROR on success, and ERROR on failure. If the KJB library sensors are used, then this routine returns the sensor version number on success, and ERROR on failure, with an appropriate error message being set. The sensor version number is incremented every time the use user resets the sensor data files, and thus can be used to verify that cached data is still OK with sensor_data_is_up_to_date().


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


Kobus Barnard


Kobus Barnard


sensor_data_is_up_to_date , get_sensor_version , ow_normalize_illum_spectra , get_RGB_sensors , get_spectrum_xy_locus , get_spectrum_uv_locus , get_spectrum_rg_locus , get_xy_from_spectrum , get_xy_from_XYZ , get_uv_from_spectrum , get_uv_from_XYZ , get_rg_from_spectrum , get_rg_from_RGB , get_XYZ_from_spectrum , get_RGB_from_spectrum , get_ct_from_spectrum , get_sum_from_spectrum , get_RGB_vector_from_spectrum , generate_RGB_data , get_RGB_data_from_spectra , get_RGB_vector_from_spectra , get_RGB_from_spectra