library(AcuityView)
library(fftwtools)
library(imager)
## Loading required package: magrittr
## 
## Attaching package: 'imager'
## The following object is masked from 'package:magrittr':
## 
##     add
## The following objects are masked from 'package:stats':
## 
##     convolve, spectrum
## The following object is masked from 'package:graphics':
## 
##     frame
## The following object is masked from 'package:base':
## 
##     save.image

Cat Acuity

#CAT
img_mouse <- load.image('field-mouse.jpg')
dim(img_mouse)
## [1] 760 480   1   3
img_mouse <- resize(img_mouse, 512, 512)
MRA_cat <- 1/8.85 
AcuityView(photo = img_mouse, distance = 12, realWidth = 3.4, eyeResolutionX = 0.113, eyeResolutionY = NULL, plot = T, output = "cat_view.jpg" )
## To save the side-by-side image, use a command like this before closing the device:
## dev.copy(jpeg,file="sidebyside.jpg")
## The results are complete.  The output file has been saved to cat_view.jpg

Cat view of field mouse from 12 inches away

Eagle Acuity

img_mouse <- load.image('field-mouse.jpg')
dim(img_mouse)
## [1] 760 480   1   3
img_mouse <- resize(img_mouse, 512, 512)
MRA_eagle <- 1/140 
AcuityView(photo = img_mouse, distance = 240, realWidth = 3.4, eyeResolutionX = 0.00714, eyeResolutionY = NULL, plot = T, output = "eagle_view.jpg" )
## To save the side-by-side image, use a command like this before closing the device:
## dev.copy(jpeg,file="sidebyside.jpg")
## The results are complete.  The output file has been saved to eagle_view.jpg

Eagles view of the same field mouse from 240 inches away

Honeybee Acuity

img_rose <- load.image('rose.jpg')
dim(img_rose)
## [1] 255 198   1   3
img_rose <- resize(img_rose, 512, 512)
MRA_bee <- 1/0.83 
AcuityView(photo = img_rose, distance = 2, realWidth = 4, eyeResolutionX = 1.2, eyeResolutionY = NULL, plot = T, output = "bee_view.jpg" )
## To save the side-by-side image, use a command like this before closing the device:
## dev.copy(jpeg,file="sidebyside.jpg")
## The results are complete.  The output file has been saved to bee_view.jpg

Honeybee view of a rose from 2 inches away

Isopod Acuity

img_isopod <- load.image('isopod.jpg')
dim(img_isopod)
## [1] 275 183   1   3
img_isopod <- resize(img_isopod, 512, 512)
MRA_isopod <- 1/0.05 
AcuityView(photo = img_isopod, distance = 50, realWidth = 30, eyeResolutionX = 20, eyeResolutionY = NULL, plot = T, output = "isopod_view.jpg")
## To save the side-by-side image, use a command like this before closing the device:
## dev.copy(jpeg,file="sidebyside.jpg")
## The results are complete.  The output file has been saved to isopod_view.jpg

Isopod view of a conspecfic from 50mm away

Oarfish Acuity

img_squid <- load.image('squid.jpg')
dim(img_squid)
## [1] 276 183   1   3
img_squid <- resize(img_squid, 512, 512)
MRA_oarfish <- 1/9.2 
AcuityView(photo = img_squid, distance = 50, realWidth = 12, eyeResolutionX = 0.109, eyeResolutionY = NULL, plot = T, output = "oarfish_view.jpg")
## To save the side-by-side image, use a command like this before closing the device:
## dev.copy(jpeg,file="sidebyside.jpg")
## The results are complete.  The output file has been saved to oarfish_view.jpg

Oarfish view of a squid from 50 inches away