Match raw color channel values to a smaller subset of colors.
List output from scale_image(). Contains an element Img_scaled.
Default 'cie94'. The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'.
'brickr_classic' is an explicit euclidean distance formula, but yield different results than 'euclidean' in farver.
See farver::compare_colour.
Defaults to lego_colors. Data frame of brick colors to map onto image. Must contain Name and R, G, B channels.
See attached data lego_colors as examples.
Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common).
This is useful when trying to build the mosaic out of real bricks.
Use "bw" for only grayscale bricks. Ignored if a color_table is supplied.
If img is a png has a transparent background, name of color to replace the background.
Improves color of large, photo-realistic mosaics.
For color_palette = "bw". A value >1 will increase the contrast of the image while a positive value <1 will decrease the contrast.
Piece type to use in absence of piece_type column.
A list with element Img_lego containing a data frame of the x- & y-coordinates, R, G, B channels, and mapped color of each brick (pixel).