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:

f_{i} = \ln{q_i}

where q_i 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:

E_i = \frac{f_i}{\sum_{i=1}^n f_i}

For tetrachromatic vision (Endler and Mielke 2005):

X1 = \sqrt{\frac{3}{2}}(\frac{1-2E_2-E_3-E_1}{2})

X2 = \frac{-1+3E_3+E_1}{2\sqrt{2}}

X3 = E_1-\frac{1}{4}

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 = \frac{3}{4}(E_2-E_1)

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

X1 = \frac{3\sqrt{3}}{8}(E_2-E_1)

X2 = \frac{3}{4}(E_3-\frac{E_2+E_1}{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.4 Index]