This morning I worked on developing a prototype web application for the Ishira color perception test based on R & the shiny web application framework.
To do this I had to make some small updates to my very basic (so far) R package ishihara.
The first of these involved identifying the pattern-forming circles in the one Ishihara plate that I'd digitized (plate 2, I believe).
Unfortunately, this was not as straightforward as it seems as I myself am abnormally trichromatic so I can't actually see the pattern & had to ask for help.
Here's my helper at work:
The result is now that the pattern can now be visualized by even a colorblind person by applying a transparency filter to the non pattern-forming circles.
This is what I mean:
library(ishihara)
##
## *************************************************
## * *
## * This package is just for fun & is not a *
## * medical diagnostic tool. *
## * *
## ***********************************************
data(plate2)
plot(plate2) ## normal
plot(plate2,alpha=0.2) ## 80% transparent
Users can even create a neat animation where transparency is faded on & off. Try it:
for(i in 50:0){
plot(plate2,alpha=min(1,i/50))
Sys.sleep(0.1)
}
for(i in 1:50){
plot(plate2,alpha=min(1,i/50))
Sys.sleep(0.1)
}
Check out the app and let me know what you think!
No comments:
Post a Comment
Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.