First thing we need to do is install the required packages/programs and load them!! Download xquartz if you have a mac
`install.packages(“AcuityView”)’ ‘install.packages(“magrittr”)’ ‘install.packages(“imager”)’ ‘install.packages(“fftwtools)’
library(AcuityView)
library(fftwtools)
library(imager)
AcuityView requires an image that it will then render into the acuity you set it at, BUT this image needs to be a square where the dimensions are a power of two
img <- load.image('.../extdata/parrots.png')
dim(img)
img <- resize(img, 512, 512)
MRA --> 1/CPD =
` Now run acuity view with your now
resized image!
Example:
AcuityView(photo = img, distance = 2, realWidth = 2, eyeResolutionX = 8.14, eyeResolutionY = NULL, plot = T, output = "firstimage.jpg" )