Convert a recolorize object to a raster object
Source:R/recolorize_to_patternize.R
recolorize_to_patternize.RdConvert from a recolorize object to a list of RasterLayer objects, the
format required by the patternize package. Note that most of the downstream
patternize functions that require lists of RasterLayer objects mostly
require lists of these lists, so you will probably need to use this function
on a list of recolorize objects.
Details
Note that this function does not retain the colors of the layers – you won't be able to convert back to a recolorize object from this object.
Examples
# \donttest{
# fit recolorize object:
img <- system.file("extdata/ephippigera.png", package = "recolorize")
rc <- recolorize2(img)
#>
#> Using 2^3 = 8 total bins
# takes ~10 sec to run:
# convert to a raster list:
as_raster_list <- recolorize_to_patternize(rc)
# }