MunsellToxyY Converts Munsell HVC to xyY coordinates, by interpolating over the
extrapolated Munsell renotation data.
Note that the returned xyY is relative to the white point of Illuminant C.
Since Illuminant C is obsolete, it is almost certain that if xyY is used in subsequent
calculations, it must be chromatically adapted to a different white point.
This chromatic adaptation can be done using
spacesXYZ::adaptxyY().
Alternatively, one can use MunsellToXYZ(),
which does the chromatic adaptation internally.
MunsellToxyY( MunsellSpec, xyC='NBS', hcinterp='bicubic', vinterp='cubic',
YfromV='ASTM', warn=TRUE )a data.frame with these columns:
the original MunsellSpec if that was a character vector.
Or the Munsell notation string converted from the input matrix HVC.
the input Nx3 matrix, or the HVC matrix converted from the input Munsell notation
the computed output matrix, with CIE xyY of MunsellSpec,
relative to the white point of Illuminant C.
In case of error, x and y are set to NA.
The rownames of xyY are set to those of HVC, unless they are NULL when they are set to SAMPLE_NAME.
a numeric Nx3 matrix or a vector that can be converted to
such a matrix.
Each row has Munsell HVC, where H is Hue Number,
and V and C are the standard Munsell Value and Chroma.
The Hue is automatically wrapped to the interval (0,100].
MunsellSpec can also be a character N-vector with standard Munsell notation; it is converted to an Nx3 matrix.
a numeric 2-vector with xy chromaticity of Illuminant C. It can also be one of the strings in the first column of this table; it is then replaced by the corresponding xy in the second column.
| xy white point | reference | |
'NBS' | c(0.3101,0.3163) | Kelly, et. al. [RP1549] (1943). Rheinboldt et al. (1960) |
'JOSA' | c(0.31012,0.31631) | Judd, Deane B. (1933) |
'NTSC' | c(0.310,0.316) | NTSC (1953) |
'CIE' | c(0.31006,0.31616) | CIE:15 2004 |
The default 'NBS' is probably what is intended by Newhall et. al.
although no xy for C appears in that paper.
This is the C used in the first computer program for conversion:
Rheinboldt et al. (1960).
The other options are provided so that a neutral Munsell chip has the xy that
the user expects. Alternative values of xyC should not be too far
from the above.
If hcinterp is 'bicubic',
this parameter only affects chips with Chroma \(<\) 4 (except Chroma=2).
If hcinterp is 'bilinear',
this parameter only affects chips with Chroma \(<\) 2.
the type of 2D interpolation for H and C; either 'bicubic' or 'bilinear' (partial matching enabled).
In the bicubic case, for a general input point, the output value is interpolated
using a 4x4 subgrid of the lookup table, and the interpolation function is class \(C^1\)
(except at the neutrals).
In the bilinear case, the interpolation uses a 2x2 subgrid,
and the function is class \(C^0\).
the type of interpolation for V; either 'cubic' or 'linear' (partial matching enabled).
In the cubic case, for a general input point, the output value is interpolated
using 4 planes of constant Value, and the interpolation function is class \(C^1\).
In the linear case, the interpolation uses 2 planes and the function is class \(C^0\).
passed as the parameter which to the function YfromV().
See YfromV() for details.
Option 'MGO' is not allowed because then Y>100 when V=10.
if a chip cannot be mapped (usually because the Chroma is too large),
its x and y are set to NA in the returned
data.frame.
Just before returning, if any rows have NA, and this argument is TRUE,
then a warning is logged.
Even when vinterp='cubic' the function HVC → xyY is not \(C^1\)
on the plane V=1.
This is because of a change in Value spacing:
when V\(\ge\)1 the Value spacing is 1, but when V\(\le\)1 the Value spacing is 0.2.
For an overview see: Appendix E - Logging and Condition Signaling in the User Guide.
In case of an ERROR event, an error condition is signaled with the additional
S3 class "invalid_argument".
The invalid argument is added to the condition object.
In the case that warn=TRUE, and not all xyY rows could be computed,
a WARN event is created,
and a warning condition is signaled with the additional S3 class "incomplete".
The condition object also has the submatrix of invalid HVC's as item invalid,
and their row indexes as item indexes.
Jose Gama and Glenn Davis
In case hcinterp='bicubic' or vinterp='cubic' a Catmull-Rom spline is used;
see the article Cubic Hermite spline.
This spline has the nice property that it is local and requires at most 4 points.
And if the knot spacing is uniform:
1) the resulting spline is \(C^1\),
2) if the knots are on a line, the interpolated points are on the line too.
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.
National Television System Committee. [Report and Reports of Panel No. 11, 11-A, 12-19, with Some supplementary references cited in the Reports, and the Petition for adoption of transmission standards for color television before the Federal Communications Commission] (1953)
Rheinboldt, Werner C. and John P. Menard. Mechanized Conversion of Colorimetric Data to Munsell Renotations. Journal of the Optical Society of America. Vol. 50, Issue 8, pp. 802-807. August 1960.
Wikipedia. Cubic Hermite spline. https://en.wikipedia.org/wiki/Cubic_Hermite_spline
Paul Centore 2014 The Munsell and Kubelka-Munk Toolbox https://www.munsellcolorscienceforpainters.com/MunsellAndKubelkaMunkToolbox/MunsellAndKubelkaMunkToolbox.html
xyYtoMunsell(),
MunsellToXYZ(),
spacesXYZ::adaptxyY()
MunsellToxyY( '7.6P 8.9/2.2' )
## SAMPLE_NAME HVC.H HVC.V HVC.C xyY.x xyY.y xyY.Y
## 1 7.6P 8.9/2.2 87.6 8.9 2.2 0.3109520 0.3068719 74.6134498
Run the code above in your browser using DataLab