View source: R/rgbShadowMask.R
rgbShadowMask | R Documentation |
This function builds a shadow mask from a RGB Raster*
object.
rgbShadowMask(x, n = 1L, ...)
x |
A |
n |
Integer, defaults to '1'. Number of iterations to distinguish between shadow and non-shadow pixels. The more iterations, the fewer shadow pixels will remain. |
... |
Further arguments passed on to |
A shadow mask RasterLayer
.
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.
rgb2YCbCr
library(RColorBrewer)
data(gmap_hel)
plotRGB(gmap_hel)
gmap_hel_wsh <- rgbShadowMask(gmap_hel)
plot(gmap_hel_wsh, axes = FALSE, legend = FALSE,
col = c(rev(brewer.pal(9, "Greys"))), alpha = .25, add = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.