Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Simulate what an animal sees
| 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. | 
| "Distance" | Automatic | view distance from eye to image on screen | 
| "HumanPupilDiameter" | Automatic | diameter of human pupil | 
| "PhysicalImageSize" | Automatic | physical size of image on screen | 
| "ScreenResolution" | Automatic | resolution of screen | 
| "SetFinalBackgroundWhiteQ" | False | whether to apply final filter for white background | 
| "SnellenRatio" | Automatic | Snellen ratio as measured for visual acuity | 
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"]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/76b41df5fdfa6b75.png) | 
| 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"]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/1b6cc2ab899ba725.png) | 
| Out[2]= |  | 
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"]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/0a952c7a601c1219.png) | 
| Out[3]= |  | 
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"]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/79c253bf4e019ec6.png) | 
| Out[4]= |  | 
Get a test image:
| In[5]:= | ![ishihara6 = ResourceData[
    ResourceObject["Ishihara's Test for Color Deficiency"]][[6]][
  "Image"]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/1907c90eda60244a.png) | 
| Out[5]= |  | 
Simulate protanopia color blindness:
| In[6]:= | ![ResourceFunction[
 "SimulateAnimalVision"]["Human:Protanopia", ishihara6]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/21ff0a928bc6cf97.png) | 
| 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]](https://www.wolframcloud.com/obj/resourcesystem/images/a40/a404a1b9-47de-4542-af6d-0c65b101a27f/639211e7a8e539b9.png) | 
| Out[7]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License