OpenCV for Unity  2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping Class Reference

a wrapper class which allows the tone mapping algorithm of Meylan&al(2007) to be used with OpenCV. More...

Inheritance diagram for OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping:
OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

void applyFastToneMapping (Mat inputImage, Mat outputToneMappedImage)
 applies a luminance correction (initially High Dynamic Range (HDR) tone mapping) More...
 
void setup (float photoreceptorsNeighborhoodRadius, float ganglioncellsNeighborhoodRadius, float meanLuminanceModulatorK)
 updates tone mapping behaviors by adjusing the local luminance computation area More...
 
void setup (float photoreceptorsNeighborhoodRadius, float ganglioncellsNeighborhoodRadius)
 updates tone mapping behaviors by adjusing the local luminance computation area More...
 
void setup (float photoreceptorsNeighborhoodRadius)
 updates tone mapping behaviors by adjusing the local luminance computation area More...
 
void setup ()
 updates tone mapping behaviors by adjusing the local luminance computation area More...
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
void save (string filename)
 
virtual string getDefaultName ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new RetinaFastToneMapping __fromPtr__ (IntPtr addr)
 
static RetinaFastToneMapping create (Size inputSize)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

a wrapper class which allows the tone mapping algorithm of Meylan&al(2007) to be used with OpenCV.

This algorithm is already implemented in thre Retina class (retina::applyFastToneMapping) but used it does not require all the retina model to be allocated. This allows a light memory use for low memory devices (smartphones, etc. As a summary, these are the model properties:

for more information, read to the following papers : Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816Benoit A., Caplier A., Durette B., Herault, J., "USING HUMAN VISUAL SYSTEM MODELING FOR BIO-INSPIRED LOW LEVEL IMAGE PROCESSING", Elsevier, Computer Vision and Image Understanding 114 (2010), pp. 758-773, DOI: http://dx.doi.org/10.1016/j.cviu.2010.01.011 regarding spatio-temporal filter and the bigger retina model : Vision: Images, Signals and Neural Networks: Models of Neural Processing in Visual Perception (Progress in Neural Processing),By: Jeanny Herault, ISBN: 9814273686. WAPI (Tower ID): 113266891.

Member Function Documentation

◆ __fromPtr__()

static new RetinaFastToneMapping OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.__fromPtr__ ( IntPtr  addr)
static

◆ applyFastToneMapping()

void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.applyFastToneMapping ( Mat  inputImage,
Mat  outputToneMappedImage 
)

applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)

using only the 2 local adaptation stages of the retina parvocellular channel : photoreceptors level and ganlion cells level. Spatio temporal filtering is applied but limited to temporal smoothing and eventually high frequencies attenuation. This is a lighter method than the one available using the regular retina::run method. It is then faster but it does not include complete temporal filtering nor retina spectral whitening. Then, it can have a more limited effect on images with a very high dynamic range. This is an adptation of the original still image HDR tone mapping algorithm of David Alleyson, Sabine Susstruck and Laurence Meylan's work, please cite: -> Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816

Parameters
inputImagethe input image to process RGB or gray levels
outputToneMappedImagethe output tone mapped image

◆ create()

static RetinaFastToneMapping OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.create ( Size  inputSize)
static

◆ Dispose()

override void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.Dispose ( bool  disposing)
protectedvirtual

◆ setup() [1/4]

void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.setup ( float  photoreceptorsNeighborhoodRadius,
float  ganglioncellsNeighborhoodRadius,
float  meanLuminanceModulatorK 
)

updates tone mapping behaviors by adjusing the local luminance computation area

Parameters
photoreceptorsNeighborhoodRadiusthe first stage local adaptation area
ganglioncellsNeighborhoodRadiusthe second stage local adaptation area
meanLuminanceModulatorKthe factor applied to modulate the meanLuminance information (default is 1, see reference paper)

◆ setup() [2/4]

void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.setup ( float  photoreceptorsNeighborhoodRadius,
float  ganglioncellsNeighborhoodRadius 
)

updates tone mapping behaviors by adjusing the local luminance computation area

Parameters
photoreceptorsNeighborhoodRadiusthe first stage local adaptation area
ganglioncellsNeighborhoodRadiusthe second stage local adaptation area
meanLuminanceModulatorKthe factor applied to modulate the meanLuminance information (default is 1, see reference paper)

◆ setup() [3/4]

void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.setup ( float  photoreceptorsNeighborhoodRadius)

updates tone mapping behaviors by adjusing the local luminance computation area

Parameters
photoreceptorsNeighborhoodRadiusthe first stage local adaptation area
ganglioncellsNeighborhoodRadiusthe second stage local adaptation area
meanLuminanceModulatorKthe factor applied to modulate the meanLuminance information (default is 1, see reference paper)

◆ setup() [4/4]

void OpenCVForUnity.BioinspiredModule.RetinaFastToneMapping.setup ( )

updates tone mapping behaviors by adjusing the local luminance computation area

Parameters
photoreceptorsNeighborhoodRadiusthe first stage local adaptation area
ganglioncellsNeighborhoodRadiusthe second stage local adaptation area
meanLuminanceModulatorKthe factor applied to modulate the meanLuminance information (default is 1, see reference paper)

The documentation for this class was generated from the following file: