| rgb2YCbCr | R Documentation | 
This function transforms a RGB Raster* object to YCbCr color space.
rgb2YCbCr(x, r = 1, g = 2, b = 3)
x | 
 A   | 
r | 
 Integer, defaults to '1'. Index of the red channel.  | 
g | 
 Integer, defaults to '2'. Index of the green channel.  | 
b | 
 Integer, defaults to '3'. Index of the blue channel.  | 
A true-color RasterStack object converted to YCbCr color space.
Florian Detsch, Tim Appelhans
Deb, K. and Suny, A.H. (2014): Shadow Detection and Removal Based on YCbCr Color Space. Smart Computing Review 4, 23-33, doi:10.6029/smartcr.2014.01.003.
b_rgb <- brick(system.file("external/rlogo.grd", package="raster"))
plotRGB(b_rgb)
b_ycbcr <- rgb2YCbCr(b_rgb)
plot(b_ycbcr, 
     main = c("luminance", "blue-yellow chrominance", "green-red chrominance"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.