R: AcuityView
R: AcuityView
R topics documented:
AcuityView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
fft_matrix_shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Index 4
1
2 AcuityView
AcuityView AcuityView
Description
This function provides a simple method for displaying a visual scene as it may appear to an animal
with lower acuity.
Usage
AcuityView(photo = NULL, distance = 2, realWidth = 2,
eyeResolutionX = 0.2, eyeResolutionY = NULL, plot = T,
output = "test.jpg")
Arguments
photo The photo you wish to alter; if NULL then a pop up window allows you to
navigate to your photo, otherwise include the file path here
distance The distance from the viewer to the object of interest in the image; can be in any
units so long as it is in the same units as RealWidth
realWidth The real width of the entire image; can be in any units as long as it is in the same
units as distance
eyeResolutionX The resolution of the viewer in degrees
eyeResolutionY The resolution of the viewer in the Y direction, if different than ResolutionX;
defaults to NULL, as it is uncommon for this to differ from eyeResolutionX
plot Whether to plot the final image; defaults to T, but if F, the final image will still
be saved to your working directory
output The name of the output file, must be in the format of output="image_name.filetype";
acceptable filetypes are .bmp, .png, or .jpeg
Value
Returns an image in the specified format
Image size
Image must be square with each side a power of 2 pixels. Example: 512x512, 1024 x 1024, 2048 x
2048 pixels
fft_matrix_shift 3
Examples
require(imager)
photo<-system.file('extdata/reef.bmp', package='AcuityView')
reef<-load.image(photo)
AcuityView(photo = reef, distance = 2, realWidth = 2, eyeResolutionX = 2,
eyeResolutionY = NULL, plot = TRUE, output="Example.jpeg")
fft_matrix_shift FFTMatrixShift
Description
This function rearranges the output of the FFT by moving the zero frequency component to the
center
Usage
fft_matrix_shift(input_matrix, dim = -1)
Arguments
input_matrix the output of an FFT
dim -1 gives the correct matrix shift for the AcuityView function
Index
AcuityView, 2
fft_matrix_shift, 3