Function Repository Resource:


Source Notebook

Simulate what an animal sees

Contributed by: Björn Zimmermann

ResourceFunction["SimulateAnimalVision"][animal, image]

simulates to the human eye how the given animal would see image.


represents an operator form that can be applied to an image.

Details and Options

Typical color sensitivity and visual acuity for the eyes of the given animal species are translated for human vision.
ResourceFunction["SimulateAnimalVision"] accepts the following options:
"Distance"Automaticview distance from eye to image on screen
"HumanPupilDiameter"Automaticdiameter of human pupil
"PhysicalImageSize"Automaticphysical size of image on screen
"ScreenResolution"Automaticresolution of screen
"SetFinalBackgroundWhiteQ"Falsewhether to apply final filter for white background
"SnellenRatio"AutomaticSnellen ratio as measured for visual acuity
If not stated otherwise, a distance of 1 meter is assumed between eye and screen.
Screen resolution is taken from SystemInformation. Multiple monitors can have different screen resolutions, in which case the appropriate screen resolution has to be selected. The default is 72 dpi.
The reference for human eyes is a Snellen ratio of 20/20 (feet in non-metric units) or 6/6 (meters in metric units).
Some supported values for animal are "Dog", "Cat", "Mouse", "GuineaPig" and "Horse". Additionally, humans and color blindness types can be specified as:
"Human"normal vision
"Human:Protanopia"Green and Blue, no Red
"Human:Deuteranopia"Red and Blue, no Green
"Human:Tritanopia"Red and Green, no Blue


Basic Examples (2) 

Simulate how a dog would see an image 1 meter away:

(* Evaluate this cell to get the example input *) CloudGet[""]

Simulate how various animals would see this image:

(* Evaluate this cell to get the example input *) CloudGet[""]

Options (5) 

Distance (1) 

The "Distance" option defines the distance from screen to eye. Mice are very short sighted:

(* Evaluate this cell to get the example input *) CloudGet[""]

HumanPupilDiameter (1) 

The normal human pupil size in adults varies from 2 to 4 millimeters in diameter in bright light to 4 to 8 millimeters in the dark:

(* Evaluate this cell to get the example input *) CloudGet[""]

SetFinalBackgroundWhiteQ (3) 

Get a test image:

ishihara6 = ResourceData[
    ResourceObject["Ishihara's Test for Color Deficiency"]][[6]][

Simulate protanopia color blindness:

 "SimulateAnimalVision"]["Human:Protanopia", ishihara6]

One can perceive an overall blue "tint" in normal vision. To eliminate this tint, use "SetFinalBackgroundWhiteQ"True:

 "SimulateAnimalVision"]["Human:Protanopia", ishihara6, "SetFinalBackgroundWhiteQ" -> True]

Version History

  • 2.0.0 – 11 September 2020
  • 1.0.0 – 15 June 2020

Related Resources

Author Notes


The actual, physical size on the screen is very important for the accuracy of the simulation. The resolution of the screen is used to translate those into pixel on the screen. See "ScreenResolution".


"ScreenResolution" is taken from the SystemInformation. However, some system claim to have a different screen resolution than they actually have. The default for many systems is 72 dpi. Retina devices tend to have 144 dpi.


A common use of the Snellen ratio is in the Snellen eye chart (below the version in used in the US):

The minimum eyesight standard for driving is 0.5 (20/40 or 6/12).

Legally blind individuals have a visual acuity of 20/200 (6/60).

License Information