View source: R/recolorize_adjacency.R
recolorize_adjacency | R Documentation |
pavo
's adjacency and boundary strength analysis on a recolorize
objectRun adjacency (Endler 2012) and boundary strength (Endler et al. 2018)
analysis directly on a recolorize
object, assuming a human viewer
(i.e. using CIE Lab and HSL color distances that correspond to
perceptual distances of human vision). This is achieved by
converting the recolorize
object to a pavo::classify object,
converting the colors to HSL space, and calculating a pavo::coldist object
for CIE Lab color space before running pavo::adjacent.
recolorize_adjacency(
recolorize_obj,
xscale = 1,
coldist = "default",
hsl = "default",
...
)
recolorize_obj |
A |
xscale |
The length of the x-axis, in preferred units. Passed to pavo::adjacent. |
coldist |
A pavo::coldist object; otherwise, this argument
is ignored and a |
hsl |
A dataframe with |
... |
Further arguments passed to pavo::adjacent. |
Eventually, the plan is to incorporate more sophisticated color models than using human perceptual color distances, i.e. by allowing users to match color patches to spectra. However, this does return reasonable and informative results so long as human vision is an appropriate assumption for the image data.
The results of pavo::adjacent; see that documentation for the meaning of each specific value.
pavo::adjacent, classify_recolorize
img <- system.file("extdata/chongi.png", package = "recolorize")
recolorize_obj <- recolorize(img, method = "k", n = 2)
recolorize_adjacency(recolorize_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.