Skip to contents

Getting started

In this vignette, you will learn about the color space indexes provided by the package, with a focus on the RGB color space, the HSB color space, and the CIE-Lab color space.

Throughout the vignette, we will delve into the underlying formulas and methodologies used for converting colors between different color spaces, ensuring that you have a comprehensive understanding of how these transformations work.

RGB Color Space

The RGB (Red, Green, Blue) color space is a widely used color representation in computer graphics and digital imaging. In the pliman package, we provide a range of indexes to analyze and manipulate color data within the RGB color space:

Indexes in the RGB Color Space

Abbreviation Name Formula Reference
R Red (650 nm) R
G Green (545 nm) G
B Blue (445 nm) B
NR Normalized Red R / (R + G + B) Yang et al. (2015)
NG Normalized Green G / (R + G + B) Yang et al. (2015)
NB Normalized Blue B / (R + G + B) Yang et al. (2015)
GB Green-Blue Ratio G / B
RB Red-Blue Ratio R / B
GR Green-Red Ratio G / R
BI Brightness Index sqrt((R^2 + G^2 + B^2) / 3) Richardson and Wiegand (1977)
BI2 Brightness Index 2 sqrt((R^2 + G^2 + B^2) / 3)
SCI Soil Colour Index (R - G) / (R + G) Mathieu et al. (1998)
GLI Green Leaf Index ((G-R)+(G-B))/(G+R+G+B) Louhaichi, Borman, and Johnson (2001)
HI Primary Colours Hue Index (2*R-G-B)/(G-B) Escadafal, Belghit, and Ben-Moussa (1994)
NGRDI Normalized Green-Red Difference Index (G-R)/(G+R) Tucker (1979)
NGBDI Normalized Green-Blue Difference Index (G-B)/(G+B) Bannari et al. (1995)
SI Normalized Red-Blue Difference Index (R-B)/(R+B) Escadafal, Belghit, and Ben-Moussa (1994)
I Total intensity R + G + B
S Saturation ((R + G + B) - 3 * B) / (R + G + B)
L Average Intensity (R + G + B) / 3
VARI Visible Atmospherically Resistant Index (G-R)/(G+R-B) Anatoly A. Gitelson et al. (2002a)
HUE Overall Hue Index atan(2*(B-G-R)/30.5*(G-R)) Escadafal, Belghit, and Ben-Moussa (1994)
HUE2 Overall Hue Index 2 atan(2*(R-G-R)/30.5*(G-B)) Escadafal, Belghit, and Ben-Moussa (1994)
BGI Blue Green Pigment B/G Zarco-Tejada et al. (2005)
GRAY 0.299 * R + 0.587 * G + 0.114 * B
GRAY2 ((R^2.2 + (1.5 * G)^2.2 + (0.6 * B)^2.2) / (1 + 1.5^2.2 + 0.6^2.2))^(1/2.2)
GLAI (25 * (G - R) / (G + R - B) + 1.25)
CI Coloration Index ((R - B) / R)
SAT Overall Saturation Index ((max(R, G, B) - min(R, G, B)) / max(R, G, B))
SHP Shape Index (2 * (R - G - B) / (G - B))
RI Redness Index (R^2 / (B * G^3))
SAVI Soild Adjusted Vegetation Index (1 + 0.5)*(G-R)/(G+R+0.5) Li et al. (2010)

Multispectral indexes

{pliman} provides tools to analyze up to 5 bands , which are generally B, G, R, RE (red-edge) and NIR (near-infrared). The following build-in indexes are available.

Abbreviation Name Formula Reference
NDVI Normalized Diference Vegetation Index (NIR - R) / (NIR + R) Kriegler (1969)
PSRI Plant Senescence Reflectance Index (R-G)/RE Merzlyak et al. (1999)
GNDVI Normalized Difference NIR/G (NIR - G) / (NIR + G) Anatoly A. Gitelson and Merzlyak (1996)
RVI Ratio Vegetation Index R/NIR Pearson and Miller (1972)
VIN Vegetation Index Number NIR/R Pearson and Miller (1972)
NDRE Normalized Difference NIR/Rededge (NIR-RE)/(NIR+RE) A. Gitelson and Merzlyak (1994)
SAVI Soild Adjusted Vegetation Index ((NIR-R) / (NIR + R + 0.5) * 1 + 0.5) A. R. Huete (1988)
TSAVI Transformed Soil Adjusted Vegetation Index (2*((NIR-2)*(R-1)))/(R+2*(NIR-1)+0.5*(1+2*2)) Baret, Guyot, and Major (1989)
TVI Transformed Vegetation Index sqrt((NIR - R) / (NIR + R) + 0.5) Broge and Leblanc (2001)
CVI Chlorophyll vegetation index NIR*(R/G^2) Vincini, Frazzi, and D’Alessio (2008)
EVI Enhanced Vegetation Index 2.5*(NIR-R)/(NIR+6*R-7.5*B+1) A. Huete et al. (2002)
CIG Chlorophyll Index Green (NIR/G)-1 Anatoly A. Gitelson, Gritz †, and Merzlyak (2003)
CIRE Chlorophyll Index - Red-Edge (NIR/RE)-1 Anatoly A. Gitelson, Gritz †, and Merzlyak (2003)
RESR Red-Edge Simple Ratio  NIR/RE Anatoly A. Gitelson et al. (2002b)
GDVI Green Difference Vegetation Index NIR-G Index DataBase (2023)
REDVI Red-Edge Difference Vegetation Index NIR-RE Jordan (1969)
NDWI Normalized Difference Water Index (G-NIR)/(G+NIR) McFEETERS (1996)
CVI Chlorophyll vegetation index NIR * (R/(G*G)) Index DataBase (2023)
PNDVI Pan NDVI ((NIR-(G+R+B))/(NIR+(G+R+B))) Index DataBase (2023)
CCCI Canopy Chlorophyll Content Index ((NIR-R)/(NIR+R))/((NIR-R)/(NIR+R)) Index DataBase (2023)
OSAVI Optimized Soil Adjusted Vegetation Index (NIR-R)/(NIR+R+0.16) Rondeaux, Steven, and Baret (1996)
GOSAVI Green Optimized Soil Adjusted Vegetation Index (NIR-G)/(NIR+G+0.16) Index DataBase (2023)
GSAVI Green Soil Adjusted Vegetation Index ((NIR-G)/(NIR+G+0.5))*(1+0.5) Index DataBase (2023)
BAI Burn Area Index 1/((0.1 - R)^2 + (0.06 - NIR)^2) Chuvieco, Martín, and Palacios (2002)
GEMI Global Environmental Monitoring Index (2*(NIR*NIR-R*R)+1.5*NIR+0.5*R)/(NIR+R+0.5)*(1-0.25*(2*(NIR*NIR-R*R)+1.5*NIR+0.5*R)/(NIR+R+0.5))-((R-0.125)/(1-R)) Pinty and Verstraete (1992)
MSAVI Modified Soil Adjusted Vegetation Index  (1/2)*(2*(NIR+1)-sqrt((2*NIR+1)*2-8*(NIR-R))) Qi et al. (1994)
MSAVI2 Modified Soil Adjusted Vegetation Index 2 (2 * NIR + 1 - sqrt((2 * NIR + 1)^2 - 8 * (NIR - R) )) / 2 Qi et al. (1994)
VIG Vegetation Index (green) (G-R)/(G+R) Anatoly A. Gitelson et al. (2002c)
VIRE Vegetation Index (red-edge) (RE-R)/(RE+R) Anatoly A. Gitelson et al. (2002c)
VARIRE Visible Atmospherically Resistant Index (red-edge) (RE - 1.7 * R + 0.7 * B) / (RE + 2.3 * R - 1.3 * B) Anatoly A. Gitelson et al. (2002c)
ARVI Atmospherically resistant vegetation index (NIR - (R - 0.1*(R-B))) / (NIR + (R - 0.1*(R-B))) Kaufman and Tanre (1992)
GARI Green Atmospherically Resistant Index (NIR - (1.7 * (B-R))) / (NIR + (1.7 * (B-R))) Anatoly A. Gitelson, Kaufman, and Merzlyak (1996)
GRVI Green Ratio Vegetation Index NIR / G Sripada et al. (2006)
IPVI Infrared Percentage Vegetation Index NIR / (NIR + R) Crippen (1990)
LAI Leaf Area Index 3.368 * (2.5*(NIR-R)/(NIR+6*R-7.5*B+1)) - 0.118 Boegh et al. (2002)
MSR Modified Simple Ratio (NIR / R - 1) / (sqrt(NIR / R) + 1) Chen (1996)
NLI Non-Linear index (NIR ^2 - R) / (NIR ^2 + R) Goel and Qin (1994)
RDVI Renormalized Difference Vegetation Index (NIR - R) / (sqrt(NIR + R)) Roujean and Breon (1995)
TDVI Transformed Difference Vegetation Index 1.5 * ((NIR - R) / (sqrt(NIR ^2 + R + 0.5))) Bannari, Asalhi, and Teillet (2002)
WDRVI Wide Dynamic Range Vegetation Index (0.2 * NIR - R) / (0.2 * NIR + R) Anatoly A. Gitelson (2004)
ARI Anthocyanin Reflectance Index (1 / G) - (1 / RE) A. A. Gitelson, Merzlyak, and Chivkunova (2001)

Usefull references

HSB Color Space

The HSB (Hue, Saturation, Brightness) color space is an alternative color representation that emphasizes the perceptual aspects of color.

Conversion to CIE-Lab

The rgb_to_hsb() function can be used to convert RGB to HSB color space. The conversion is performed according to described by Karcher and Richardson (2003).

  • Hue (H):
    • If max (R,G,B) = R, H = 60 * (G - B) / (max(R,G,B) - min(R,G,B))
    • If max (R,G,B) = G, H = 60 * (2 + (B - R) / (max(R,G,B) - min(R,G,B))
    • If max (R,G,B) = B, H = 60 * (4 + (R - G) / (max(R,G,B) - min(R,G,B))
  • Saturation (S):
    • S = (max(R,G,B) - min(R,G,B)) / max(R,G,B)
  • Brightness (B):
    • B = max(R,G,B)

Indexes in the HSB Color Space

Abbreviation Name Formula Reference
DGCI Dark Green Color Inde ((H - 60) / 60 + (1 - S/100) + (1 - B/100)) / 3 Karcher and Richardson (2003)

CIE-Lab Color Space

The CIE-Lab (CIELAB) color space is a color model that approximates human vision and is often used for color difference analysis and color correction. In the pliman package, we support the conversion from RGB to Lab color space.

Conversion to CIE-Lab

The conversion from RGB to Lab is performed by the rgb_to_lab() function in the pliman package. This involves several steps, including the transformation from RGB to sRGB, sRGB to XYZ, and then from XYZ to Lab.

To understand the specific formulas and steps involved in this conversion, please refer to the detailed formulas.

Indexes in the CIE-Lab Color Space (soon)

Abbreviation Name Formula Reference

References

Bannari, A., H. Asalhi, and P.M. Teillet. 2002. “Transformed Difference Vegetation Index (TDVI) for Vegetation Cover Mapping.” In IEEE International Geoscience and Remote Sensing Symposium, 5:3053–3055 vol.5. https://doi.org/10.1109/IGARSS.2002.1026867.
Bannari, A., D. Morin, F. Bonn, and A. R. Huete. 1995. “A Review of Vegetation Indices.” Remote Sensing Reviews 13 (1-2): 95–120. https://doi.org/10.1080/02757259509532298.
Baret, F., G. Guyot, and D.J. Major. 1989. “TSAVI: A Vegetation Index Which Minimizes Soil Brightness Effects On LAI And APAR Estimation.” In 12th Canadian Symposium on Remote Sensing Geoscience and Remote Sensing Symposium, 3:1355–58. https://doi.org/10.1109/IGARSS.1989.576128.
Boegh, Eva, H. Soegaard, N. Broge, C. B. Hasager, N. O. Jensen, K. Schelde, and A. Thomsen. 2002. “Airborne Multispectral Data for Quantifying Leaf Area Index, Nitrogen Concentration, and Photosynthetic Efficiency in Agriculture.” Remote Sensing of Environment 81 (2): 179–93. https://doi.org/10.1016/S0034-4257(01)00342-X.
Broge, N. H, and E Leblanc. 2001. “Comparing Prediction Power and Stability of Broadband and Hyperspectral Vegetation Indices for Estimation of Green Leaf Area Index and Canopy Chlorophyll Density.” Remote Sensing of Environment 76 (2): 156–72. https://doi.org/10.1016/S0034-4257(00)00197-8.
Chen, Jing M. 1996. “Evaluation of Vegetation Indices and a Modified Simple Ratio for Boreal Applications.” Canadian Journal of Remote Sensing 22 (3): 229–42. https://doi.org/10.1080/07038992.1996.10855178.
Chuvieco, E., M. P. Martín, and A. Palacios. 2002. “Assessment of Different Spectral Indices in the Red-Near-Infrared Spectral Domain for Burned Land Discrimination.” International Journal of Remote Sensing 23 (23): 5103–10. https://doi.org/10.1080/01431160210153129.
Crippen, Robert E. 1990. “Calculating the Vegetation Index Faster.” Remote Sensing of Environment 34 (1): 71–73. https://doi.org/10.1016/0034-4257(90)90085-Z.
Escadafal, R., A. Belghit, and A. Ben-Moussa. 1994. “Indices Spectraux Pour La Télédétection de La Dégradation Des Milieux Naturels En Tunisie Aride.” In Actes Du 6eme Symposium International Sur Les Mesures Physiques Et Signatures En Télédétection, edited by G. Guyot, 253–59. Val d’Isère (France).
Gitelson, A. A., M. N. Merzlyak, and O. B. Chivkunova. 2001. “Optical properties and nondestructive estimation of anthocyanin content in plant leaves.” Photochemistry and Photobiology 74 (1): 38–45. https://doi.org/10.1562/0031-8655(2001)074<0038:opaneo>2.0.co;2.
Gitelson, Anatoly A. 2004. “Wide Dynamic Range Vegetation Index for remote quantification of biophysical characteristics of vegetation.” Journal of Plant Physiology 161 (2): 165–73. https://doi.org/10.1078/0176-1617-01176.
Gitelson, Anatoly A., Yuri Gritz †, and Mark N. Merzlyak. 2003. “Relationships Between Leaf Chlorophyll Content and Spectral Reflectance and Algorithms for Non-Destructive Chlorophyll Assessment in Higher Plant Leaves.” Journal of Plant Physiology 160 (3): 271–82. https://doi.org/10.1078/0176-1617-00887.
Gitelson, Anatoly A., Yoram J. Kaufman, and Mark N. Merzlyak. 1996. “Use of a Green Channel in Remote Sensing of Global Vegetation from EOS-MODIS.” Remote Sensing of Environment 58 (3): 289–98. https://doi.org/10.1016/S0034-4257(96)00072-7.
Gitelson, Anatoly A., Yoram J. Kaufman, Robert Stark, and Don Rundquist. 2002a. “Novel Algorithms for Remote Estimation of Vegetation Fraction.” Remote Sensing of Environment 80 (1): 76–87. https://doi.org/10.1016/s0034-4257(01)00289-9.
———. 2002b. “Novel Algorithms for Remote Estimation of Vegetation Fraction.” Remote Sensing of Environment 80 (1): 76–87. https://doi.org/10.1016/S0034-4257(01)00289-9.
———. 2002c. “Novel Algorithms for Remote Estimation of Vegetation Fraction.” Remote Sensing of Environment 80 (1): 76–87. https://doi.org/10.1016/S0034-4257(01)00289-9.
Gitelson, Anatoly A., and Mark N. Merzlyak. 1996. “Signature Analysis of Leaf Reflectance Spectra: Algorithm Development for Remote Sensing of Chlorophyll.” Journal of Plant Physiology 148 (3-4): 494–500. https://doi.org/10.1016/s0176-1617(96)80284-7.
Gitelson, Anatoly, and Mark N. Merzlyak. 1994. “Quantitative Estimation of Chlorophyll-a Using Reflectance Spectra: Experiments with Autumn Chestnut and Maple Leaves.” Journal of Photochemistry and Photobiology B: Biology 22 (3): 247–52. https://doi.org/10.1016/1011-1344(93)06963-4.
Goel, Narendra S., and Wenhan Qin. 1994. “Influences of Canopy Architecture on Relationships Between Various Vegetation Indices and LAI and Fpar: A Computer Simulation.” Remote Sensing Reviews 10 (4): 309–47. https://doi.org/10.1080/02757259409532252.
Huete, A, K Didan, T Miura, E.P Rodriguez, X Gao, and L.G Ferreira. 2002. “Overview of the Radiometric and Biophysical Performance of the MODIS Vegetation Indices.” Remote Sensing of Environment 83 (1-2): 195–213. https://doi.org/10.1016/s0034-4257(02)00096-2.
Huete, A.R. 1988. “A Soil-Adjusted Vegetation Index (SAVI).” Remote Sensing of Environment 25 (3): 295–309. https://doi.org/10.1016/0034-4257(88)90106-x.
Index DataBase. 2023. “IDB - List of Available Indices.” 2023. https://www.indexdatabase.de/db/i.php.
Jordan, Carl F. 1969. “Derivation of Leaf-Area Index from Quality of Light on the Forest Floor.” Ecology 50 (4): 663–66. https://doi.org/10.2307/1936256.
Karcher, Douglas E., and Michael D. Richardson. 2003. “Quantifying Turfgrass Color Using Digital Image Analysis.” Crop Science 43 (3): 943–51. https://doi.org/10.2135/cropsci2003.9430.
Kaufman, Y.J., and D. Tanre. 1992. “Atmospherically Resistant Vegetation Index (ARVI) for EOS-MODIS.” IEEE Transactions on Geoscience and Remote Sensing 30 (2): 261–70. https://doi.org/10.1109/36.134076.
Kriegler, F. 1969. “Preprocessing Transformations and Their Effects on Multspectral Recognition.” Proceedings of the Sixth International Symposium on Remote Sesning of Environment, 97–131. https://cir.nii.ac.jp/crid/1572261549021269760.
Li, Y., D. Chen, C. N. Walker, and J. F. Angus. 2010. “Estimating the Nitrogen Status of Crops Using a Digital Camera.” Field Crops Research 118 (3): 221–27. https://doi.org/10.1016/j.fcr.2010.05.011.
Louhaichi, Mounir, Michael M. Borman, and Douglas E. Johnson. 2001. “Spatially Located Platform and Aerial Photography for Documentation of Grazing Impacts on Wheat.” Geocarto International 16 (1): 65–70. https://doi.org/10.1080/10106040108542184.
Mathieu, Renaud, Marcel Pouget, Bernard Cervelle, and Richard Escadafal. 1998. “Relationships Between Satellite-Based Radiometric Indices Simulated Using Laboratory Reflectance Data and Typic Soil Color of an Arid Environment.” Remote Sensing of Environment 66 (1): 17–28. https://doi.org/10.1016/S0034-4257(98)00030-3.
McFEETERS, S. K. 1996. “The Use of the Normalized Difference Water Index (NDWI) in the Delineation of Open Water Features.” International Journal of Remote Sensing 17 (7): 1425–32. https://doi.org/10.1080/01431169608948714.
Merzlyak, Mark N., Anatoly A. Gitelson, Olga B. Chivkunova, and Victor YU. Rakitin. 1999. “Non-Destructive Optical Detection of Pigment Changes During Leaf Senescence and Fruit Ripening.” Physiologia Plantarum 106 (1): 135–41. https://doi.org/10.1034/j.1399-3054.1999.106119.x.
Pearson, R. L., and L. D. Miller. 1972. Remote Mapping of Standing Crop Biomass for Estimation of the Productivity of the Shortgrass Prairie. https://ui.adsabs.harvard.edu/abs/1972rse..conf.1355P.
Pinty, B., and M. M. Verstraete. 1992. “GEMI: A Non-Linear Index to Monitor Global Vegetation from Satellites.” Vegetatio 101 (1): 15–20. https://doi.org/10.1007/bf00031911.
Qi, J., A. Chehbouni, A.R. Huete, Y.H. Kerr, and S. Sorooshian. 1994. “A Modified Soil Adjusted Vegetation Index.” Remote Sensing of Environment 48 (2): 119–26. https://doi.org/10.1016/0034-4257(94)90134-1.
Richardson, A J, and Claudia Wiegand. 1977. “Distinguishing Vegetation from Soil Background Information.” Photogrammetric Engineering and Remote Sensing 43 (12): 1541–52. https://www.asprs.org/wp-content/uploads/pers/1977journal/dec/1977_dec_1541-1552.pdf.
Rondeaux, Geneviève, Michael Steven, and Frédéric Baret. 1996. “Optimization of Soil-Adjusted Vegetation Indices.” Remote Sensing of Environment 55 (2): 95–107. https://doi.org/10.1016/0034-4257(95)00186-7.
Roujean, Jean-Louis, and François-Marie Breon. 1995. “Estimating PAR Absorbed by Vegetation from Bidirectional Reflectance Measurements.” Remote Sensing of Environment 51 (3): 375–84. https://doi.org/10.1016/0034-4257(94)00114-3.
Sripada, Ravi P., Ronnie W. Heiniger, Jeffrey G. White, and Alan D. Meijer. 2006. “Aerial Color Infrared Photography for Determining Early In-Season Nitrogen Requirements in Corn.” Agronomy Journal 98 (4): 968–77. https://doi.org/10.2134/agronj2005.0200.
Tucker, Compton J. 1979. “Red and Photographic Infrared Linear Combinations for Monitoring Vegetation.” Remote Sensing of Environment 8 (2): 127–50. https://doi.org/10.1016/0034-4257(79)90013-0.
Vincini, M., E. Frazzi, and P. D’Alessio. 2008. “A Broad-Band Leaf Chlorophyll Vegetation Index at the Canopy Scale.” Precision Agriculture 9 (5): 303–19. https://doi.org/10.1007/s11119-008-9075-z.
Yang, Wenzhu, Sile Wang, Xiaolan Zhao, Jingsi Zhang, and Jiaqi Feng. 2015. “Greenness Identification Based on HSV Decision Tree.” Information Processing in Agriculture 2 (3-4): 149–60. https://doi.org/10.1016/j.inpa.2015.07.003.
Zarco-Tejada, P. J., A. Berjón, R. López-Lozano, J. R. Miller, P. Martín, V. Cachorro, M. R. González, and A. de Frutos. 2005. “Assessing Vineyard Condition with Hyperspectral Indices: Leaf and Canopy Reflectance Simulation in a Row-Structured Discontinuous Canopy.” Remote Sensing of Environment 99 (3): 271–87. https://doi.org/10.1016/j.rse.2005.09.002.