From c0b89ac5bfb90835ef01573267020e42d4fe070c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 23 Aug 2015 12:17:05 +0200 Subject: Imported Upstream version 1.8.0 --- xicc/xspect.h | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) mode change 100644 => 100755 xicc/xspect.h (limited to 'xicc/xspect.h') diff --git a/xicc/xspect.h b/xicc/xspect.h old mode 100644 new mode 100755 index 75c98f3..3e0caeb --- a/xicc/xspect.h +++ b/xicc/xspect.h @@ -116,6 +116,10 @@ void xspect2xspect(xspect *dst, xspect *targ, xspect *src); /* Plot up to 3 spectra */ void xspect_plot(xspect *sp1, xspect *sp2, xspect *sp3); + +/* Plot up to 10 spectra */ +void xspect_plot10(xspect *sp, int n); + #endif /* !SALONEINSTLIB*/ /* ------------------------------------------------------------------------------ */ @@ -141,9 +145,11 @@ typedef enum { icxIT_F8 = 12, /* Fluorescent, Broad Band 5000K, CRI 95 */ icxIT_F10 = 13, /* Fluorescent Narrow Band 5000K, CRI 81 */ icxIT_Spectrocam = 14, /* Spectrocam Xenon Lamp */ - icxIT_Dtemp = 15, /* Daylight at specified temperature */ + icxIT_ODtemp = 15, /* Daylight at specified temperature */ + icxIT_Dtemp = 16, /* 15:2004 Daylight at specified temperature */ #endif /* !SALONEINSTLIB*/ - icxIT_Ptemp = 16 /* Planckian at specified temperature */ + icxIT_OPtemp = 17, /* Planckian at specified temperature */ + icxIT_Ptemp = 18 /* 15:2004 Planckian at specified temperature */ } icxIllumeType; /* Fill in an xpsect with a standard illuminant spectrum */ @@ -170,7 +176,8 @@ typedef enum { icxOT_Stiles_Burch_2 = 5, /* Stiles & Burch 1955 2 degree */ icxOT_Judd_Voss_2 = 6, /* Judd & Voss 1978 2 degree */ icxOT_CIE_1964_10c = 7, /* Standard CIE 1964 10 degree, 2 degree compatible */ - icxOT_Shaw_Fairchild_2 = 8 /* Shaw & Fairchild 1997 2 degree */ + icxOT_Shaw_Fairchild_2 = 8, /* Shaw & Fairchild 1997 2 degree */ + icxOT_EBU_2012 = 9 /* EBU standard camera curves 2012 */ #endif /* !SALONEINSTLIB*/ } icxObserverType; @@ -197,9 +204,14 @@ struct _xsp2cie { int doLab; /* Return D50 Lab result */ icxClamping clamp; /* Clamp XYZ and Lab to be +ve */ + /* Integration range and steps - set to observer range and 1nm by default. */ + int spec_bw; /* Integration bandwidth (nm) */ + double spec_wl_short; /* Start wavelength (nm) */ + double spec_wl_long; /* End wavelength (nm) */ + #ifndef SALONEINSTLIB /* FWA compensation */ - double bw; /* Integration bandwidth */ + double fwa_bw; /* Integration bandwidth */ xspect iillum; /* Y = 1 Normalised instrument illuminant spectrum */ xspect imedia; /* Instrument measured media */ xspect emits; /* Estimated FWA emmission spectrum */ @@ -215,6 +227,13 @@ struct _xsp2cie { /* Public: */ void (*del)(struct _xsp2cie *p); + /* Override the integration wavelength range and step size */ + void (*set_int_steps)(struct _xsp2cie *p, /* this */ + double bw, /* Integration step size (nm) */ + double shortwl, /* Starting nm */ + double longwl /* Ending nm */ + ); + /* Convert (and possibly fwa correct) reflectance spectrum */ /* Note that the input spectrum normalisation value is used. */ /* Note that the returned XYZ is 0..1 range for reflectanc. */ @@ -310,27 +329,27 @@ xsp2cie *new_xsp2cie( #ifndef SALONEINSTLIB /* --------------------------- */ -/* Given a choice of temperature dependent illuminant (icxIT_Dtemp or icxIT_Ptemp), */ +/* Given a choice of temperature dependent illuminant (icxIT_[O]Dtemp or icxIT_[O]Ptemp), */ /* return the closest correlated color temperature to the XYZ. */ /* An observer type can be chosen for interpretting the spectrum of the input and */ /* the illuminant. */ /* Return -1.0 on erorr */ double icx_XYZ2ill_ct2( double txyz[3], /* If not NULL, return the XYZ of the locus temperature */ -icxIllumeType ilType, /* Type of illuminant, icxIT_Dtemp or icxIT_Ptemp */ +icxIllumeType ilType, /* Type of illuminant, icxIT_[O]Dtemp or icxIT_[O]Ptemp */ icxObserverType obType, /* Observer, CIE_1931_2 or CIE_1964_10 */ double xyz[3], /* Input XYZ value */ int viscct /* nz to use visual CIEDE2000, 0 to use CCT CIE 1960 UCS. */ ); -/* Given a choice of temperature dependent illuminant (icxIT_Dtemp or icxIT_Ptemp), */ +/* Given a choice of temperature dependent illuminant (icxIT_[O]Dtemp or icxIT_[O]Ptemp), */ /* a color temperature and a Y value, return the corresponding XYZ */ /* An observer type can be chosen for interpretting the spectrum of the input and */ /* the illuminant. */ /* Return xyz[0] = -1.0 on erorr */ void icx_ill_ct2XYZ( double xyz[3], /* Return the XYZ value */ -icxIllumeType ilType, /* Type of illuminant, icxIT_Dtemp or icxIT_Ptemp */ +icxIllumeType ilType, /* Type of illuminant, icxIT_[O]Dtemp or icx[O]IT_Ptemp */ icxObserverType obType, /* Observer, CIE_1931_2 or CIE_1964_10 */ int viscct, /* nz to use visual CIEDE2000, 0 to use CCT CIE 1960 UCS. */ double tin, /* Input temperature */ @@ -440,14 +459,14 @@ double temp, /* Input temperature in degrees K */ xspect *custIllum); /* Optional custom illuminant */ -/* Given a choice of temperature dependent illuminant (icxIT_Dtemp or icxIT_Ptemp), */ +/* Given a choice of temperature dependent illuminant (icxIT_[O]Dtemp or icxIT_[O]Ptemp), */ /* return the closest correlated color temperature to the given spectrum or XYZ. */ /* An observer type can be chosen for interpretting the spectrum of the input and */ /* the illuminant. */ /* Return -1 on erorr */ double icx_XYZ2ill_ct( double txyz[3], /* If not NULL, return the XYZ of the black body temperature */ -icxIllumeType ilType, /* Type of illuminant, icxIT_Dtemp or icxIT_Ptemp */ +icxIllumeType ilType, /* Type of illuminant, icxIT_[O]Dtemp or icxIT_[O]Ptemp */ icxObserverType obType, /* Observer */ xspect custObserver[3], /* Optional custom observer */ double xyz[3], /* Input XYZ value, NULL if spectrum intead */ @@ -460,9 +479,18 @@ int viscct); /* nz to use visual CIEDE2000, 0 to use CCT CIE 1960 UCS. */ /* is invalid because the sample is not white enough. */ double icx_CIE1995_CRI( int *invalid, /* if not NULL, set to nz if invalid */ +double cris[14], /* If not NULL, return the TCS01-14 CRI's */ xspect *sample /* Illuminant sample to compute CRI of */ ); +/* Compute the EBU TLCI-2012 Qa */ +/* Return < 0.0 on error */ +/* If invalid is not NULL, set it to nz if TLCI */ +/* is invalid because the sample is not white enough. */ +double icx_EBU2012_TLCI( +int *invalid, /* if not NULL, set to nz if invalid */ +xspect *sample /* Illuminant sample to compute TLCI of */ +); /* Return the maximum 24 hour exposure in seconds. */ /* Limit is 8 hours */ -- cgit v1.2.3