Python implementation of image retina transformation. For detailed algorithm, please refer to the following papers:
Perry, Jeffrey S., and Wilson S. Geisler. "Gaze-contingent real-time simulation of arbitrary visual fields." Human vision and electronic imaging VII. Vol. 4662. International Society for Optics and Photonics, 2002.
Jiang, Ming, et al. "Salicon: Saliency in context." Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.
- Python 3.x
- Numpy
- OpenCV
python retina_transform.py [image_path]
To adjust the degree of blur and size of the foveal region (full-reolustion pixels), one can increase or decrease the value of k
and p
and alpha
in the function foveat_img
.