Retina Model

Retina Model in OpenCV

Since OpenCV 2.3.1 there comes a computational model of the retina with the OpenCV.

You can directly test it on still images and videos using retinaDemo.exe.

The model goes back to the work of Alexandre Benoit at the Gipsa Lab on modelling some of the properties of the retina.

For details see the paper:

A. Benoit, A. Caplier, B. Durette, J. Herault.
Using Human Visual System modeling for bio-inspired low level image processing
Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773

An efficient modeling of the processing occurring at retina level and in the V1 visual cortex has been proposed in 1,2 . The aim of the paper is to show the advantages of using such a modeling in order to develop efficient and fast bio-inspired modules for low level image processing. At the retina level, a spatio-temporal filtering ensures accurate structuring of video data (noise and illumination variation removal, static and dynamic contour enhancement). In the V1 cortex, a frequency and orientation based analysis is performed. The combined use of retina and V1 cortex modeling allows the development of low level image processing modules for contour enhancement, for moving contour extraction, for motion analysis and for motion event detection. Each module is described and its performances are evaluated. The retina model has been integrated into a real-time C/C++ optimized program which is also presented in this paper with the derived computer vision tools.

The model takes an input image and mainly gives you two output arrays which correspond to the two different retinal ganglion cell types in the retina:

  • P-cells (parvo=small cells): which respond mainly to spatial contrast patterns
  • M-cells (magno=big cells): which respond mainly to temporal contrast patterns, a.k.a. motion

In detail retinaDemo.exe does the following:

Retina demonstration : demonstrates the use of is a wrapper
class of the Gipsa/Listic Labs retina model.
This retina model allows spatio-temporal image processing (applied
on still images, video sequences).

As a summary, these are the retina model properties:

=> It applies a spectral whithening (mid-frequency details enhancement)
=> high frequency spatio-temporal noise reduction
=> low frequency luminance to be reduced (luminance range compression)
=> local logarithmic luminance compression allows details to be enhanced
   in low light conditions

As far as I understand it, the retina preprocesses the input such that the following pattern recognition steps are simplified. It does it among others by:

  • detecting contrasts rather than absolute values
  • it does this contrast detection not only in the spatial domain (spatial patterns) but also in the temporal domain (movement patterns)


Here is a demo where I put 4 colored objects in front of some windows and lift up the sunblind leading to extreme illumination changes.

The P-cell output of the retina model seems to give us some more constant output compared to the raw input.

Retina input:

P-cells output of retina model:

Videos of input, P-cells output, M-cells output:

Retina input:

You need to install a Flash Player to watch this video!

P-cells output:

You need to install a Flash Player to watch this video!

M-cells output:

You need to install a Flash Player to watch this video!

public/retina_model.txt · Last modified: 2012/02/19 18:22 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki