# get an initial fit:
corbetti <- system.file("extdata/corbetti.png", package = "recolorize")
recolored_corbetti <- recolorize(corbetti, plotting = FALSE)
# recolor original image
corbetti_werner <- wernerColor(recolored_corbetti,
which_img = "original",
n_colors = 6)
# we can simplify the colors and then do it again:
corbetti_recluster <- recluster(recolored_corbetti,
cutoff = 45,
plot_hclust = FALSE)
corbetti_werner <- wernerColor(corbetti_recluster,
which_img = "recolored")
Run the code above in your browser using DataLab