Learn R Programming

colorSpec (version 0.5-2)

computeADL: compute ADL coordinates by ray tracing

Description

Consider a colorSpec object x with type equal to responsivity.material. The set of all possible material reflectance functions (or transmittance functions) is convex, closed, and bounded (in any reasonable function space), and this implies that the set of all possible output responses from x is also convex, closed, and bounded. The latter set is called the object-color solid or Rösch Farbkörper for x. A color on the boundary of the object-color solid is called an optimal color. The special points W (the response to the perfect reflecting diffuser) and 0 are on the boundary of this set. The interior of the line segment of neutrals joining 0 to W is in the interior of the object-color solid. It is natural to parameterize this segment from 0 to 1 (from 0 to W). The solid is symmetrical about the neutral gray midpoint G=W/2. Now suppose that x has 3 spectra (3 responses) and consider a color response R not equal to G. There is a ray based at G and passing through R that intersects the boundary of the object-color solid at an optimal color B on the boundary with Logvinenko coordinates $(\delta,\omega)$. If these 2 coordinates are combined with $\alpha$ where R = $(1-\alpha)$G + $\alpha$B, it yields the Logvinenko coordinates $(\alpha,\delta,\omega)$ of R. These coordinates are also denoted by ADL; see References. A response is in the object-color solid iff $\alpha<=1$. a="" response="" is="" optimal iff $\alpha=1$. The coordinates of 0 are $(\alpha,\delta,\omega)$=(1,0,0). The coordinates of W are $(\alpha,\delta,\omega)$=(1,1,0). The coordinates of G are undefined.

Usage

## S3 method for class 'colorSpec':
computeADL( x, response )

Arguments

x
a colorSpec object with type equal to responsivity.material and 3 spectra
response
a vector of 3 numbers, or a matrix with 3 columns, that define 1 or more responses. A vector of 3 numbers is changed to a matrix with 1 row.

Value

  • computeADL returns a data.frame with a row for each response. The columns in the data frame are:
  • responsethe input response vector
  • ADLthe computed ADL coordinates of the response vector
  • omegathe reparameterized $\lambda$ in the interval [0,1]; see References
  • lambdalambda.1 and lambda.2 at the 2 transitions, in nm. lambda.1 < lambda.2 => bandpass, and lambda.1 > lambda.2 => bandstop.
  • If an individual ray could not be traced, the row contains NA in appropriate columns. In case of global error, the function returns NULL.

encoding

UTF-8

Known Issues

The optimal color boundary is not differentiable at 0 and W. There may be numerical iteration failures if the response is near the neutral axis.

Details

For each response, a ray is computed and the ray tracing is done by probeOptimalColors.

References

Logvinenko, A. D. An object-color space. Journal of Vision. 9(11):5, 1-23, (2009). http://journalofvision.org/9/11/5/. doi:10.1167/9.11.5. Godau, Christoph and Brian Funt. XYZ to ADL: Calculating Logvinenko's Object Color Coordinates. Proceedings Eighteenth IS&T Color Imaging Conference. San Antonio. Nov 2009.

See Also

type, probeOptimalColors, vignette optimals

Examples

Run this code
D50.eye = product( D50.5nm, 'varmat', xyz1931.1nm, wave='auto' )
computeADL( D50.eye, c(30,50,70) )
# response.x response.y response.z   ADL.alpha   ADL.delta  ADL.lambda     omega lambda.1 lambda.2
#         30         50         70   0.7364348   0.5384243 473.3909184 0.3008561 427.1431 555.5176
#since alpha < 1, this response is *inside* the object-color solid

Run the code above in your browser using DataLab