| xyYtoMunsell | R Documentation |
xyYtoMunsell Convert xyY coordinates to Munsell HVC,
by interpolating over the tabulated Munsell renotation data.
Note that the input xyY must be relative to the white point of Illuminant C.
Since Illuminant C is obsolete, it is almost certain that xyY
in modern calculations must be chromatically adapted
to the white point of Illuminant C before passing to this function.
This chromatic adaptation can be done using
spacesXYZ::adaptxyY().
Alternatively, one can use XYZtoMunsell(),
which does the chromatic adaptation internally.
HVC \to xyY is the forward direction, and xyY \to HVC is the inverse direction.
This inversion requires requires root-finding,
which is done using rootSolve::multiroot().
xyYtoMunsell( xyY, xyC='NBS', hcinterp='bicubic', vinterp='cubic',
VfromY='ASTM', rtol=1.e-8, atol=1.e-6, warn=TRUE, perf=FALSE )
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 the white point of Illuminant C. Y must be scaled so that Y=100 for the perfect reflecting diffuser. |
xyC |
a numeric 2-vector with xy chromaticity of Illuminant C.
It can also be one of the strings given in |
hcinterp |
the type of 2D interpolation for H and C; either |
vinterp |
the type of interpolation for V; either |
VfromY |
passed as the parameter |
rtol |
relative tolerance passed to |
atol |
absolute tolerance passed to |
warn |
if an xyY cannot be mapped
(usually because the root finder has wandered afar),
its H and V are set to |
perf |
if |
See MunsellToxyY() and the User Guide - Appendix C.
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 |
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 |
iterations |
the number of iterations of |
evaluations |
the number of forward (HVC \rarrow xyY) function evaluations |
estim.precis |
the estimated precision from |
Even when vinterp='cubic' the function xyY \rarrow 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.
Jose Gama and Glenn Davis
Paul Centore 2014
The Munsell and Kubelka-Munk Toolbox
\MKMTB
https://www.rit.edu/science/munsell-color-lab
https://www.rit-mcsl.org/MunsellRenotation/all.dat
https://www.rit-mcsl.org/MunsellRenotation/real.dat
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 \MKMTB
MunsellToxyY(),
rootSolve::multiroot(),
spacesXYZ::adaptxyY(),
microbenchmark::get_nanotime()
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
## The chromaticity of D65 is xy = (0.3127,0.3290) to 4 digits.
## If this is passed without chromatic adaptation, the result is not neutral.
munsellinterpol::xyYtoMunsell( c(0.3127,0.3290,18) )
## xyY.x xyY.y xyY.Y HVC.H HVC.V HVC.C SAMPLE_NAME
## 1 0.3127 0.3290 18.0000 37.6679246 4.8519274 0.6461961 7.7GY 4.9/0.65
## The Chroma is 0.65 instead of 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.