recolorize_adjacency {recolorize} | R Documentation |
Run pavo
's adjacency and boundary strength analysis on a recolorize
object
Description
Run 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.
Usage
recolorize_adjacency(
recolorize_obj,
xscale = 1,
coldist = "default",
hsl = "default",
...
)
Arguments
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. |
Details
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.
Value
The results of pavo::adjacent; see that documentation for the meaning of each specific value.
See Also
pavo::adjacent, classify_recolorize
Examples
img <- system.file("extdata/chongi.png", package = "recolorize")
recolorize_obj <- recolorize(img, method = "k", n = 2)
recolorize_adjacency(recolorize_obj)