The correct answer to this open question is the following.
Psychologists learned about perception from optical illusions that the response of the senses, when faced with optical stimuli, is different and can be measured because the human can interpret an optical stimulus as being real.
Gustav Fechner (1801-1887) was a German physicist who developed the science that studied quantitative relations of stimuli and sensations. It is called psychophysics. In 1860, he published the book "Elements of Psychophysics," in which he studies how the perception determines the sensory input.