Function Repository Resource:

SimulateAnimalVision

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.

ResourceFunction["SimulateAnimalVision"][animal]

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

Examples

Basic Examples (2) 

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

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/df3158c1-2bef-4089-a41e-739f3c19a8b3"]
Out[1]=

Simulate how various animals would see this image:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/38d7de53-d7c0-4e59-96c6-ce286d2ab5fe"]
Out[2]=

Options (5) 

Distance (1) 

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

In[3]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/edeb4502-4be6-405f-88e0-e73579f5e1ce"]
Out[3]=

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:

In[4]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/387f6ef0-cdbc-47ed-8638-e5e932dd1d2e"]
Out[4]=

SetFinalBackgroundWhiteQ (3) 

Get a test image:

In[5]:=
ishihara6 = ResourceData[
    ResourceObject["Ishihara's Test for Color Deficiency"]][[6]][
  "Image"]
Out[5]=

Simulate protanopia color blindness:

In[6]:=
ResourceFunction[
 "SimulateAnimalVision"]["Human:Protanopia", ishihara6]
Out[6]=

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

In[7]:=
ResourceFunction[
 "SimulateAnimalVision"]["Human:Protanopia", ishihara6, "SetFinalBackgroundWhiteQ" -> True]
Out[7]=

Version History

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

Related Resources

Author Notes

PhysicalImageSize

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

"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.

SnellenRatio

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