Perception, Illusions and Bayesian Inference