首页 > 代码库 > OpenCV Tutorials —— Discovering the human retina and its use for image processing

OpenCV Tutorials —— Discovering the human retina and its use for image processing

将关于人类视网膜的发现应用于图像处理 ~

  • spectral whitening 频谱白化 that has 3 important effects: high spatio-temporal frequency signals canceling (noise), mid-frequencies details enhancement and low frequencies luminance energy reduction. This all in one property directly allows visual signals cleaning of classical undesired distortions introduced by image sensors and input luminance range.
  • local logarithmic luminance 亮度 compression allows details to be enhanced even in low light conditions.
  • decorrelation 去相关 of the details information (Parvocellular output channel) and transient information (events, motion made available at the Magnocellular output channel).

 

In the figure below, the OpenEXR image sample CrissyField.exr, a High Dynamic Range image is shown. In order to make it visible on this web-page, the original input image is linearly rescaled to the classical image luminance range [0-255] and is converted to 8bit/channel format. Such strong conversion hides many details because of too strong local contrasts. Furthermore, noise energy is also strong and pollutes visual information.

A High dynamic range image linearly rescaled within range [0-255].

In the following image, as your retina does, local luminance adaptation, spatial noise removal and spectral whitening work together and transmit accurate information on lower range 8bit data channels. On this picture, noise in significantly removed, local details hidden by strong luminance contrasts are enhanced. Output image keeps its naturalness and visual content is enhanced.

A High dynamic range image compressed within range [0-255] using the retina.

 

 

As an illustration, we apply in the following the retina model on a webcam video stream of a dark visual scene. In this visual scene, captured in an amphitheater of the university, some students are moving while talking to the teacher.

In this video sequence, because of the dark ambiance, signal to noise ratio is low and color artifacts are present on visual features edges because of the low quality image capture tool-chain.

an input video stream extract sample

Below is shown the retina foveal vision applied on the entire image. In the used retina configuration, global luminance is preserved and local contrasts are enhanced. Also, signal to noise ratio is improved : since high frequency spatio-temporal noise is reduced, enhanced details are not corrupted by any enhanced noise.

the retina Parvocellular output. Enhanced details, luminance adaptation and noise removal. A processing tool for image analysis.

Below is the output of the Magnocellular output of the retina model. Its signals are strong where transient events occur. Here, a student is moving at the bottom of the image thus generating high energy. The remaining of the image is static however, it is corrupted by a strong noise. Here, the retina filters out most of the noise thus generating low false motion area ‘alarms’. This channel can be used as a transient/moving areas detector : it would provide relevant information for a low cost segmentation tool that would highlight areas in which an event is occurring.

the retina Magnocellular output. Enhanced transient signals (motion, etc.). A preprocessing tool for event detection.

OpenCV Tutorials —— Discovering the human retina and its use for image processing