EMmodel {colourvision}R Documentation

Endler and Mielke (2005) colour vision model

Description

Endler and Mielke (2005) colour vision model extended to animals with any number of photoreceptor types.

Usage

EMmodel(photo = ncol(C)-1, type="length", R, I, Rb, C,
        interpolate=TRUE, nm=seq(300,700,1))

Arguments

photo

Number of photoreceptor types. Model accepts any number of photoreceptor types (>=2). For instance, dichromatic: photo=2; trichromatic: photo=3; tetrachromatic: photo=4, etc. Default gets number of photoreceptor types from C argument.

type

Whether the colour space should be built with a fixed vector length (type="length"), or a fixed edge length (distance between vertices; type="edge").

R

Reflectance of observed objects. A data frame with first column corresponding to wavelength values and following columns with reflectance values. R must be in the same scale as Rb (percentage or proportion).

I

Irradiance spectrum. A data frame with two columns only: first column corresponding to wavelength values and second column with irradiance values. Irradiance values must be in quantum flux units.

Rb

Background reflectance. A data frame with two columns only: first column corresponding to wavelength values and second column with reflectance values. Rb must be in the same scale as R (percentage or proportion).

C

Photoreceptor sensitivity curves, from lowest to longest lambda-max. A data frame: first column corresponding to wavelength values and following columns with photoreceptor sensitivity values (see function photor).

interpolate

Whether data files should be interpolated before further calculations. See approx.

nm

A sequence of numeric values specifying where interpolation is to take place. See approx.

Details

The original model is available for tetrachromatic animals only. In colourvision, the model was extended to any number of photoreceptors types (see also Pike 2012 formula).

First, relative quantum catches are log-transformed:

fi = ln(qi)

where qi is the relative quantum catch of photoreceptor type i, given by Qr. The model uses only relative output values, so that photoreceptor outputs are given by:

Ei = fi/sum(f1+f2+f3+...fn)

For tetrachromatic vision (Endler and Mielke 2005):

X1 = sqrt(3/2)*((1-2*E2-E3-E1)/2)

X2 = (-1+3*E3+E1)/2*sqrt(2)

X3 = E1-0.25

Tetrachromatic chromaticity diagram (tetrahedron) in Endler and Mielke (2005) has a vector of length = 0.75 and and edge length = sqrt(3/2). The chromaticity coordinates for other colour spaces may preserve either the same vector length or edge length.

For instance, for dichromatic vision coordinate (X1) in the colour space preserving the same vector length is found by:

X1 = (3/4)*(E2-E1)

Whereas for trichromatic vision coordinates (X1 and X2) are found by:

X1 = (3*sqrt(3)/8)*(E2-E1)

X2 = (3/4)*(E3-(E2+E1)/2)

Value

Qri

Photoreceptor photon catch values after the von Kries transformation (see function Qr).

Ei

Photoreceptor outputs after conversion to relative values.

Xi

Coordinates in the colour space.

deltaS

Euclidean distance to the origin of the colour space. It represents the conspicuousness of the stimulus (R) in relation to the background (Rb).

Author(s)

Felipe M. Gawryszewski f.gawry@gmail.com

References

Endler, J. A., and P. Mielke. 2005. Comparing entire colour patterns as birds see them. Biol J Linn Soc 86:405-431.

Pike, T.W. 2012. Generalised chromaticity diagrams for animals with n-chromatic colour vision. Journal of Insect Behavior 255: 277-286.

See Also

EMline, EMtriangle, EMtetrahedron, photor, CTTKmodel, RNLmodel, GENmodel

Examples

##Photoreceptor sensitivity curves
##with lambda max at 350nm, 450nm and 550nm:
C<-photor(lambda.max=c(350,450,550))

##Gray background
##with 7 percent reflectance from 300 to 700nm:
Rb <- data.frame(300:700, rep(7, length(300:700)))

## Read CIE D65 standard illuminant
data("D65")

##Reflectance data
## with a sigmoid spectrum and midpoint at 500nm and 550 nm
R1<-logistic(x=seq(300,700,1), x0=500, L=50, k=0.04)
R2<-logistic(x=seq(300,700,1), x0=550, L=50, k=0.04)
R<-cbind(R1, R2[,2])
R[,2]<-R[,2]+10
R[,3]<-R[,3]+10

## Run model 
model<-EMmodel(photo=3, type="edge",
       R=R, I=D65, Rb=Rb, C=C)

plot(model)

[Package colourvision version 2.0.3 Index]