data(wbImage)
# Agenbag, method 1
agenbag1 <- agenbagFilters(X = wbImage, algorithm = 1)
# Agenbag, method 2
agenbag2 <- agenbagFilters(X = wbImage, algorithm = 2)
# Plotting results
par(mfrow = c(3, 1), mar = rep(0, 4))
# Original
image(wbImage, axes = FALSE, col = gray.colors(n = 1e3))
# Calculated
cols <- hcl.colors(n = 1e3, palette = "YlOrRd", rev = TRUE)
image(agenbag1, axes = FALSE, col = cols)
image(agenbag2, axes = FALSE, col = cols)
Run the code above in your browser using DataLab