Description Usage Arguments Details Value Author(s) References See Also Examples
Generate a color signature for each soil profile in a collection.
1 2 3 4 | soilColorSignature(spc, r = "r", g = "g", b = "b",
method='colorBucket', RescaleLightnessBy = 1, useProportions=TRUE,
pigmentNames=c('.white.pigment', '.red.pigment', '.green.pigment',
'.yellow.pigment', '.blue.pigment'))
|
spc |
a |
r |
horizon level attribute containing soil color (RGB) red values |
g |
horizon level attribute containing soil color (RGB) green values |
b |
horizon level attribute containing soil color (RGB) blue values |
method |
algorithm used to compute color signature, 'colorBucket', 'depthSlices', or 'pam' |
RescaleLightnessBy |
rescaling factor for CIE LAB L-coordinate |
useProportions |
use proportions or quantities, see details |
pigmentNames |
names for resulting pigment proportions or quantities |
details pending...
For the 'colorBucket' method, a data.frame
object containing:
set according to idname(spc)
proportion or quantity of CIE LAB L-values
proportion or quantity of CIE LAB positive A-values
proportion or quantity of CIE LAB negative A-values
proportion or quantity of CIE LAB positive B-values
proportion or quantity of CIE LAB negative B-values
Column names can be adjusted with the pigmentNames
argument.
For the 'depthSlices' method ...
For the 'pam' method ...
D.E. Beaudette
https://en.wikipedia.org/wiki/Lab_color_space
1 2 3 4 5 6 7 8 9 10 11 12 | # trivial example, not very interesting
data(sp1)
depths(sp1) <- id ~ top + bottom
# convert Munsell -> RGB triplets
rgb.data <- munsell2rgb(sp1$hue, sp1$value, sp1$chroma, return_triplets = TRUE)
sp1$r <- rgb.data$r
sp1$g <- rgb.data$g
sp1$b <- rgb.data$b
# extract color signature
pig <- soilColorSignature(sp1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.