A Parametric Framework to Generate Visual Illusions using Python

Abstract

Visual illusions have had considerable importance in the history of psychological science, leading to important scientific breakthroughs in our understanding of perception, consciousness, and the underlying mechanisms of neuropsychiatric disorders such as schizophrenia or autism. However, despite their historical and theoretical importance as psychological stimuli, there is no dedicated software, nor consistent approach, to generate and report illusions in a systemic fashion. Illusory stimuli are often manually crafted or obtained via pre-made images, making it increasingly difficult for researchers to reproduce visual illusion paradigms and to properly measure the invoked sensitivity. In order to address replicability and reproducibility issues in illusion-based research, we present the Pyllusion package, a Python-based open-source software (freely available at https://github.com/RealityBending/Pyllusion), that implements a parametric framework to manipulate, generate, and report illusions in a systematic way. It is a flexible programming-based tool, as it can be easily incorporated with experimental software (such as PsychoPy) or pre-generated as image files (with the option of different output formats i.e., .png, .jpg, .tiff, etc.). Currently, our parametric approach accommodates several different illusions, especially classical ones such as the Ebbinghaus, Delboeuf, Ponzo, and Müller-Lyer illusions, and the addition of new illusions will be continually integrated as community needs evolve. With Pyllusion, we hope to facilitate a better understanding of critical processes underlying conscious perception and the associated underpinnings of psychopathology.

Publication
Lau, Z. J., Makowski, D., Pham, T., Boyce, W. P., & Chen, S. H. A. (2021, August 26). A Parametric Framework to Generate Visual Illusions using Python [Poster presentation]. 43rd European Conference on Visual Perception.
Dominique Makowski
Dominique Makowski
Collaborator

Trained as neuropsychologist and CBT psychotherapist, I am currently working as a lecturer at the University of Sussex, United Kingdom, where where we study the neurophysiological underpinnings of reality perception.

Annabel Chen
Annabel Chen
Professor of Psychology
Lab Director

Dr. SH Annabel Chen is a clinical neuropsychologist, and currently a Faculty member of Psychology at the School of Social Sciences.

Related