Type: | Package |
Title: | Color Vision Deficiencies |
Version: | 1.0.2 |
Encoding: | UTF-8 |
Description: | Methods for color vision deficiencies (CVD), to help understanding and mitigating issues with CVDs and to generate tests for diagnosis and interpretation. |
License: | GPL (≥ 3) |
Depends: | R (≥ 2.10) |
Enhances: | png, gWidgets2, RGtk2 |
LazyData: | yes |
Author: | Jose Gama [aut, cre, trl], Brian Foutch [ctb], Mark Grundland [ctb], Neil Dodgson [ctb] |
Maintainer: | Jose Gama <rxprtgama@gmail.com> |
Repository: | CRAN |
Repository/R-Forge/Project: | cvd |
Repository/R-Forge/Revision: | 16 |
Repository/R-Forge/DateTimeStamp: | 2016-11-28 09:01:48 |
Date/Publication: | 2016-11-28 13:23:17 |
NeedsCompilation: | no |
Packaged: | 2016-11-28 09:06:04 UTC; rforge |
Farnsworth B-20 cap colors
Description
B20
contains the cap colors for the Farnsworth B-20 test, in XYZ coordinates.
The Farnsworth B-20 is a short test for detecting congenital color vision deficiencies.
Usage
B20
Format
This data frame contains the following columns:
- CapNo
Cap Number
- Munsell
Munsell color
- X
CIE X cap color
- Y
CIE Y cap color
- Z
CIE Z cap color
Author(s)
Jose Gama
Source
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
References
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
Examples
data(B20)
B20
Table of color distance scores for quantitative scoring of the Farnsworth panel D-15 test
Description
BowmanTCDS
contains the color distance scores for quantitative scoring of the Farnsworth panel D-15 test, from Bowman KJ (1982)
The Farnsworth Dichotomous test (D-15) is a short test for detecting congenital color vision deficiencies. Bowman KJ (1982) created a table based on the Commission Internationale de l'Eclairage (International Commission on Illumination, CIE) Space and Color Difference formula, CIE 1976 (L*a*b*) with perceptual distances between pairs of caps. The table is used for the calculation of the Total Color Distance Score (TCDS) which is the sum of the CIELAB space distances between colored caps.
Usage
BowmanTCDS
Format
This data frame contains the following columns:
- Pilot
Distances between colored caps for the pilot cap
- Cap1
Distances between colored caps for the 1st cap
- Cap2
Distances between colored caps for the 2nd cap
- Cap3
Distances between colored caps for the 3rd cap
- Cap4
Distances between colored caps for the 4th cap
- Cap5
Distances between colored caps for the 5th cap
- Cap6
Distances between colored caps for the 6th cap
- Cap7
Distances between colored caps for the 7th cap
- Cap8
Distances between colored caps for the 8th cap
- Cap9
Distances between colored caps for the 9th cap
- Cap10
Distances between colored caps for the 10th cap
- Cap11
Distances between colored caps for the 11th cap
- Cap12
Distances between colored caps for the 12th cap
- Cap13
Distances between colored caps for the 13th cap
- Cap14
Distances between colored caps for the 14th cap
- Cap15
Distances between colored caps for the 15th cap
Author(s)
Jose Gama
Source
Bowman KJ: A method for quantitative scoring of the Farnsworth panel D-15. Acta Ophthalmol 60:907, 1982.
References
Bowman KJ: A method for quantitative scoring of the Farnsworth panel D-15. Acta Ophthalmol 60:907, 1982.
Examples
data(BowmanTCDS)
BowmanTCDS
Daltonize images
Description
Color.Vision.Daltonize
converts images so that the most problematic colors are more visible to people with CVD.
Usage
Color.Vision.Daltonize(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
Arguments
fileIN |
PNG input file |
fileOUT |
PNG output file |
myoptions |
CVD from "Protanope","Deuteranope" or "Tritanope" |
amount |
UNUSED - level from 0.0 to 1.0 for "Achromat" |
Value
none
Author(s)
Jose Gama
References
Michael Deal Daltonize.org http://mudcu.be/labs/Color/Vision http://www.daltonize.org/p/about.html "Analysis of Color Blindness" by Onur Fidaner, Poliang Lin and Nevran Ozguven. "Digital Video Colourmaps for Checking the Legibility of Displays by Dichromats" by Francoise Vienot, Hans Brettel and John D. Mollon http://vision.psychol.cam.ac.uk/jdmollon/papers/colourmaps.pdf
Examples
# a "perfect" score
## Not run:
fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='')
Color.Vision.Daltonize(fname, 'fruits.Daltonize.Protanope.png','Protanope')
Color.Vision.Daltonize(fname, 'fruits.Daltonize.Deuteranope.png','Deuteranope')
Color.Vision.Daltonize(fname, 'fruits.Daltonize.Tritanope.png','Tritanope')
## End(Not run)
Simulate CVDs on images
Description
Color.Vision.Simulate
converts images so that the colors look similar to how they are seen by people with CVD.
Usage
Color.Vision.Simulate(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
Arguments
fileIN |
PNG input file |
fileOUT |
PNG output file |
myoptions |
CVD from "Protanope","Deuteranope" or "Tritanope" |
amount |
level from 0.0 to 1.0 for "Achromat" |
Value
none
Author(s)
Jose Gama
References
Michael Deal Daltonize.org http://mudcu.be/labs/Color/Vision http://www.daltonize.org/p/about.html "Analysis of Color Blindness" by Onur Fidaner, Poliang Lin and Nevran Ozguven. "Digital Video Colourmaps for Checking the Legibility of Displays by Dichromats" by Francoise Vienot, Hans Brettel and John D. Mollon http://vision.psychol.cam.ac.uk/jdmollon/papers/colourmaps.pdf
Examples
# a "perfect" score
## Not run:
fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='')
Color.Vision.Simulate(fname, 'fruits.Simulate.Protanope.png','Protanope')
Color.Vision.Simulate(fname, 'fruits.Simulate.Deuteranope.png','Deuteranope')
Color.Vision.Simulate(fname, 'fruits.Simulate.Tritanope.png','Tritanope')
## End(Not run)
Scoring the results of the "D-15", "D-15DS" or "FM1OO-Hue" tests
Description
Color.Vision.VingrysAndKingSmith
takes a vector with cap numbers from the "D-15", "D-15DS" or "FM1OO-Hue" tests and outputs the score by the method from Vingrys and King-Smith.
Usage
Color.Vision.VingrysAndKingSmith(capnumbers=NULL,testType='D-15',silent=TRUE)
Arguments
capnumbers |
vector with cap numbers |
testType |
test type, one of "D-15", "D-15DS" or "FM1OO-Hue" |
silent |
logical, if TRUE then the function will send output to the screen, similarly to the original version |
Value
Angle |
confusion angle which identifies the type of color defect |
MajRad |
major moment of inertia |
MinRad |
minor moment of inertia |
TotErr |
error score or estimate of the severity of color defect |
Sindex |
Selectivity-Index which quantifies the amount of polarity or lack of randomness in a cap arrangement |
Cindex |
Confusion-Index which quantifies the degree of color loss relative to a perfect arrangement of caps |
Author(s)
Jose Gama
References
Vingrys, A.J. and King-Smith, P.E. (1988). A quantitative scoring technique for panel tests of color vision. Investigative Ophthalmology and Visual Science, 29, 50-63.
Examples
Color.Vision.VingrysAndKingSmith(1:15,silent=FALSE)
#result from the original GW Basic version:
#SUMS OF U AND V 41.25999 -4.92
# ANGLE MAJ RAD MIN RAD TOT ERR S-INDEX C-INDEX
# 61.98 9.23 6.71 11.42 1.38 1.00
Color.Vision.VingrysAndKingSmith(1:15,'D-15DS',silent=FALSE)
#result from the original GW Basic version:
#SUMS OF U AND V 26.86001 -38.69
# ANGLE MAJ RAD MIN RAD TOT ERR S-INDEX C-INDEX
# 61.44 5.12 3.60 6.26 1.42 1.00
Color.Vision.VingrysAndKingSmith(1:85, 'FM1OO-Hue',silent=FALSE)
#result from the original GW Basic version:
#SUMS OF U AND V 423.7896 203.7294
# ANGLE MAJ RAD MIN RAD TOT ERR S-INDEX C-INDEX
# 54.15 2.53 1.97 3.20 1.28 1.00
Decolorize an image using the c2g algorithm
Description
Color.Vision.c2g
decolorizes an image using the c2g algorithm from Martin Faust (2008).
RGBtoHSL
converts from RGB to HSL, used by Color.Vision.c2g
Usage
Color.Vision.c2g(fileIN=NULL, fileOUT=NULL, CorrectBrightness=FALSE)
Arguments
fileIN |
PNG input file |
fileOUT |
PNG output file |
CorrectBrightness |
automatic brightness correction |
Value
none
Author(s)
Jose Gama
References
Martin Faust 2008 http://www.e56.de/c2g.php
Examples
## Not run:
fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='')
Color.Vision.c2g(fname, 'fruits.c2g.png')
## End(Not run)
Quantitatively analyzes of D15 color panel tests
Description
D15Foutch
Calculates angle, magnitude and scatter for VK-S 88 and VK-S 93 (Vingrys, A.J. and King-Smith, P.E. (1988, 1993)), LSA 05 (Foutch/Bassi '05), and JMO 11 (Foutch/Stringham/Vengu '11).
Usage
D15Foutch(userD15values=NULL, testType = 'D-15', dataVKS = NA)
Arguments
userD15values |
position values chosen by tester |
testType |
the CVD test to be scored: "D-15", "D-15DS", "Roth28-Hue" or "FM1OO-Hue" |
dataVKS |
by default, the original 1976 CIE Luv data from Vingrys and King-Smith |
Value
outmat |
data.frame with columns "angle", "magnitude" and "scatter" and rows "LSA05","JMO11","VKS88","VKS93" |
Author(s)
Brian K. Foutch
References
A new quantitative technique for grading Farnsworth D-15 color panel tests Foutch, Brian K.; Stringham, James M.; Lakshminarayanan, Vasuvedan Journal of Modern Optics, vol. 58, issue 19-20, pp. 1755-1763
Evaluation of the new web-based" Colour Assessment and Diagnosis" test J Seshadri, J Christensen, V Lakshminarayanan, CJ BASSI Optometry & Vision Science 82 (10), 882-885
Vingrys, A.J. and King-Smith, P.E. (1988). A quantitative scoring technique for panel tests of color vision. Investigative Ophthalmology and Visual Science, 29, 50-63.
Examples
# 2 examples from VK-S
## Not run:
D15Foutch(userD15values=c(1:7,9,8,10:15))
D15Foutch(userD15values=c(1:7,9,8,10:13,15,14))
## End(Not run)
Farnsworth D-15 cap colors
Description
FarnsworthD15
contains the cap colors for the D-15 tests, in CIELab and RGB from Farnsworth D (1947)
The Farnsworth Dichotomous test (D-15) is a short test for detecting congenital color vision deficiencies.
Usage
FarnsworthD15
Format
This data frame contains the following columns:
- CapNo
Cap Number
- Munsell
Munsell color
- x.C
CIE x cap color
- y.C
CIE y cap color
- R
R channel cap color
- G
G channel cap color
- B
B channel cap color
Author(s)
Jose Gama
Source
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
References
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
Examples
data(FarnsworthD15)
FarnsworthD15
Farnsworth D-15 cap colors
Description
FarnsworthMunsell100Hue
contains the cap colors for the Farnsworth Munsell 100-Hue tests, in CIELab and RGB from Farnsworth D (1957)
The Farnsworth Munsell 100-Hue is a test for detecting congenital and acquired color vision deficiencies.
Usage
FarnsworthMunsell100Hue
Format
This data frame contains the following columns:
- CapNo
Cap Number
- Munsell
Munsell color
- x.C
CIE x cap color
- y.C
CIE y cap color
- R
R channel cap color
- G
G channel cap color
- B
B channel cap color
Author(s)
Jose Gama
Source
Farnsworth D: The Farnsworth-Munsell 100-Hue Test for the Examination of Color Discrimination Manual. Baltimore, Munsell Color Co., 1957, pp. 1-7.
References
Farnsworth D: The Farnsworth-Munsell 100-Hue Test for the Examination of Color Discrimination Manual. Baltimore, Munsell Color Co., 1957, pp. 1-7.
Examples
data(FarnsworthMunsell100Hue)
FarnsworthMunsell100Hue
Table of color distance scores for quantitative scoring of the Lanthony desaturate D-15s test
Description
GellerTCDS
contains the color distance scores for quantitative scoring of the Lanthony desaturate D-15s test, from Geller AM. (2001).
The Lanthony desaturate test (D-15s) is a short test for detecting acquired color vision deficiencies. Geller AM (2001) created a table based on the Commission Internationale de l'Eclairage (International Commission on Illumination, CIE) Space and Color Difference formula, CIE 1976 (L*a*b*) with perceptual distances between pairs of caps. The table is used for the calculation of the Total Color Distance Score (TCDS) which is the sum of the CIELAB space distances between colored caps.
Usage
GellerTCDS
Format
This data frame contains the following columns:
- Pilot
Distances between colored caps for the pilot cap
- Cap1
Distances between colored caps for the 1st cap
- Cap2
Distances between colored caps for the 2nd cap
- Cap3
Distances between colored caps for the 3rd cap
- Cap4
Distances between colored caps for the 4th cap
- Cap5
Distances between colored caps for the 5th cap
- Cap6
Distances between colored caps for the 6th cap
- Cap7
Distances between colored caps for the 7th cap
- Cap8
Distances between colored caps for the 8th cap
- Cap9
Distances between colored caps for the 9th cap
- Cap10
Distances between colored caps for the 10th cap
- Cap11
Distances between colored caps for the 11th cap
- Cap12
Distances between colored caps for the 12th cap
- Cap13
Distances between colored caps for the 13th cap
- Cap14
Distances between colored caps for the 14th cap
- Cap15
Distances between colored caps for the 15th cap
Author(s)
Jose Gama
Source
Geller AM. A table of color distance scores for quantitative scoring of the Lanthony desaturate color vision test. Neurotoxicol Teratol 2001; 23: 265-267.
References
Geller AM. A table of color distance scores for quantitative scoring of the Lanthony desaturate color vision test. Neurotoxicol Teratol 2001; 23: 265-267.
Examples
data(GellerTCDS)
GellerTCDS
Farnsworth H-16 cap colors
Description
H16
contains the cap colors for the Farnsworth H-16 test, in Yxy coordinates.
The Farnsworth H-16 is a short test for detecting congenital color vision deficiencies.
Usage
H16
Format
This data frame contains the following columns:
- CapNo
Cap Number
- x.C
CIE x cap color
- y.C
CIE y cap color
- Munsell
Munsell color
- ProductionNo
Munsell Production Number
Author(s)
Jose Gama
Source
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
References
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
Examples
data(H16)
H16
Farnsworth H-16 cap colors
Description
LanthonyD15
contains the cap colors for Lanthony D-15 test, in Yxy coordinates.
The Lanthony D-15 (desaturated D-15) is a short test for detecting congenital color vision deficiencies.
Usage
LanthonyD15
Format
This data frame contains the following columns:
- CapNo
Cap Number
- Munsell
Munsell color
- x.C
CIE x cap color
- y.C
CIE y cap color
- R
R channel cap color
- G
G channel cap color
- B
B channel cap color
Author(s)
Jose Gama
Source
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
References
Judd, D.B. and MacAdam, D.L., 1979 Contributions to Color Science University of Rochester. Institute of Optics and Center for Building Technology Department of Commerce, National Bureau of Standards
Examples
data(LanthonyD15)
LanthonyD15
Roth-28 cap colors
Description
Roth28
contains the cap colors for the Roth-28 tests, in CIELab and RGB from Roth A (1966)
The Roth-28 is a short test for detecting congenital color vision deficiencies.
Usage
Roth28
Format
This data frame contains the following columns:
- CIEL
CIELab L channel cap color
- CIEa
CIELab a channel cap color
- CIEb
CIELab b channel cap color
- R
R channel cap color
- G
G channel cap color
- B
B channel cap color
Author(s)
Jose Gama
Source
Roth A. Test-28 hue de Roth selon Farnsworth–Munsell (Manual). Paris: Luneau, 1966.
References
Roth A. Test-28 hue de Roth selon Farnsworth–Munsell (Manual). Paris: Luneau, 1966.
Examples
data(Roth28)
Roth28
Graphical score for the D-15 tests
Description
VKSgraphic
computes a graphical score based on
the Vingrys and King-Smith method (VKS) for the D-15 test or similar tests.
VKSvariantGraphic
shows the angles with double their value,
for a continuous display of the confusion axis.
Usage
VKSgraphic(VKSdata, xLimit=5, yLimit=4, VKStitle='', VKSxlabel='',
VKSylabel='')
Arguments
VKSdata |
data.frame with color vision deficiency name, VKS angle and VKS index |
xLimit |
X-axis boundaries |
yLimit |
Y-axis boundaries |
VKStitle |
title for the plot |
VKSxlabel |
text for the x label |
VKSylabel |
text for the y label |
Value
none
Author(s)
Jose Gama
Source
VKSvariantGraphic - original idea by David Bimler Atchison DA, Bowman KJ, Vingrys AJ Quantitave scoring methods for D15 panel tests in the diagnosis of congenital colour-vision deficiencies. Optometry and Vision Science 1991, 68:41-48.
References
Atchison DA, Bowman KJ, Vingrys AJ Quantitave scoring methods for D15 panel tests in the diagnosis of congenital colour-vision deficiencies. Optometry and Vision Science 1991, 68:41-48.
Examples
# Creating similar graphics to "A Quantitative Scoring Technique For Panel
#Tests of Color Vision" Algis J. Vingrys and P. Ewen King-Smith
## Not run:
VKSdata<-VKStable2[,c(1,3:5)]
VKSdata[1,1]<-'Normal no error'
VKSdata[2:9,1]<-'Normal'
VKSdata[10:13,1]<-'Acquired CVD'
# the graphics are similar but not identical because the data used in the
#plots is the average of the values instead of all the values
VKSgraphic(VKSdata[,1:3],5,4,'D-15 angle vs C-index (Average)','Angle',
'C-index') # Fig. 6
VKSgraphic(VKSdata[,c(1,2,4)],5,4,'D-15 angle vs S-index (Average)','Angle',
'S-index') # Fig. 7
## End(Not run)
Table with results of D-15 tests scored with the Vingrys and King-Smith method
Description
VKStable2
contains tthe results of D-15 tests scored with the Vingrys and King-Smith method, from Vingrys and King-Smith (1988), table 2
Usage
VKStable2
Format
This data frame contains the following columns:
- typeCVD
Type of color vision
- sample
Number in sample
- Angle
Angle
- S.index
S-index
- C.index
C-index
- Major
Major radius
- Minor
Minor radius
- TES
TES
- TCDS
TCDS
Author(s)
Jose Gama
Source
Atchison DA, Bowman KJ, Vingrys AJ Quantitave scoring methods for D15 panel tests in the diagnosis of congenital colour-vision deficiencies. Optometry and Vision Science 1991, 68:41-48.
References
Atchison DA, Bowman KJ, Vingrys AJ Quantitave scoring methods for D15 panel tests in the diagnosis of congenital colour-vision deficiencies. Optometry and Vision Science 1991, 68:41-48.
Examples
data(VKStable2)
VKStable2
Approximation of the scotopic luminance
Description
XYZ2scotopic.Rawtran
approximates the scotopic luminance from XYZ values, illuminant D65, from Filip Hroch (1998).
Used in the astronomy software Rawtran.
XYZ2scotopic.Rawtran.array
idem, however the data type used is array.
Usage
XYZ2scotopic.Rawtran(XYZmatrix)
Arguments
XYZmatrix |
matrix (or array) with XYZ values |
Value
Matrix (or array) with approximated scotopic luminance.
Author(s)
Jose Gama
Source
Filip Hroch, 1998, Computer Programs for CCD Photometry, 20th Stellar Conference of the Czech and Slovak Astronomical Institutes, DusekJ., http://adsabs.harvard.edu/abs/1998stel.conf...30H Rawtran - integral.physics.muni.cz Masaryk University http://integral.physics.muni.cz/rawtran/
References
Filip Hroch, 1998, Computer Programs for CCD Photometry, 20th Stellar Conference of the Czech and Slovak Astronomical Institutes, DusekJ., http://adsabs.harvard.edu/abs/1998stel.conf...30H Rawtran - integral.physics.muni.cz Masaryk University http://integral.physics.muni.cz/rawtran/
Approximation of the scotopic luminance
Description
approx.scotopic.luminance.LarsonEtAl.RGB
approximates the scotopic luminance from RGB values.
approx.scotopic.luminance.LarsonEtAl.XYZ
approximates the scotopic luminance from XYZ values.
Usage
approx.scotopic.luminance.LarsonEtAl.XYZ(XYZmatrix)
approx.scotopic.luminance.LarsonEtAl.RGB(RGBmatrix)
Arguments
XYZmatrix |
matrix with XYZ values |
RGBmatrix |
matrix with RGB values |
Value
approximated scotopic luminance
Author(s)
Jose Gama
Source
Larson, G. W., H. Rushmeier, and C. Piatko (1997, October - December). A visibility matching tone reproduction operator for high dynamic range scenes. IEEE Transactions on Visualization and Computer Graphics 3 (4), 291–306.
References
Larson, G. W., H. Rushmeier, and C. Piatko (1997, October - December). A visibility matching tone reproduction operator for high dynamic range scenes. IEEE Transactions on Visualization and Computer Graphics 3 (4), 291–306.
Examples
## Not run:
samplePics <- c('fruits', 'pastel_color', 'sample1', 'TurnColorsGrayImage1', 'TurnColorsGrayImage2')
for (pics in samplePics)
{
fname<-paste(system.file(package='CVD'),'/extdata/',pics,'.png',sep='')
imgTest<-loadPNG(fname)
imgTest.array<-approx.scotopic.luminance.LarsonEtAl.RGB.array(imgTest)
png::writePNG(imgTest.array, paste(pics, '.approx.scotopic.luminance.LarsonEtAl.RGB.png',sep=''))
}
## End(Not run)
Attenuation as a function of number of eyes
Description
attenuationNumberOfEyes
computes the attenuation as a function M(e) of number of eyes e (1 or 2), from Watson A. B., Yellott J. I. (2012).
Usage
attenuationNumberOfEyes(e)
Arguments
e |
number of eyes (1 or 2) |
Value
PupilSize |
attenuation |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6.
Examples
## Not run:
attenuationNumberOfEyes(1)
attenuationNumberOfEyes(2)
## End(Not run)
Generate points from a circle
Description
calculateCircle
generates points from a circle
with many options, equally spaced, randomly spaced, with noise added
to the radius or limited to a segment of angle alpha.
Usage
calculateCircle(x, y, r, steps=50,sector=c(0,360),randomDist=FALSE,
randomFun=runif,...)
Arguments
x |
center point x |
y |
center point y |
r |
radius |
steps |
number of points |
sector |
limited circular sector |
randomDist |
logical, TRUE = randomly spaced |
randomFun |
random function |
... |
optiomal parameters to pass to randomFun |
Value
points |
array n x 2 of point coordinates. |
Author(s)
Jose Gama
Examples
## Not run:
# 100 points from a circle at c(0,0) with radius=200
a<-calculateCircle(0,0,200,100)
plot(a[,1],a[,2],xlim=c(-200,200),ylim=c(-200,200))
par(new=TRUE)
# 12 points from a circle at c(0,0) with radius=190, points between 0 and 90
# degrees
a<-calculateCircle(0,0,190,12,c(0,90))
plot(a[,1],a[,2],xlim=c(-200,200),ylim=c(-200,200),col='red')
par(new=TRUE)
# 12 points from a circle at c(0,0) with radius=180, points between 0 and 180
# degrees, uniform random distribution
a<-calculateCircle(0,0,180,12,c(0,180),TRUE)
plot(a[,1],a[,2],xlim=c(-200,200),ylim=c(-200,200),col='green')
par(new=TRUE)
# 12 points from a circle at c(0,0) with radius=170, points between 0 and 180
# degrees, normal random distribution
a<-calculateCircle(0,0,170,12,c(0,180),TRUE,rnorm)
plot(a[,1],a[,2],xlim=c(-200,200),ylim=c(-200,200),col='blue')
## End(Not run)
total error score (TES) using Farnsworth's or Kinnear's method
Description
calculateTES
computes the total error score (TES) using Farnsworth's or Kinnear's method for the FM-100, D-15, Roth-28 and so forth. The input is a vector of cap positions.
Usage
calculateTES(fmData, Kinnear=FALSE)
Arguments
fmData |
vector of cap positions |
Kinnear |
position values chosen by tester |
Value
TCDS |
Total Color Difference Score (TCDS) |
Author(s)
Jose Gama
References
Farnsworth D. The Farnsworth-Munsell 100-Hue Test. Baltimore: Munsell Color Company, 1957.
Examples
# a "perfect" score
## Not run:
calculateTES(userD15values=1:15)
## End(Not run)
Creates PNG files to be used as colored caps (buttons)
Description
createPNGbuttons
creates PNG files from a data.frame with RGB values.
Usage
createPNGbuttons(capsData = get("FarnsworthD15", envir = environment()),
imgLength = 44, imgWidth = 78)
Arguments
capsData |
Input file name. |
imgLength |
Input file name. |
imgWidth |
Input file name. |
Value
png file object.
Author(s)
Jose Gama
Examples
## Not run:
createPNGbuttons(data.frame(R=0,G=0,B=0))
data(FarnsworthD15)
createPNGbuttons(FarnsworthD15)
## End(Not run)
Decolorize algorithm from Mark Grundland and Neil A. Dodgson
Description
decolorize
converts a color image to contrast enhanced greyscale algorithm from Mark Grundland and Neil A. Dodgson. The input is an array of RGB values and the output is an array with the greyscale values.
decolorizeFile
sends the output to a file instead of returning an array
Usage
decolorize(fileIN=NULL,effect=0.5,scale=NULL,noise=0.001,recolor=FALSE)
Arguments
fileIN |
PNG file |
effect |
how much the picture's achromatic content should be altered to accommodate the chromatic contrasts |
scale |
in pixels is the typical size of relevant color contrast features |
noise |
noise quantile indicates the amount of noise in the picture enabling the dynamic range of the tones to be appropriately scaled |
recolor |
return also the chromatic content of the picture |
Value
colorArray |
array of RGB colors converted to contrast enhanced greyscale. |
Author(s)
Jose Gama
References
Mark Grundland and Neil A. Dodgson, "Decolorize: Fast, Contrast Enhancing, Color to Grayscale Conversion", Pattern Recognition, vol. 40, no. 11, pp. 2891-2896, (2007). http://www.Eyemaginary.com/Portfolio/Publications.html
Examples
## Not run:
samplePics <- c('fruits', 'pastel_color', 'sample1', 'TurnColorsGrayImage1', 'TurnColorsGrayImage2')
for (pics in samplePics)
{
fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='')
g1<-decolorize(fname)
png::writePNG(g1$tones, paste(pics, '.decolorize.png',sep=''))
}
## End(Not run)
Copunctal points derived by Smith and Pokorny (1975)
Description
dichromaticCopunctalPoint
contains the copunctal points derived by Smith and Pokorny (1975)
Usage
dichromaticCopunctalPoint
Format
This data frame contains the following columns:
- P
copunctal points - protanope
- D
copunctal points - deuteranope
- T
copunctal points - tritanope
Author(s)
Jose Gama
Source
Smith, V. C. & Pokorny, J. Spectral sensitivity of the foveal cone photopigments between 400 and 500 nm. Vision Research, 15, 1975. 161-171.
References
Smith, V. C. & Pokorny, J. Spectral sensitivity of the foveal cone photopigments between 400 and 500 nm. Vision Research, 15, 1975. 161-171.
Examples
data(dichromaticCopunctalPoint)
dichromaticCopunctalPoint
Effective Corneal Flux Density
Description
effectiveCornealFluxDensity
computes the effective
Corneal Flux Density = product of luminance, area, and the monocular
effect, F = Lae, from Watson A. B., Yellott J. I. (2012).
Usage
effectiveCornealFluxDensity(L=NULL,a=NULL,e=NULL)
Arguments
L |
luminance in cd m^-2 |
a |
field area in deg^2 |
e |
number of eyes (1 or 2) |
Value
PupilSize |
effective Corneal Flux Density |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16.
Examples
# effective Corneal Flux Density, luminance in cd m^-2 = 1, field area in
# deg^2 = 30, number of eyes = 2
## Not run: effectiveCornealFluxDensity(1,30^2,2)
Effective area of the illuminated pupil
Description
effectivePupilArea
computes the effective area of the illuminated pupil from its diameter.
Usage
effectivePupilArea(d)
Arguments
d |
diameter in mm |
Value
PupilSize |
Pupil effective area in mm^2 |
Author(s)
Jose Gama
References
#Smith, VC, Pokorny, J, and Yeh, T: The Farnsworth-Munsell 100-hue test in cone excitation space. Documenta Ophthalmologica Proceedings Series 56:281-291, 1993.
Examples
# Pupil area in mm^2 for diameter = 2 mm
## Not run: effectivePupilArea(2)
Example of cap arrangements for the D-15d test, Simple/Extreme Anomalous Trichromacy
Description
example1Lanthony1978
contains an example of cap arrangements for the D-15d test, Simple/Extreme Anomalous Trichromacy, from Lanthony (1978)
Usage
example1Lanthony1978
Format
This data frame contains the following columns:
- SimpleAnomalousTrichromacyD15
example cap arrangements D15 - Simple Anomalous Trichromacy
- SimpleAnomalousTrichromacyD15d
example cap arrangements D15d - Simple Anomalous Trichromacy
- ExtremeAnomalousTrichromacyD15
example cap arrangements D15 - Extreme Anomalous Trichromacy
- ExtremeAnomalousTrichromacyD15d
example cap arrangements D15d - Extreme Anomalous Trichromacy
Author(s)
Jose Gama
Source
The Desaturated Panel D-15 P. Lanthony Documenta Ophthalmologica 46,1: 185-189, 1978
References
The Desaturated Panel D-15 P. Lanthony Documenta Ophthalmologica 46,1: 185-189, 1978
Examples
data(example1Lanthony1978)
example1Lanthony1978
Example of cap arrangements for the D-15d test, Central Serous Choroidopathy/Optic Neuritis/Autosomal Dominant OpticAtrophy
Description
example2Lanthony1978
contains an example of cap arrangements for the D-15d test, Central Serous Choroidopathy/Optic Neuritis/Autosomal Dominant OpticAtrophy, from Lanthony (1978)
Usage
example2Lanthony1978
Format
This data frame contains the following columns:
- CentralSerousChoroidopathyD15
example cap arrangements D15 - Central Serous Choroidopathy
- CentralSerousChoroidopathyD15d
example cap arrangements D15d - Central Serous Choroidopathy
- OpticNeuritisD15
example cap arrangements D15 - Optic Neuritis
- OpticNeuritisD15d
example cap arrangements D15d - Optic Neuritis
- AutosomalDominantOpticAtrophyD15
example cap arrangements D15 - Autosomal Dominant OpticAtrophy
- AutosomalDominantOpticAtrophyD15d
example cap arrangements D15d - Autosomal Dominant OpticAtrophy
Author(s)
Jose Gama
Source
THE DESATURATED PANEL D-15 P. LANTHONY Documenta Ophthalmologica 46,1: 185-189, 1978
References
THE DESATURATED PANEL D-15 P. LANTHONY Documenta Ophthalmologica 46,1: 185-189, 1978
Examples
data(example2Lanthony1978)
example2Lanthony1978
Example of cap arrangements for the D-15d test
Description
exampleBowman1982
contains an example of cap arrangements for the D-15d test, from Bowman (1982)
Usage
exampleBowman1982
Format
This data frame contains the following columns:
- A
example cap arrangements A
- B
example cap arrangements B
- C
example cap arrangements C
- D
example cap arrangements D
- E
example cap arrangements E
- F
example cap arrangements F
Author(s)
Jose Gama
Source
A Method For Quantitative Scoring Of The Farnsworth Panel D-15 K.J. Bowman 1982
References
A Method For Quantitative Scoring Of The Farnsworth Panel D-15 K.J. Bowman 1982
Examples
data(exampleBowman1982)
exampleBowman1982
Example of cap arrangements for the FM-100 test
Description
exampleFM100
contains an example of cap arrangements for the FM-100, from Hidayat (2008)
Usage
exampleFM100
Format
This table contains one example of cap arrangements for the FM-100
Author(s)
Jose Gama
Source
proceedings of the New Zealand Generating fast automated reports for the Farnsworth-Munsell 100-hue colour vision test Ray Hidayat, Computer Science Research Student Conference 2008
References
proceedings of the New Zealand Generating fast automated reports for the Farnsworth-Munsell 100-hue colour vision test Ray Hidayat, Computer Science Research Student Conference 2008
Examples
data(exampleFM100)
exampleFM100
Example of cap arrangements for the D-15 test, deuteranope/protanope/tritanope
Description
exampleFarnsworth1974
contains an example of cap arrangements for the D-15 test, deuteranope/protanope/tritanope, from Farnsworth (1974)
Usage
exampleFarnsworth1974
Format
This data frame contains the following columns:
- deuteranope
example cap arrangements D15 - deuteranope
- protanope
example cap arrangements D15 - protanope
- tritanope
example cap arrangements D15 - tritanope
Author(s)
Jose Gama
Source
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness. Panel D-15. New York, Psychological Testing, 1974
References
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness. Panel D-15. New York, Psychological Testing, 1974
Examples
data(exampleFarnsworth1974)
exampleFarnsworth1974
Example of cap arrangements for the D-15 test, protanope/deuteranope/monochromat
Description
exampleNRC1981
contains an example of cap arrangements for the D-15d test, protanope/deuteranope/monochromat, from National Research Council (1981)
Usage
exampleNRC1981
Format
This data frame contains the following columns:
- protanope
example cap arrangements D15 - protanope
- deuteranope
example cap arrangements D15 - deuteranope
- monochromat
example cap arrangements D15 - monochromat
Author(s)
Jose Gama
Source
Procedures for Testing Color Vision: Report of Working Group 41, 1981, Committee on Vision, National Research Council, pp. 107
References
Procedures for Testing Color Vision: Report of Working Group 41, 1981, Committee on Vision, National Research Council, pp. 107
Examples
data(exampleNRC1981)
exampleNRC1981
Example of cap arrangements for the D-15 test, rodMonochromat/blueConeMonochromat
Description
exampleSimunovic2004
contains an example of cap arrangements for the D-15d test, rodMonochromat/blueConeMonochromat, from Lanthony (1978)
Usage
exampleSimunovic2004
Format
This data frame contains the following columns:
- rodMonochromat
example cap arrangements D15 - rodMonochromat
- blueConeMonochromat
example cap arrangements D15 - blueConeMonochromat
Author(s)
Jose Gama
Source
Cone dystrophies Part 2 Cone dysfunction syndromes, Matthew P Simunovic
References
Cone dystrophies Part 2 Cone dysfunction syndromes, Matthew P Simunovic
Examples
data(exampleSimunovic2004)
exampleSimunovic2004
Greyscale algorithms
Description
Common algorithms to convert color images to greyscale. The input is an array of RGB values and the output is an array with the greyscale values.
greyscale.avg
Greyscale algorithm, convert to average RGB values.
greyscale.Y
Greyscale algorithm YIQ/NTSC - RGB colors in a gamma 2.2 color space.
greyscale.linear
Greyscale algorithm linear RGB colors
greyscale.RMY
Greyscale algorithm RMY
greyscale.BT709
Greyscale algorithm BT709
greyscale.luminosity
Greyscale algorithm using luminosity
Usage
greyscale.avg(colorArray)
Arguments
colorArray |
array of RGB colors. |
Value
colorArray |
array of RGB colors converted to greyscale. |
Author(s)
Jose Gama
Examples
## Not run:
samplePics <- c('fruits', 'pastel_color', 'sample1', 'TurnColorsGrayImage1', 'TurnColorsGrayImage2')
for (pics in samplePics)
{
fname<-paste(system.file(package='CVD'),'/extdata/',pics,'.png',sep='')
imgTest<-loadPNG(fname)
g1<-greyscale.avg(imgTest)
png::writePNG(g1, paste(pics, '.greyscale.avg.png',sep=''))
}
imgTest<-loadPNG(fname)
g1<-greyscale.avg(imgTest)
png::writePNG(g1, paste(pics, '.greyscale.avg.png',sep=''))
g1<-greyscale.BT709(imgTest)
png::writePNG(g1, paste(pics, '.BT709.png',sep=''))
g1<-greyscale.Linear(imgTest)
png::writePNG(g1, paste(pics, '.Linear.png',sep=''))
g1<-greyscale.Luminosity(imgTest)
png::writePNG(g1, paste(pics, '.Luminosity.png',sep=''))
g1<-greyscale.RMY(imgTest)
png::writePNG(g1, paste(pics, '.RMY.png',sep=''))
g1<-greyscale.Y(imgTest)
png::writePNG(g1, paste(pics, '.Y.png',sep=''))
## End(Not run)
Convert from luminance to troland and effective troland
Description
illuminance2troland
convert from illuminance (lux) to conventional retinal illuminance (troland) and effective troland (trolands per effective area).
luminance2troland
convert from luminance (cd/m^2) to troland and effective troland.
Usage
luminance2troland(Lv, d=NA)
illuminance2troland(Ev, lumFactor, d=NA)
Arguments
d |
diameter in mm |
Lv |
luminance (cd/m^2) |
Ev |
illuminance (lux) |
lumFactor |
luminance factor |
Value
troland |
conventional retinal illuminance (troland) |
effectivetroland |
effective troland (trolands per effective area) |
Author(s)
Jose Gama
References
#Smith, VC, Pokorny, J, and Yeh, T: The Farnsworth-Munsell 100-hue test in cone excitation space. Documenta Ophthalmologica Proceedings Series 56:281-291, 1993.
Examples
# Pupil area in mm^2 for diameter = 2 mm
## Not run: illuminance2troland(2)
Automatic interpretation of test scores
Description
interpretation.VingrysAndKingSmith
and interpretation.Foutch
perform an interpretation of the test results based on the classification ranges from the authors of the tests.
Usage
interpretation.VingrysAndKingSmith(VKS,optMethod=88)
Arguments
VKS |
data to be interpreted |
optMethod |
CVD test method |
Value
TCDS |
Total Color Difference Score (TCDS) |
Author(s)
Jose Gama
References
Vingrys, A.J. and King-Smith, P.E. (1988). A quantitative scoring technique for panel tests of color vision. Investigative Ophthalmology and Visual Science, 29, 50-63.
A new quantitative technique for grading Farnsworth D-15 color panel tests Foutch, Brian K.; Stringham, James M.; Lakshminarayanan, Vasuvedan Journal of Modern Optics, vol. 58, issue 19-20, pp. 1755-1763
Evaluation of the new web-based" Colour Assessment and Diagnosis" test J Seshadri, J Christensen, V Lakshminarayanan, CJ BASSI Optometry & Vision Science 82 (10), 882-885
Examples
# a "perfect" score
## Not run:
interpretation.VingrysAndKingSmith(D15Foutch(1:15))
## End(Not run)
pupil diameter ranges from Barten, L. (1999)
Description
lightAdaptedPupilSize.Barten
computes the pupil diameter ranges from Barten, L. (1999).
Usage
lightAdaptedPupilSize.Barten(L=NULL, a=NULL)
Arguments
L |
luminance in cd m^-2 |
a |
area in deg^2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Barten, P. G. J. (1999). Contrast sensitivity of the human eye and its effects on image quality. Bellingham, WA: SPIE Optical Engineering Press.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees
## Not run: lightAdaptedPupilSize.Barten(1,30^2)
pupil diameter ranges from Blackie, C. A., & Howland, H. C. (1999)
Description
lightAdaptedPupilSize.BlackieAndHowland
computes the pupil diameter ranges from Blackie, C. A., & Howland, H. C., (1999).
Usage
lightAdaptedPupilSize.BlackieAndHowland(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Blackie, C. A., & Howland, H. C. (1999). An extension of an accommodation and convergence model of emmetropization to include the effects of illumination intensity. Ophthalmic and Physiological Optics, 19(2), 112–125.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.BlackieAndHowland(1)
pupil diameter ranges from Crawford, L. (1936)
Description
lightAdaptedPupilSize.Crawford
computes the pupil diameter ranges from Crawford, L. (1936).
Usage
lightAdaptedPupilSize.Crawford(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Crawford, B. H. (1936). The dependence of pupil size upon external light stimulus under static and variable conditions. Proceedings of the Royal Society of London, Series B, Biological Sciences, 121(823), 376–395.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.Crawford(1)
pupil diameter ranges from DeGrootAndGebhard, L. (1952)
Description
lightAdaptedPupilSize.DeGrootAndGebhard
computes the pupil diameter ranges from DeGrootAndGebhard, L. (1952).
Usage
lightAdaptedPupilSize.DeGrootAndGebhard(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. De Groot, S. G., & Gebhard, J. W. (1952). Pupil size as determined by adapting luminance. Journal of the Optical Society of America A, 42(7), 492–495.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.DeGrootAndGebhard(1)
pupil diameter ranges from Holladay, L. (1926)
Description
lightAdaptedPupilSize.Holladay
computes the pupil diameter ranges from Holladay, L. (1926).
Usage
lightAdaptedPupilSize.Holladay(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Holladay, L. (1926). The fundamentals of glare and visibility. Journal of the Optical Society of America, 12(4), 271–319.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.Holladay(1)
pupil diameter ranges from Le Grand (1992)
Description
lightAdaptedPupilSize.LeGrand
computes the pupil diameter ranges from Le Grand (1992).
Usage
lightAdaptedPupilSize.LeGrand(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Vision, Pierre A. Buser, Michel Imbert, MIT Press, 1992
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.LeGrand(1)
pupil diameter ranges from MoonAndSpencer, L. (1944)
Description
lightAdaptedPupilSize.MoonAndSpencer
computes the pupil diameter ranges from MoonAndSpencer, L. (1944).
Usage
lightAdaptedPupilSize.MoonAndSpencer(L=NULL)
Arguments
L |
luminance in cd m^-2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Moon, P., & Spencer, D. E. (1944). On the Stiles-Crawford effect. Journal of the Optical Society of America, 34(6), 319–329, http://www.opticsinfobase. org/abstract.cfm?URI1⁄4josa-34-6-319.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2
## Not run: lightAdaptedPupilSize.MoonAndSpencer(1)
pupil diameter ranges from StanleyAndDavies, L. (1995)
Description
lightAdaptedPupilSize.StanleyAndDavies
computes the pupil diameter ranges from StanleyAndDavies, L. (1995).
Usage
lightAdaptedPupilSize.StanleyAndDavies(L=NULL, a=NULL)
Arguments
L |
luminance in cd m^-2 |
a |
area in deg^2 |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Stanley, P. A., & Davies, A. K. (1995). The effect of field of view size on steady-state pupil diameter. Ophthalmic & Physiological Optics, 15(6), 601–603.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees
## Not run: lightAdaptedPupilSize.StanleyAndDavies(1,30^2)
pupil diameter ranges from Watson A. B., Yellott J. I. (2012)
Description
lightAdaptedPupilSize.WatsonAndYellott
computes the pupil
diameter ranges from Watson A. B., Yellott J. I. (2012).
Usage
lightAdaptedPupilSize.WatsonAndYellott(L=NULL, a=NULL, y=NULL, y0=NULL, e=NULL)
Arguments
L |
luminance in cd m^-2 |
a |
area in deg^2 |
y |
age in years |
y0 |
reference age |
e |
number of eyes (1 or 2) |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://www.ncbi.nlm.nih.gov/pubmed/23012448
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees,
# age=45, estimated reference age = 28.58, eyes = 2
## Not run: lightAdaptedPupilSize.WatsonAndYellott(1,30^2,45,28.58,2)
pupil diameter ranges from Winn et al (1995)
Description
lightAdaptedPupilSize.WinnEtAl
computes the pupil diameter ranges from Winn et al (1995).
Usage
lightAdaptedPupilSize.WinnEtAl(L=NULL, y=NULL)
Arguments
L |
luminance in cd m^-2 |
y |
age in years |
Value
PupilSize |
Pupil size in mm |
Author(s)
Jose Gama
References
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16. http://journalofvision.org/12/10/12/, doi:10.1167/5.9.6. Winn, B., Whitaker, D., Elliott, D. B., & Phillips, N. J. (1994). Factors affecting light-adapted pupil size in normal human subjects. Investigative Ophthalmology & Visual Science, 35(3):1132–1137, http://www.iovs.org/content/35/3/1132.
Examples
# Pupil diameter in mm for luminance = 1 cd m^-2, age = 45 years
## Not run: lightAdaptedPupilSize.WinnEtAl(1,45)
Internal CVD functions
Description
Ignore these.
Load a PNG file
Description
loadPNG
loads a PNG file and displays the image dimensions.
Usage
loadPNG(fileIN=NULL, silent=FALSE)
Arguments
fileIN |
Input file name. |
silent |
Logic, TRUE=do not display image dimensions. |
Value
png file object.
Author(s)
Jose Gama
Examples
## Not run:
loadPNG(paste(system.file(package='CVD'),'/inst/extdata/fruits.png',sep=''))
## End(Not run)
Neutral points for CIE 1976 uv, CIE 1931 xy and CIE 1960 uv
Description
neutralPoint
contains the neutral points for CIE 1976 uv, CIE 1931 xy and CIE 1960 uv
Usage
neutralPoint
Format
This data frame contains the following columns:
- CIE1931xy
neutral point CIE 1931 xy
- CIE1960uv
neutral point CIE 1976 uv
- CIE1960uv
neutral point CIE 1960 uv
Author(s)
Jose Gama
Examples
data(neutralPoint)
neutralPoint
Plot confusion vectors for CIE 1976 uv, CIE 1931 xy and CIE 1960 uv
Description
plotConfusionVectors
Plots the confusion vectors for
CIE 1976 uv, CIE 1931 xy and CIE 1960 uv.
Usage
plotConfusionVectors(colorSpace='CIE1931xy')
Arguments
colorSpace |
chosen colorSpace, default='CIE1931xy' |
Value
none
Author(s)
Jose Gama
Examples
# find duplicate values
## Not run: plotConfusionVectors()
Graphical score for the D-15 tests
Description
scoreD15Graphic
computes the graphical score for
the D-15 test or similar. The input is either a vector of RGB colors or cap positions.
Usage
scoreD15Graphic(userD15colors=NULL,userD15values=NULL, titleGraphic=
"Farnsworth dichotomous test (D-15) results", okD15colors=NULL)
Arguments
userD15colors |
RGB colors chosen by tester |
userD15values |
position values chosen by tester |
titleGraphic |
title for the graphic |
okD15colors |
vector with RGB colors in the correct sequence |
Value
none
Author(s)
Jose Gama
References
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
Examples
# a "perfect" score
## Not run: scoreD15Graphic(userD15values=1:15)
Total Color Difference Score (TCDS) for the D-15 tests
Description
scoreD15TCDS
computes the Total Color Difference Score
(TCDS) for the D-15 test, from Bowman's (1982). The input is either a vector
of RGB colors or cap positions.
Usage
scoreD15TCDS(userD15colors=NULL,userD15values=NULL,
distTable = get("BowmanTCDS", envir = environment()),
D15colors = get("FarnsworthD15", envir = environment()))
Arguments
userD15colors |
RGB colors chosen by tester |
userD15values |
position values chosen by tester |
distTable |
distance table - matrix with the color distances |
D15colors |
RGB colors for the CVD test |
Value
TCDS |
Total Color Difference Score (TCDS) |
Author(s)
Jose Gama
References
Bowman's (1982) Total Color Difference Score (TCDS) for congenitally defective observers on the D-15 with enlarged tests. K.J. Bowman, A method for quantitative scoring of the Farnsworth Panel D-15, Acta Ophthalmologica, 60 (1982), pp. 907–916
Examples
# a "perfect" score
## Not run:
scoreD15TCDS(userD15values=1:15)
## End(Not run)
Graphical score for the D-15 tests
Description
scoreFM100Graphic
computes the graphical score for the
FM-100 test or similar. The input is either a vector of RGB colors or cap positions.
Usage
scoreFM100Graphic(userFM100colors=NULL,userFM100values=NULL, titleGraphic=
"Farnsworth Munsell 100-Hue test results", okFM100colors=NULL, Kinnear=FALSE)
Arguments
userFM100colors |
RGB colors chosen by tester |
userFM100values |
position values chosen by tester |
titleGraphic |
title for the graphic |
okFM100colors |
vector with RGB colors in the correct sequence |
Kinnear |
logical, scoring method TRUE = Farnsworth, FALSE = Kinnear |
Value
none
Author(s)
Jose Gama
References
Dean Farnsworth, 1943 The Farnsworth Munsell 100-hue dichotomous tests for colour vision Journal of the Optical Society of America, 33 (1943), pp. 568–576
Examples
# an example score
## Not run:
FM100example<-exampleFM100
userFM100values=cbind(FM100example[1,], FM100example[4,-22],
FM100example[7,-22], FM100example[10,-22])
userFM100values=as.vector(unlist(userFM100values))
scoreFM100Graphic(userFM100values)
## End(Not run)
Graphical score for the D-15 tests
Description
scoreRoth28Graphic
computes the graphical score for the
Roth-28 test or similar. The input is either a vector of RGB colors or cap positions.
Usage
scoreRoth28Graphic(userR28colors=NULL,userR28values=NULL, titleGraphic=
"Roth-28 test results", okR28colors=NULL)
Arguments
userR28colors |
RGB colors chosen by tester |
userR28values |
position values chosen by tester |
titleGraphic |
title for the graphic |
okR28colors |
vector with RGB colors in the correct sequence |
Value
none
Author(s)
Jose Gama
References
Carl Erb, Martin Adler, Nicole Stübiger, Michael Wohlrab, Eberhart Zrenner, Hans-Jürgen Thiel, Colour vision in normal subjects tested by the colour arrangement test ‘Roth 28-hue desaturated’, Vision Research, Volume 38, Issue 21, November 1998, Pages 3467-3471, ISSN 0042-6989, http://dx.doi.org/10.1016/S0042-6989(97)00433-1.
Examples
# a "perfect" score
## Not run: scoreRoth28Graphic(userD15values=1:28)
Show missing and duplicated cap numbers
Description
showDuplicated
shows missing and duplicated cap numbers
from D-15, D15d, FM-100 and similar tests.
Usage
showDuplicated(cnum)
Arguments
cnum |
cap numbers |
Value
none
Author(s)
Jose Gama
Examples
# find duplicate values
## Not run: showDuplicated(1:15)
showDuplicated(c(1:4,8,5:14))
# this is an example of a typo in data from a publication
#Procedures for Testing Color Vision: Report of Working Group 41, 1981,
Committee on Vision, National Research Council, pp. 107
#the "monochromat" data has "16" instead of "6"
data(exampleNRC1981)
showDuplicated(exampleNRC1981[,3])
## End(Not run)
Typical cap arrangements for the D-15 tests
Description
typicalD15
contains typical cap arrangements for the D-15 tests, from Farnsworth D (1947), Simunovic (1998) and NRC (1981)
Usage
typicalD15
Format
This data frame contains the following columns:
- protanope
typical cap arrangements - protanope
- deuteranope
typical cap arrangements - deuteranope
- tritanope
typical cap arrangements - tritanope
- monochromat
typical cap arrangements - monochromat
- rodMonochromat
typical cap arrangements - rodMonochromat
- blueConeMonochromat
typical cap arrangements - blueConeMonochromat
Author(s)
Jose Gama
Source
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8. Simunovic MP, Moore AT. The cone dystrophies. Eye 1998;12:553–65. National Research Council (US). Committee on Vision. Procedures for testing color vision: report of Working Group 41. National Academies Press, 1981.
References
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8. Simunovic MP, Moore AT. The cone dystrophies. Eye 1998;12:553–65. National Research Council (US). Committee on Vision. Procedures for testing color vision: report of Working Group 41. National Academies Press, 1981.
Examples
data(typicalD15)
typicalD15
Vector of PNG files representing colored caps (buttons)
Description
vectorPNGbuttons
returns a vector with the filenames of the PNG files representing colored caps (buttons) from a data.frame.
Usage
vectorPNGbuttons(capsData=get("FarnsworthD15", envir = environment()))
Arguments
capsData |
data.frame with RGB values of colored caps (buttons). |
Value
vector with path+filenames of PNG files.
Author(s)
Jose Gama
Examples
## Not run:
vectorPNGbuttons(FarnsworthD15)
## End(Not run)