| roundHVC | R Documentation |
The functions in this package compute Munsell HVC coordinates with high precision.
But when reporting the Munsell notation it is often desirable,
for historical consistency or other reasons,
to report a notation that is actually appears in one or more published books of
Munsell chips.
This rounding operation requires exact knowledge of such books,
which is taken from the data frame MunsellBooks.
roundHVC( HVC, books )
HVC |
a numeric Nx3 matrix with Munsell HVC values in the rows, or a vector that can be converted to such a matrix, by row.
|
books |
a comma-delimited string that specifies one or more books of chips.
The words in the string can be
|
First, the set of chips over all selected books is formed - a sub-frame of MunsellBooks.
Then the closest chip in this set to the given HVC is found.
For the color distance, the function
NickersonColorDifference() is used.
Unfortunately, the particular coefficients in this difference equation can lead to large regions
of Munsell color space with exact ties for the two closest chips.
These exact ties make the final result unpredictable and sometime unintuitive.
As a tie-breaker, a very small multiple (1.e-6) of plain
Eucliden distance is added to the Nickerson difference, which has proven effective.
A data.frame with a N rows and these columns:
HVC |
the given Nx3 input matrix HVC. |
ISCC-NBS Name |
the ISCC-NBS Name (the color name) of the given input chip, see |
MunsellRounded |
the Munsell notation that is rounded from HVC.
It is guaranteed to be in one of the books given by the argument |
FergusonName |
the color name of |
The row names are set to the row names of HVC.
But if these are NULL they are set to the Munsell notation of the input HVC.
Finally, if these row names have duplicates, they are set to 1:N.
Glenn Davis
Ferguson, Jonathan. Munsell notations and color names: Recommendations for archaeological practice. Journal of Field Archaeology. 39:4. 327-335. (2014). Online Supplement #1.
MunsellBooks,
ColorBlockFromMunsell()
## search the soil book for the best match for 3 chips
roundHVC( c("7.7YR 3.4/6.1", "2.6PB 6.1/4.5", "N 6.6/" ), books='soil' )
## HVC.H HVC.V HVC.C ISCC-NBS Name MunsellRounded Ferguson Name
## 7.7YR 3.4/6.1 17.7 3.4 6.1 strong brown 7.5YR 4/6 Strong brown
## 2.6PB 6.1/4.5 72.6 6.1 4.5 pale blue 5PB 6/1 Bluish gray
## N 6.6/ 0.0 6.6 0.0 light gray N 7/ Light gray
## The middle chip has a poor match, since "purplish-blue" with Chroma=4.5
## is not well-matched by soil color chips.
## Search again, but this time in 5 books.
roundHVC( c("7.7YR 3.4/6.1", "2.6PB 6.1/4.5", "N 6.6/" ), books='s,b,r,p,n' )
## HVC.H HVC.V HVC.C ISCC-NBS Name MunsellRounded Ferguson Name
## 7.7YR 3.4/6.1 17.7 3.4 6.1 strong brown 7.5YR 4/6 Strong brown
## 2.6PB 6.1/4.5 72.6 6.1 4.5 pale blue 5PB 6/4 Pale blue
## N 6.6/ 0.0 6.6 0.0 light gray N 7/ Light gray
## This time, for the middle chip, a better match was found.
## The other 2 chip are unchanged.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.