AcuityView - Tanner’s Presentation
Load the following libraries:
require(AcuityView)
## Loading required package: AcuityView
require(magrittr)
## Loading required package: magrittr
require(fftwtools)
## Loading required package: fftwtools
require(imager)
## Loading required package: imager
##
## 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
For this assignment we needed to examine 5 species of choice and a
common prey item of theirs. I chose:
- Cat and Mouse
- Opossum and Tick
- Brown Hawker and Horsefly
- Japanese Pufferfish and Marine Snail
- Human and Corn
I uploaded an image of a Mouse, because my species
of interest is a Cat (Felis catus)
Examine the dimensions of the image
- We want the dimensions set to the power of 2 (or
squared)
- We will change the dimensions to 512 x 512
Mouse <- load.image("mouse.jpg")
dim(Mouse)
## [1] 1200 1279 1 3
Mouse <- resize(Mouse, 512, 512)
dim(Mouse)
## [1] 512 512 1 3
Below is the acuity of a Cat, the eye resolution
(MRA) was calculated by (1/CPD)
- That information was stated in Tanner’s attached papers; the CPD
values were listed
- Three different images were made at 1, 2, and 3 inches away
AcuityView(photo = Mouse, distance = 1, realWidth = 4, eyeResolutionX = 0.1, eyeResolutionY = NULL, plot = T, output = "Cat1in.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 Cat1in.jpg
AcuityView(photo = Mouse, distance = 2, realWidth = 4, eyeResolutionX = 0.1, eyeResolutionY = NULL, plot = T, output = "Cat2in.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 Cat2in.jpg
AcuityView(photo = Mouse, distance = 3, realWidth = 4, eyeResolutionX = 0.1, eyeResolutionY = NULL, plot = T, output = "Cat3in.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 Cat3in.jpg
Cat at 1inch
Cat at 2inches
Cat at 3inches
Next we will upload an image of a Tick and resize
it to 512 x 512
- The next species I examined was the Opossum
(Didelphis virginiana)
Tick <- load.image("Tick.jpg")
Tick <- resize(Tick, 512, 512)
Below is the acuity of a Opossum, the eye
resolution (MRA) was calculated by (1/CPD)
- That information was given in Tanner’s attached papers
- Three different images were made at 1, 2, and 3 inches away
AcuityView(photo = Tick, distance = 1, realWidth = 0.2, eyeResolutionX = 0.402, eyeResolutionY = NULL, plot = T, output = "Opossum1in.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 Opossum1in.jpg
AcuityView(photo = Tick, distance = 2, realWidth = 0.2, eyeResolutionX = 0.402, eyeResolutionY = NULL, plot = T, output = "Opossum2in.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 Opossum2in.jpg
AcuityView(photo = Tick, distance = 3, realWidth = 0.2, eyeResolutionX = 0.402, eyeResolutionY = NULL, plot = T, output = "Opossum3in.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 Opossum3in.jpg
Opposum at 1inch
Opposum at 2inches
Opposum at 3inches
Upload an image of a Horse Fly and resize it to 512
x 512
- The next species I examined was the Brown Hawker
(Aeshna grandis)
Horse_fly<-load.image("Horse_Fly.jpg")
Horse_fly<-resize(Horse_fly, 512, 512)
Below is the acuity of a Brown Hawker, the eye
resolution (MRA) was calculated by (1/CPD)
- That information was given in Tanner’s attached papers
- Three different images were made at 1, 2, and 3 inches away
AcuityView(photo = Horse_fly, distance = 1, realWidth = 1, eyeResolutionX = 1.59, eyeResolutionY = NULL, plot = T, output = "BHin.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 BHin.jpg
AcuityView(photo = Horse_fly, distance = 2, realWidth = 1, eyeResolutionX = 1.59, eyeResolutionY = NULL, plot = T, output = "BH2in.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 BH2in.jpg
AcuityView(photo = Horse_fly, distance = 3, realWidth = 1, eyeResolutionX = 1.59, eyeResolutionY = NULL, plot = T, output = "BH3in.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 BH3in.jpg
Brown Hawker at 1inch
Brown Hawker at 2inches
Brown Hawker at 3 inches
Upload an image of a Marine Snail and resize it to
512 x 512
- The next species I examined was a Japanese Puffer
fish (Takifugu chrysops)
Marine_snail<-load.image("marine_snail.jpg")
Marine_snail<-resize(Marine_snail, 512, 512)
Below is the acuity of a Japanese Pufferfish, the
eye resolution (MRA) was calculated by (1/CPD)
- That information was given in Tanner’s attached papers
- Three different images were made at 1, 2, and 3 inches away
AcuityView(photo = Marine_snail, distance = 1, realWidth = 2, eyeResolutionX = 0.24, eyeResolutionY = NULL, plot = T, output = "Puffer1in.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 Puffer1in.jpg
AcuityView(photo = Marine_snail, distance = 2, realWidth = 2, eyeResolutionX = 0.24, eyeResolutionY = NULL, plot = T, output = "Puffer2in.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 Puffer2in.jpg
AcuityView(photo = Marine_snail, distance = 3, realWidth = 2, eyeResolutionX = 0.24, eyeResolutionY = NULL, plot = T, output = "Puffer3in.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 Puffer3in.jpg
Pufferfish at 1inch
Pufferfish at
2inches
Pufferfish at 3
inches
Lastly, upload an image of Corn (favorite food of
an Iowa native) and resize it to 512 x 512
- The next species I examined was a Human (Homo
sapiens)
Corn<-load.image("corn.jpg")
Corn<-resize(Corn, 512, 512)
Below is the acuity of a Human, the eye resolution
(MRA) was calculated by (1/CPD)
- That information was given in Tanner’s attached papers
- Three different images were made at 1, 2, and 3 inches away
AcuityView(photo = Corn, distance = 1, realWidth = 1, eyeResolutionX = 0.0156, eyeResolutionY = NULL, plot = T, output = "human1in.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 human1in.jpg
AcuityView(photo = Corn, distance = 2, realWidth = 1, eyeResolutionX = 0.0156, eyeResolutionY = NULL, plot = T, output = "human2in.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 human2in.jpg
AcuityView(photo = Corn, distance = 3, realWidth = 1, eyeResolutionX = 0.0156, eyeResolutionY = NULL, plot = T, output = "human3in.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 human3in.jpg
Human at 1inch
Human at 2inches
Human at 3 inches