Package: recolorize 0.1.0

recolorize: Color-Based Image Segmentation

Automatic, semi-automatic, and manual functions for generating color maps from images. The idea is to simplify the colors of an image according to a metric that is useful for the user, using deterministic methods whenever possible. Many images will be clustered well using the out-of-the-box functions, but the package also includes a toolbox of functions for making manual adjustments (layer merging/isolation, blurring, fitting to provided color clusters or those from another image, etc). Also includes export methods for other color/pattern analysis packages (pavo, patternize, colordistance).

Authors:Hannah Weller [aut, cre]

recolorize_0.1.0.tar.gz
recolorize_0.1.0.zip(r-4.5)recolorize_0.1.0.zip(r-4.4)recolorize_0.1.0.zip(r-4.3)
recolorize_0.1.0.tgz(r-4.4-any)recolorize_0.1.0.tgz(r-4.3-any)
recolorize_0.1.0.tar.gz(r-4.5-noble)recolorize_0.1.0.tar.gz(r-4.4-noble)
recolorize_0.1.0.tgz(r-4.4-emscripten)recolorize_0.1.0.tgz(r-4.3-emscripten)
recolorize.pdf |recolorize.html
recolorize/json (API)
NEWS

# Install 'recolorize' in R:
install.packages('recolorize', repos = c('https://hiweller.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/hiweller/recolorize/issues

Datasets:
  • werner - Werner's nomenclature of colors

On CRAN:

7.47 score 38 stars 74 scripts 337 downloads 39 exports 64 dependencies

Last updated 4 months agofrom:71f6d35eca. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 18 2024
R-4.5-winOKNov 18 2024
R-4.5-linuxOKNov 18 2024
R-4.4-winOKNov 18 2024
R-4.4-macOKNov 18 2024
R-4.3-winOKNov 18 2024
R-4.3-macOKNov 18 2024

Exports:absorbLayeradd_imageadjust_colorassignPixelsbackgroundConditionbackgroundIndexblurImagebrick_to_arrayclassify_recolorizecolorClusterscolorResidualsconstructImageeditLayereditLayershclust_colorimDistimHeatmapimposeColorsmatch_colorsmedianColorsmergeLayersplotColorClustersplotColorPaletteplotImageArrayraster_to_arrayreadImagereclusterrecoloredImagerecolorizerecolorize_adjacencyrecolorize_to_patternizerecolorize_to_pngrecolorize2recolorizeVectorreorder_colorsrerun_recolorizesplitByColorthresholdRecolorwernerColor

Dependencies:abindbmpclassclassIntcliclustercodetoolscolorRampscpp11curlDBIdigestdownloadere1071farverfuturefuture.applygeometryglobalsglueigraphimagerjpegKernSmoothlatticelifecyclelightrlinproglistenvlpSolvemagicmagickmagrittrMASSMatrixmgcvmisc3dnlmeparallellypavopkgconfigplot3DplotfunctionspngprogressrproxypurrrrasterRcppRcppProgressreadbitmaprlangs2sfspstringistringrterratiffunitsvctrsviridisLitewkxml2

Introduction

Rendered fromIntroduction.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2023-10-10
Started: 2021-04-08

Step 0: Image acquisition and preparation

Rendered fromstep00_prep.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2021-12-06
Started: 2021-11-30

Step 1: Loading & processing images

Rendered fromstep01_loading.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2021-12-06
Started: 2021-11-30

Step 2: Initial clustering

Rendered fromstep02_initial_cluster.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2021-12-06
Started: 2021-11-30

Step 3: Refinement

Rendered fromstep03_refinement.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2021-12-06
Started: 2021-11-30

Step 4: Tweaks & edits

Rendered fromstep04_manual_tweak.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2022-06-02
Started: 2021-11-30

Step 5: Exporting & visualizing output

Rendered fromstep05_visualization_export.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2021-12-06
Started: 2021-11-30

Readme and manuals

Help Manual

Help pageTopics
Absorb a layer into its surrounding color patchesabsorbLayer
Add a raster image to a plotadd_image
Adjust the saturation and brightness of a coloradjust_color
Apply imager operations to layers of an imageapply_imager_operation
Converts from a raster array to a cimg objectarray_to_cimg
Convert from an array to a raster stackarray_to_RasterStack
Assign a 2D matrix of pixels to specified colorsassignPixels
Generate a background condition for maskingbackgroundCondition
Index and remove background pixels for color clusteringbackgroundIndex
Blur an imageblurImage
Convert from a RasterBrick to an arraybrick_to_array
Generate a 'coldist' object for CIE Lab colorscielab_coldist
Converts from cimg to raster arraycimg_to_array
Convert a 'recolorize' object to a 'classify' objectclassify_recolorize
Clean up parameters passed to mergeLayersclean_merge_params
Modified convertColorcol2col
Generate color clusters from an imagecolorClusters
Cluster pixel colors using histogram binningcolorClustersHist
Cluster pixel colors using K-means clusteringcolorClustersKMeans
Calculate squared residuals for color centerscolorResiduals
Generate an image from pixel assignments and color matrixconstructImage
Edit a color patch using morphological operationseditLayer
Edit multiple color patches using morphological operationseditLayers
Expand aspects of a recolorize object for other functionsexpand_recolorize
Plot and group colors by similarityhclust_color
Calculates the distance between non-transparent pixels in imagesimDist
Plot a heatmap of a matrix of color distancesimHeatmap
Recolor an image to a provided set of colorsimposeColors
Change colors of dendrogram tipslabelCol
Reorder a color palette to best match a reference palettematch_colors
Change color centers to median color of all pixels assigned to itmedianColors
Merge layers in a recolorized imagemergeLayers
Make pixel assignment matrix for recoloringpixelAssignMatrix
Plot recolorized image resultsplot.recolorize
Plot a 'recolorizeVector' objectplot.recolorizeVector
Plot color clusters in a color spaceplotColorClusters
Plot a color paletteplotColorPalette
Plot a 3D array as an RGB imageplotImageArray
Convert from a (small-r) raster object to an RGB arrayraster_to_array
Read in an image as a 3D arrayreadImage
Recluster color centers based on color similarityrecluster
Get recolored image from a recolorize objectrecoloredImage
Simplify the colors of an imagerecolorize
Run 'pavo''s adjacency and boundary strength analysis on a 'recolorize' objectrecolorize_adjacency
Convert a recolorize object to a raster objectrecolorize_to_patternize
Save a recolored image as a PNGrecolorize_to_png
Recolorize with automatic thresholdingrecolorize2
Convert a recolorize object to a vectorrecolorizeVector
Reorder colors in a recolorize objectreorder_colors
Rerun the sequence of calls used to produce a recolorize objectrerun_recolorize
Convert RGB colors to HSLrgb2hsl
Split color clusters in a recolorize object into layerssplitByColor
Drop minor colors from a recolorize objectthresholdRecolor
Werner's nomenclature of colorswerner
Remap an image to Werner's nomenclaturewernerColor