Title: | Color Vision Deficiencies |
---|---|
Description: | Methods for color vision deficiencies (CVD), to help understanding and mitigating issues with CVDs and to generate tests for diagnosis and interpretation. |
Authors: | Jose Gama [aut, cre, trl], Brian Foutch [ctb], Mark Grundland [ctb], Neil Dodgson [ctb] |
Maintainer: | Jose Gama <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.2 |
Built: | 2024-11-11 06:55:48 UTC |
Source: | CRAN |
approx.scotopic.luminance.LarsonEtAl.RGB
approximates the scotopic luminance from RGB values.
approx.scotopic.luminance.LarsonEtAl.XYZ
approximates the scotopic luminance from XYZ values.
approx.scotopic.luminance.LarsonEtAl.XYZ(XYZmatrix) approx.scotopic.luminance.LarsonEtAl.RGB(RGBmatrix)
approx.scotopic.luminance.LarsonEtAl.XYZ(XYZmatrix) approx.scotopic.luminance.LarsonEtAl.RGB(RGBmatrix)
XYZmatrix |
matrix with XYZ values |
RGBmatrix |
matrix with RGB values |
approximated scotopic luminance
Jose Gama
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.
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.
## 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)
## 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)
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).
attenuationNumberOfEyes(e)
attenuationNumberOfEyes(e)
e |
number of eyes (1 or 2) |
PupilSize |
attenuation |
Jose Gama
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.
## Not run: attenuationNumberOfEyes(1) attenuationNumberOfEyes(2) ## End(Not run)
## Not run: attenuationNumberOfEyes(1) attenuationNumberOfEyes(2) ## End(Not run)
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.
B20
B20
This data frame contains the following columns:
Cap Number
Munsell color
CIE X cap color
CIE Y cap color
CIE Z cap color
Jose Gama
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
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
data(B20) B20
data(B20) B20
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.
BowmanTCDS
BowmanTCDS
This data frame contains the following columns:
Distances between colored caps for the pilot cap
Distances between colored caps for the 1st cap
Distances between colored caps for the 2nd cap
Distances between colored caps for the 3rd cap
Distances between colored caps for the 4th cap
Distances between colored caps for the 5th cap
Distances between colored caps for the 6th cap
Distances between colored caps for the 7th cap
Distances between colored caps for the 8th cap
Distances between colored caps for the 9th cap
Distances between colored caps for the 10th cap
Distances between colored caps for the 11th cap
Distances between colored caps for the 12th cap
Distances between colored caps for the 13th cap
Distances between colored caps for the 14th cap
Distances between colored caps for the 15th cap
Jose Gama
Bowman KJ: A method for quantitative scoring of the Farnsworth panel D-15. Acta Ophthalmol 60:907, 1982.
Bowman KJ: A method for quantitative scoring of the Farnsworth panel D-15. Acta Ophthalmol 60:907, 1982.
data(BowmanTCDS) BowmanTCDS
data(BowmanTCDS) BowmanTCDS
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.
calculateCircle(x, y, r, steps=50,sector=c(0,360),randomDist=FALSE, randomFun=runif,...)
calculateCircle(x, y, r, steps=50,sector=c(0,360),randomDist=FALSE, randomFun=runif,...)
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 |
points |
array n x 2 of point coordinates. |
Jose Gama
## 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)
## 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)
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.
calculateTES(fmData, Kinnear=FALSE)
calculateTES(fmData, Kinnear=FALSE)
fmData |
vector of cap positions |
Kinnear |
position values chosen by tester |
TCDS |
Total Color Difference Score (TCDS) |
Jose Gama
Farnsworth D. The Farnsworth-Munsell 100-Hue Test. Baltimore: Munsell Color Company, 1957.
# a "perfect" score ## Not run: calculateTES(userD15values=1:15) ## End(Not run)
# a "perfect" score ## Not run: calculateTES(userD15values=1:15) ## End(Not run)
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
Color.Vision.c2g(fileIN=NULL, fileOUT=NULL, CorrectBrightness=FALSE)
Color.Vision.c2g(fileIN=NULL, fileOUT=NULL, CorrectBrightness=FALSE)
fileIN |
PNG input file |
fileOUT |
PNG output file |
CorrectBrightness |
automatic brightness correction |
none
Jose Gama
Martin Faust 2008 http://www.e56.de/c2g.php
## Not run: fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='') Color.Vision.c2g(fname, 'fruits.c2g.png') ## End(Not run)
## Not run: fname<-paste(system.file(package='CVD'),'/extdata/fruits.png',sep='') Color.Vision.c2g(fname, 'fruits.c2g.png') ## End(Not run)
Color.Vision.Daltonize
converts images so that the most problematic colors are more visible to people with CVD.
Color.Vision.Daltonize(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
Color.Vision.Daltonize(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
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" |
none
Jose Gama
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
# 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)
# 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)
Color.Vision.Simulate
converts images so that the colors look similar to how they are seen by people with CVD.
Color.Vision.Simulate(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
Color.Vision.Simulate(fileIN=NULL, fileOUT=NULL, myoptions=NULL, amount=1.0)
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" |
none
Jose Gama
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
# 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)
# 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)
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.
Color.Vision.VingrysAndKingSmith(capnumbers=NULL,testType='D-15',silent=TRUE)
Color.Vision.VingrysAndKingSmith(capnumbers=NULL,testType='D-15',silent=TRUE)
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 |
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 |
Jose Gama
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.
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
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
createPNGbuttons
creates PNG files from a data.frame with RGB values.
createPNGbuttons(capsData = get("FarnsworthD15", envir = environment()), imgLength = 44, imgWidth = 78)
createPNGbuttons(capsData = get("FarnsworthD15", envir = environment()), imgLength = 44, imgWidth = 78)
capsData |
Input file name. |
imgLength |
Input file name. |
imgWidth |
Input file name. |
png file object.
Jose Gama
## Not run: createPNGbuttons(data.frame(R=0,G=0,B=0)) data(FarnsworthD15) createPNGbuttons(FarnsworthD15) ## End(Not run)
## Not run: createPNGbuttons(data.frame(R=0,G=0,B=0)) data(FarnsworthD15) createPNGbuttons(FarnsworthD15) ## End(Not run)
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).
D15Foutch(userD15values=NULL, testType = 'D-15', dataVKS = NA)
D15Foutch(userD15values=NULL, testType = 'D-15', dataVKS = NA)
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 |
outmat |
data.frame with columns "angle", "magnitude" and "scatter" and rows "LSA05","JMO11","VKS88","VKS93" |
Brian K. Foutch
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.
# 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)
# 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)
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
decolorize(fileIN=NULL,effect=0.5,scale=NULL,noise=0.001,recolor=FALSE)
decolorize(fileIN=NULL,effect=0.5,scale=NULL,noise=0.001,recolor=FALSE)
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 |
colorArray |
array of RGB colors converted to contrast enhanced greyscale. |
Jose Gama
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
## 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)
## 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)
dichromaticCopunctalPoint
contains the copunctal points derived by Smith and Pokorny (1975)
dichromaticCopunctalPoint
dichromaticCopunctalPoint
This data frame contains the following columns:
copunctal points - protanope
copunctal points - deuteranope
copunctal points - tritanope
Jose Gama
Smith, V. C. & Pokorny, J. Spectral sensitivity of the foveal cone photopigments between 400 and 500 nm. Vision Research, 15, 1975. 161-171.
Smith, V. C. & Pokorny, J. Spectral sensitivity of the foveal cone photopigments between 400 and 500 nm. Vision Research, 15, 1975. 161-171.
data(dichromaticCopunctalPoint) dichromaticCopunctalPoint
data(dichromaticCopunctalPoint) dichromaticCopunctalPoint
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).
effectiveCornealFluxDensity(L=NULL,a=NULL,e=NULL)
effectiveCornealFluxDensity(L=NULL,a=NULL,e=NULL)
L |
luminance in cd m^-2 |
a |
field area in deg^2 |
e |
number of eyes (1 or 2) |
PupilSize |
effective Corneal Flux Density |
Jose Gama
Watson A. B., Yellott J. I. (2012). A unified formula for light-adapted pupil size. Journal of Vision, 12(10):12, 1–16.
# 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 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)
effectivePupilArea
computes the effective area of the illuminated pupil from its diameter.
effectivePupilArea(d)
effectivePupilArea(d)
d |
diameter in mm |
PupilSize |
Pupil effective area in mm^2 |
Jose Gama
#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.
# Pupil area in mm^2 for diameter = 2 mm ## Not run: effectivePupilArea(2)
# Pupil area in mm^2 for diameter = 2 mm ## Not run: effectivePupilArea(2)
example1Lanthony1978
contains an example of cap arrangements for the D-15d test, Simple/Extreme Anomalous Trichromacy, from Lanthony (1978)
example1Lanthony1978
example1Lanthony1978
This data frame contains the following columns:
example cap arrangements D15 - Simple Anomalous Trichromacy
example cap arrangements D15d - Simple Anomalous Trichromacy
example cap arrangements D15 - Extreme Anomalous Trichromacy
example cap arrangements D15d - Extreme Anomalous Trichromacy
Jose Gama
The Desaturated Panel D-15 P. Lanthony Documenta Ophthalmologica 46,1: 185-189, 1978
The Desaturated Panel D-15 P. Lanthony Documenta Ophthalmologica 46,1: 185-189, 1978
data(example1Lanthony1978) example1Lanthony1978
data(example1Lanthony1978) example1Lanthony1978
example2Lanthony1978
contains an example of cap arrangements for the D-15d test, Central Serous Choroidopathy/Optic Neuritis/Autosomal Dominant OpticAtrophy, from Lanthony (1978)
example2Lanthony1978
example2Lanthony1978
This data frame contains the following columns:
example cap arrangements D15 - Central Serous Choroidopathy
example cap arrangements D15d - Central Serous Choroidopathy
example cap arrangements D15 - Optic Neuritis
example cap arrangements D15d - Optic Neuritis
example cap arrangements D15 - Autosomal Dominant OpticAtrophy
example cap arrangements D15d - Autosomal Dominant OpticAtrophy
Jose Gama
THE DESATURATED PANEL D-15 P. LANTHONY Documenta Ophthalmologica 46,1: 185-189, 1978
THE DESATURATED PANEL D-15 P. LANTHONY Documenta Ophthalmologica 46,1: 185-189, 1978
data(example2Lanthony1978) example2Lanthony1978
data(example2Lanthony1978) example2Lanthony1978
exampleBowman1982
contains an example of cap arrangements for the D-15d test, from Bowman (1982)
exampleBowman1982
exampleBowman1982
This data frame contains the following columns:
example cap arrangements A
example cap arrangements B
example cap arrangements C
example cap arrangements D
example cap arrangements E
example cap arrangements F
Jose Gama
A Method For Quantitative Scoring Of The Farnsworth Panel D-15 K.J. Bowman 1982
A Method For Quantitative Scoring Of The Farnsworth Panel D-15 K.J. Bowman 1982
data(exampleBowman1982) exampleBowman1982
data(exampleBowman1982) exampleBowman1982
exampleFarnsworth1974
contains an example of cap arrangements for the D-15 test, deuteranope/protanope/tritanope, from Farnsworth (1974)
exampleFarnsworth1974
exampleFarnsworth1974
This data frame contains the following columns:
example cap arrangements D15 - deuteranope
example cap arrangements D15 - protanope
example cap arrangements D15 - tritanope
Jose Gama
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness. Panel D-15. New York, Psychological Testing, 1974
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness. Panel D-15. New York, Psychological Testing, 1974
data(exampleFarnsworth1974) exampleFarnsworth1974
data(exampleFarnsworth1974) exampleFarnsworth1974
exampleFM100
contains an example of cap arrangements for the FM-100, from Hidayat (2008)
exampleFM100
exampleFM100
This table contains one example of cap arrangements for the FM-100
Jose Gama
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
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
data(exampleFM100) exampleFM100
data(exampleFM100) exampleFM100
exampleNRC1981
contains an example of cap arrangements for the D-15d test, protanope/deuteranope/monochromat, from National Research Council (1981)
exampleNRC1981
exampleNRC1981
This data frame contains the following columns:
example cap arrangements D15 - protanope
example cap arrangements D15 - deuteranope
example cap arrangements D15 - monochromat
Jose Gama
Procedures for Testing Color Vision: Report of Working Group 41, 1981, Committee on Vision, National Research Council, pp. 107
Procedures for Testing Color Vision: Report of Working Group 41, 1981, Committee on Vision, National Research Council, pp. 107
data(exampleNRC1981) exampleNRC1981
data(exampleNRC1981) exampleNRC1981
exampleSimunovic2004
contains an example of cap arrangements for the D-15d test, rodMonochromat/blueConeMonochromat, from Lanthony (1978)
exampleSimunovic2004
exampleSimunovic2004
This data frame contains the following columns:
example cap arrangements D15 - rodMonochromat
example cap arrangements D15 - blueConeMonochromat
Jose Gama
Cone dystrophies Part 2 Cone dysfunction syndromes, Matthew P Simunovic
Cone dystrophies Part 2 Cone dysfunction syndromes, Matthew P Simunovic
data(exampleSimunovic2004) exampleSimunovic2004
data(exampleSimunovic2004) exampleSimunovic2004
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.
FarnsworthD15
FarnsworthD15
This data frame contains the following columns:
Cap Number
Munsell color
CIE x cap color
CIE y cap color
R channel cap color
G channel cap color
B channel cap color
Jose Gama
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
data(FarnsworthD15) FarnsworthD15
data(FarnsworthD15) FarnsworthD15
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.
FarnsworthMunsell100Hue
FarnsworthMunsell100Hue
This data frame contains the following columns:
Cap Number
Munsell color
CIE x cap color
CIE y cap color
R channel cap color
G channel cap color
B channel cap color
Jose Gama
Farnsworth D: The Farnsworth-Munsell 100-Hue Test for the Examination of Color Discrimination Manual. Baltimore, Munsell Color Co., 1957, pp. 1-7.
Farnsworth D: The Farnsworth-Munsell 100-Hue Test for the Examination of Color Discrimination Manual. Baltimore, Munsell Color Co., 1957, pp. 1-7.
data(FarnsworthMunsell100Hue) FarnsworthMunsell100Hue
data(FarnsworthMunsell100Hue) FarnsworthMunsell100Hue
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.
GellerTCDS
GellerTCDS
This data frame contains the following columns:
Distances between colored caps for the pilot cap
Distances between colored caps for the 1st cap
Distances between colored caps for the 2nd cap
Distances between colored caps for the 3rd cap
Distances between colored caps for the 4th cap
Distances between colored caps for the 5th cap
Distances between colored caps for the 6th cap
Distances between colored caps for the 7th cap
Distances between colored caps for the 8th cap
Distances between colored caps for the 9th cap
Distances between colored caps for the 10th cap
Distances between colored caps for the 11th cap
Distances between colored caps for the 12th cap
Distances between colored caps for the 13th cap
Distances between colored caps for the 14th cap
Distances between colored caps for the 15th cap
Jose Gama
Geller AM. A table of color distance scores for quantitative scoring of the Lanthony desaturate color vision test. Neurotoxicol Teratol 2001; 23: 265-267.
Geller AM. A table of color distance scores for quantitative scoring of the Lanthony desaturate color vision test. Neurotoxicol Teratol 2001; 23: 265-267.
data(GellerTCDS) GellerTCDS
data(GellerTCDS) GellerTCDS
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
greyscale.avg(colorArray)
greyscale.avg(colorArray)
colorArray |
array of RGB colors. |
colorArray |
array of RGB colors converted to greyscale. |
Jose Gama
## 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)
## 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)
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.
H16
H16
This data frame contains the following columns:
Cap Number
CIE x cap color
CIE y cap color
Munsell color
Munsell Production Number
Jose Gama
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
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
data(H16) H16
data(H16) H16
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.
luminance2troland(Lv, d=NA) illuminance2troland(Ev, lumFactor, d=NA)
luminance2troland(Lv, d=NA) illuminance2troland(Ev, lumFactor, d=NA)
d |
diameter in mm |
Lv |
luminance (cd/m^2) |
Ev |
illuminance (lux) |
lumFactor |
luminance factor |
troland |
conventional retinal illuminance (troland) |
effectivetroland |
effective troland (trolands per effective area) |
Jose Gama
#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.
# Pupil area in mm^2 for diameter = 2 mm ## Not run: illuminance2troland(2)
# Pupil area in mm^2 for diameter = 2 mm ## Not run: illuminance2troland(2)
interpretation.VingrysAndKingSmith
and interpretation.Foutch
perform an interpretation of the test results based on the classification ranges from the authors of the tests.
interpretation.VingrysAndKingSmith(VKS,optMethod=88)
interpretation.VingrysAndKingSmith(VKS,optMethod=88)
VKS |
data to be interpreted |
optMethod |
CVD test method |
TCDS |
Total Color Difference Score (TCDS) |
Jose Gama
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
# a "perfect" score ## Not run: interpretation.VingrysAndKingSmith(D15Foutch(1:15)) ## End(Not run)
# a "perfect" score ## Not run: interpretation.VingrysAndKingSmith(D15Foutch(1:15)) ## End(Not run)
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.
LanthonyD15
LanthonyD15
This data frame contains the following columns:
Cap Number
Munsell color
CIE x cap color
CIE y cap color
R channel cap color
G channel cap color
B channel cap color
Jose Gama
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
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
data(LanthonyD15) LanthonyD15
data(LanthonyD15) LanthonyD15
lightAdaptedPupilSize.Barten
computes the pupil diameter ranges from Barten, L. (1999).
lightAdaptedPupilSize.Barten(L=NULL, a=NULL)
lightAdaptedPupilSize.Barten(L=NULL, a=NULL)
L |
luminance in cd m^-2 |
a |
area in deg^2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees ## Not run: lightAdaptedPupilSize.Barten(1,30^2)
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees ## Not run: lightAdaptedPupilSize.Barten(1,30^2)
lightAdaptedPupilSize.BlackieAndHowland
computes the pupil diameter ranges from Blackie, C. A., & Howland, H. C., (1999).
lightAdaptedPupilSize.BlackieAndHowland(L=NULL)
lightAdaptedPupilSize.BlackieAndHowland(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.BlackieAndHowland(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.BlackieAndHowland(1)
lightAdaptedPupilSize.Crawford
computes the pupil diameter ranges from Crawford, L. (1936).
lightAdaptedPupilSize.Crawford(L=NULL)
lightAdaptedPupilSize.Crawford(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.Crawford(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.Crawford(1)
lightAdaptedPupilSize.DeGrootAndGebhard
computes the pupil diameter ranges from DeGrootAndGebhard, L. (1952).
lightAdaptedPupilSize.DeGrootAndGebhard(L=NULL)
lightAdaptedPupilSize.DeGrootAndGebhard(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.DeGrootAndGebhard(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.DeGrootAndGebhard(1)
lightAdaptedPupilSize.Holladay
computes the pupil diameter ranges from Holladay, L. (1926).
lightAdaptedPupilSize.Holladay(L=NULL)
lightAdaptedPupilSize.Holladay(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.Holladay(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.Holladay(1)
lightAdaptedPupilSize.LeGrand
computes the pupil diameter ranges from Le Grand (1992).
lightAdaptedPupilSize.LeGrand(L=NULL)
lightAdaptedPupilSize.LeGrand(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
Vision, Pierre A. Buser, Michel Imbert, MIT Press, 1992
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.LeGrand(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.LeGrand(1)
lightAdaptedPupilSize.MoonAndSpencer
computes the pupil diameter ranges from MoonAndSpencer, L. (1944).
lightAdaptedPupilSize.MoonAndSpencer(L=NULL)
lightAdaptedPupilSize.MoonAndSpencer(L=NULL)
L |
luminance in cd m^-2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.MoonAndSpencer(1)
# Pupil diameter in mm for luminance = 1 cd m^-2 ## Not run: lightAdaptedPupilSize.MoonAndSpencer(1)
lightAdaptedPupilSize.StanleyAndDavies
computes the pupil diameter ranges from StanleyAndDavies, L. (1995).
lightAdaptedPupilSize.StanleyAndDavies(L=NULL, a=NULL)
lightAdaptedPupilSize.StanleyAndDavies(L=NULL, a=NULL)
L |
luminance in cd m^-2 |
a |
area in deg^2 |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees ## Not run: lightAdaptedPupilSize.StanleyAndDavies(1,30^2)
# Pupil diameter in mm for luminance = 1 cd m^-2, field diameter = 30 degrees ## Not run: lightAdaptedPupilSize.StanleyAndDavies(1,30^2)
lightAdaptedPupilSize.WatsonAndYellott
computes the pupil
diameter ranges from Watson A. B., Yellott J. I. (2012).
lightAdaptedPupilSize.WatsonAndYellott(L=NULL, a=NULL, y=NULL, y0=NULL, e=NULL)
lightAdaptedPupilSize.WatsonAndYellott(L=NULL, a=NULL, y=NULL, y0=NULL, e=NULL)
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) |
PupilSize |
Pupil size in mm |
Jose Gama
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
# 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 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)
lightAdaptedPupilSize.WinnEtAl
computes the pupil diameter ranges from Winn et al (1995).
lightAdaptedPupilSize.WinnEtAl(L=NULL, y=NULL)
lightAdaptedPupilSize.WinnEtAl(L=NULL, y=NULL)
L |
luminance in cd m^-2 |
y |
age in years |
PupilSize |
Pupil size in mm |
Jose Gama
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.
# Pupil diameter in mm for luminance = 1 cd m^-2, age = 45 years ## Not run: lightAdaptedPupilSize.WinnEtAl(1,45)
# Pupil diameter in mm for luminance = 1 cd m^-2, age = 45 years ## Not run: lightAdaptedPupilSize.WinnEtAl(1,45)
loadPNG
loads a PNG file and displays the image dimensions.
loadPNG(fileIN=NULL, silent=FALSE)
loadPNG(fileIN=NULL, silent=FALSE)
fileIN |
Input file name. |
silent |
Logic, TRUE=do not display image dimensions. |
png file object.
Jose Gama
## Not run: loadPNG(paste(system.file(package='CVD'),'/inst/extdata/fruits.png',sep='')) ## End(Not run)
## Not run: loadPNG(paste(system.file(package='CVD'),'/inst/extdata/fruits.png',sep='')) ## End(Not run)
neutralPoint
contains the neutral points for CIE 1976 uv, CIE 1931 xy and CIE 1960 uv
neutralPoint
neutralPoint
This data frame contains the following columns:
neutral point CIE 1931 xy
neutral point CIE 1976 uv
neutral point CIE 1960 uv
Jose Gama
data(neutralPoint) neutralPoint
data(neutralPoint) neutralPoint
plotConfusionVectors
Plots the confusion vectors for
CIE 1976 uv, CIE 1931 xy and CIE 1960 uv.
plotConfusionVectors(colorSpace='CIE1931xy')
plotConfusionVectors(colorSpace='CIE1931xy')
colorSpace |
chosen colorSpace, default='CIE1931xy' |
none
Jose Gama
# find duplicate values ## Not run: plotConfusionVectors()
# find duplicate values ## Not run: plotConfusionVectors()
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.
Roth28
Roth28
This data frame contains the following columns:
CIELab L channel cap color
CIELab a channel cap color
CIELab b channel cap color
R channel cap color
G channel cap color
B channel cap color
Jose Gama
Roth A. Test-28 hue de Roth selon Farnsworth–Munsell (Manual). Paris: Luneau, 1966.
Roth A. Test-28 hue de Roth selon Farnsworth–Munsell (Manual). Paris: Luneau, 1966.
data(Roth28) Roth28
data(Roth28) Roth28
scoreD15Graphic
computes the graphical score for
the D-15 test or similar. The input is either a vector of RGB colors or cap positions.
scoreD15Graphic(userD15colors=NULL,userD15values=NULL, titleGraphic= "Farnsworth dichotomous test (D-15) results", okD15colors=NULL)
scoreD15Graphic(userD15colors=NULL,userD15values=NULL, titleGraphic= "Farnsworth dichotomous test (D-15) results", okD15colors=NULL)
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 |
none
Jose Gama
Farnsworth D. The Farnsworth Dichotomous Test for Color Blindness Panel D-15 Manual. New York, The Psychological Corp., 1947, pp. 1-8.
# a "perfect" score ## Not run: scoreD15Graphic(userD15values=1:15)
# a "perfect" score ## Not run: scoreD15Graphic(userD15values=1:15)
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.
scoreD15TCDS(userD15colors=NULL,userD15values=NULL, distTable = get("BowmanTCDS", envir = environment()), D15colors = get("FarnsworthD15", envir = environment()))
scoreD15TCDS(userD15colors=NULL,userD15values=NULL, distTable = get("BowmanTCDS", envir = environment()), D15colors = get("FarnsworthD15", envir = environment()))
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 |
TCDS |
Total Color Difference Score (TCDS) |
Jose Gama
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
# a "perfect" score ## Not run: scoreD15TCDS(userD15values=1:15) ## End(Not run)
# a "perfect" score ## Not run: scoreD15TCDS(userD15values=1:15) ## End(Not run)
scoreFM100Graphic
computes the graphical score for the
FM-100 test or similar. The input is either a vector of RGB colors or cap positions.
scoreFM100Graphic(userFM100colors=NULL,userFM100values=NULL, titleGraphic= "Farnsworth Munsell 100-Hue test results", okFM100colors=NULL, Kinnear=FALSE)
scoreFM100Graphic(userFM100colors=NULL,userFM100values=NULL, titleGraphic= "Farnsworth Munsell 100-Hue test results", okFM100colors=NULL, Kinnear=FALSE)
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 |
none
Jose Gama
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
# 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)
# 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)
scoreRoth28Graphic
computes the graphical score for the
Roth-28 test or similar. The input is either a vector of RGB colors or cap positions.
scoreRoth28Graphic(userR28colors=NULL,userR28values=NULL, titleGraphic= "Roth-28 test results", okR28colors=NULL)
scoreRoth28Graphic(userR28colors=NULL,userR28values=NULL, titleGraphic= "Roth-28 test results", okR28colors=NULL)
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 |
none
Jose Gama
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.
# a "perfect" score ## Not run: scoreRoth28Graphic(userD15values=1:28)
# a "perfect" score ## Not run: scoreRoth28Graphic(userD15values=1:28)
showDuplicated
shows missing and duplicated cap numbers
from D-15, D15d, FM-100 and similar tests.
showDuplicated(cnum)
showDuplicated(cnum)
cnum |
cap numbers |
none
Jose Gama
# 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)
# 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)
typicalD15
contains typical cap arrangements for the D-15 tests, from Farnsworth D (1947), Simunovic (1998) and NRC (1981)
typicalD15
typicalD15
This data frame contains the following columns:
typical cap arrangements - protanope
typical cap arrangements - deuteranope
typical cap arrangements - tritanope
typical cap arrangements - monochromat
typical cap arrangements - rodMonochromat
typical cap arrangements - blueConeMonochromat
Jose Gama
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.
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.
data(typicalD15) typicalD15
data(typicalD15) typicalD15
vectorPNGbuttons
returns a vector with the filenames of the PNG files representing colored caps (buttons) from a data.frame.
vectorPNGbuttons(capsData=get("FarnsworthD15", envir = environment()))
vectorPNGbuttons(capsData=get("FarnsworthD15", envir = environment()))
capsData |
data.frame with RGB values of colored caps (buttons). |
vector with path+filenames of PNG files.
Jose Gama
## Not run: vectorPNGbuttons(FarnsworthD15) ## End(Not run)
## Not run: vectorPNGbuttons(FarnsworthD15) ## End(Not run)
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.
VKSgraphic(VKSdata, xLimit=5, yLimit=4, VKStitle='', VKSxlabel='', VKSylabel='')
VKSgraphic(VKSdata, xLimit=5, yLimit=4, VKStitle='', VKSxlabel='', VKSylabel='')
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 |
none
Jose Gama
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.
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.
# 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)
# 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)
VKStable2
contains tthe results of D-15 tests scored with the Vingrys and King-Smith method, from Vingrys and King-Smith (1988), table 2
VKStable2
VKStable2
This data frame contains the following columns:
Type of color vision
Number in sample
Angle
S-index
C-index
Major radius
Minor radius
TES
TCDS
Jose Gama
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.
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.
data(VKStable2) VKStable2
data(VKStable2) VKStable2
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.
XYZ2scotopic.Rawtran(XYZmatrix)
XYZ2scotopic.Rawtran(XYZmatrix)
XYZmatrix |
matrix (or array) with XYZ values |
Matrix (or array) with approximated scotopic luminance.
Jose Gama
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/
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/