xyYtoMunsell {munsellinterpol}R Documentation

Convert xyY coordinates to Munsell HVC

Description

xyYtoMunsell Convert xyY coordinates to Munsell HVC, by interpolating over the extrapolated Munsell renotation data

Usage

xyYtoMunsell( xyY, xyC='NBS', hcinterp='bicubic', vinterp='cubic',
                     VfromY='ASTM', warn=TRUE, perf=FALSE ) 

Arguments

xyY

a numeric Nx3 matrix with CIE xyY coordinates in the rows, or a vector that can be converted to such a matrix, by row. These are for viewing in an environment with Illuminant C, with Y=100.

xyC

a numeric 2-vector with xy chromaticity of Illuminant C. It can also be one of the strings given in MunsellToxyY().

hcinterp

either 'bicubic' or 'bilinear' (partial matching enabled). See MunsellToxyY() for details.

vinterp

either 'cubic' or 'linear' (partial matching enabled). See MunsellToxyY() for details.

VfromY

passed as the parameter which to the function VfromY(). See VfromY() for details. Option 'MGO' is not allowed because then Y>100 when V=10.

warn

if an xyY cannot be mapped (usually because the root finder has wandered afar), its H and V are set to NA in the returned data.frame. Just before returning, if any rows in HVC have an NA, and warn == TRUE, then a warning is logged.

perf

if perf is TRUE, then extra performance related metrics are appended to the returned data.frame, see Value.

Details

See MunsellToxyY() and the User Guide - Appendix C.

Value

a data.frame with N rows and these columns:

xyY

The input xyY

HVC

the computed HVC. H is automatically wrapped to (0,100]. In case of failure, H and C are set to NA. The rownames of HVC are set to those of xyY, unless they are NULL when they are set to SAMPLE_NAME.

SAMPLE_NAME

the Munsell notation for HVC, a character vector

If perf is TRUE then there are these additional columns:

time.elapsed

elapsed time in seconds. If available, the function microbenchmark::get_nanotime() is used.

iterations

the number of iterations of rootSolve::multiroot()

evalations

the number of forward (HVC → xyY) function evaluations

estim.precis

the estimated precision from rootSolve::multiroot(). This is in the HC plane for the Munsell Value computed from Y.

Warning

Even when vinterp='cubic' the function xyY → HVC is not C^1 on the plane V=1. This is because of a change in Value spacing: when V\ge1 the Value spacing is 1, but when V\le1 the Value spacing is 0.2.

Author(s)

Jose Gama and Glenn Davis

Source

Paul Centore 2014 The Munsell and Kubelka-Munk Toolbox https://www.munsellcolourscienceforpainters.com/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html
https://www.rit.edu/science/munsell-color-lab
https://www.rit-mcsl.org/MunsellRenotation/all.dat
https://www.rit-mcsl.org/MunsellRenotation/real.dat

References

Judd, Deane B. The 1931 I.C.I. Standard Observer and Coordinate System for Colorimetry. Journal of the Optical Society of America. Vol. 23. pp. 359-374. October 1933.

Newhall, Sidney M., Dorothy Nickerson, Deane B. Judd. Final Report of the O.S.A. Subcommitte on the Spacing of the Munsell Colors. Journal of the Optical Society of America. Vol. 33. No. 7. pp. 385-418. July 1943.

Kelly, Kenneth L. Kasson S. Gibson. Dorothy Nickerson. Tristimulus Specification of the Munsell Book of Color from Spectrophometric Measurements National Bureau of Standards RP1549 Volume 31. August 1943.

Judd, Deane B. and Günther Wyszecki. Extension of the Munsell Renotation System to Very Dark Colors. Journal of the Optical Society of America. Vol. 46. No. 4. pp. 281-284. April 1956.

Paul Centore 2014 The Munsell and Kubelka-Munk Toolbox https://www.munsellcolourscienceforpainters.com/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html

See Also

MunsellToxyY(), rootSolve::multiroot(), microbenchmark::get_nanotime()

Examples

xyYtoMunsell(c(0.310897, 0.306510, 74.613450))
##       xyY.1     xyY.2     xyY.3     HVC.H     HVC.V     HVC.C    SAMPLE_NAME
## 1  0.310897  0.306510 74.613450 87.541720  8.900000  2.247428   7.5P 8.9/2.2

[Package munsellinterpol version 3.0-0 Index]