image2palettes: image2palettes

View source: R/image2palettes.r

image2palettesR Documentation

image2palettes

Description

Create palettes from an image

Usage

image2palettes(
  array,
  resize = 4,
  unique = FALSE,
  scale = F,
  k = 3,
  lcols = 7,
  plsaxis = 1,
  cex = 5,
  cext = 0.5
)

Arguments

array

array: rgb array

resize

numeric: desidered resize factor

unique

logical: if TRUE each color is counted once

scale

logical: if TRUE (color) variables are scaled

k

numeric: desidered number of clusters (i.e., number of palettes)

lcols

numeric: length of the color vector of each palette

plsaxis

numeric: desidered PLS axis

cex

numeric: size of colored squares

cext

numeric: size of color names

Value

paletteslist list: color palettes arranged in a list

Author(s)

Antonio Profico

Examples

## Not run: 
require(jpeg)
require(Morpho)
data("Altapic")
image2palettes(Altapic,resize=1,unique=T,scale=T,k=3,lcols=5,plsaxis=1,cext=0.5)

## End(Not run)

Arothron documentation built on Feb. 16, 2023, 5:17 p.m.