Class Tonemap
Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range.
public class Tonemap : UnmanagedObject, IDisposable, IAlgorithm
- Inheritance
-
Tonemap
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Tonemap(nint, nint)
Default constructor that creates empty Tonemap
protected Tonemap(nint ptr, nint tonemapPtr)
Parameters
Tonemap(float)
Creates simple linear mapper with gamma correction.
public Tonemap(float gamma = 1)
Parameters
gamma
floatpositive value for gamma correction. Gamma value of 1.0 implies no correction, gamma equal to 2.2f is suitable for most displays. Generally gamma > 1 brightens the image and gamma < 1 darkens it.
Fields
_algorithmPtr
The pointer to the unmanaged Algorithm object
protected nint _algorithmPtr
Field Value
_tonemapPtr
The pointer to the unmanaged Tonemap object
protected nint _tonemapPtr
Field Value
Properties
AlgorithmPtr
The pointer to the unamanged Algorith object
public nint AlgorithmPtr { get; }
Property Value
Gamma
Positive value for gamma correction. Gamma value of 1.0 implies no correction, gamma equal to 2.2f is suitable for most displays.
public float Gamma { get; set; }
Property Value
Methods
DisposeObject()
Release the unmanaged memory associated with this Tonemap
protected override void DisposeObject()
Process(IInputArray, IOutputArray)
Tonemaps image.
public void Process(IInputArray src, IOutputArray dst)
Parameters
src
IInputArraySource image - 32-bit 3-channel Mat
dst
IOutputArraydestination image - 32-bit 3-channel Mat with values in [0, 1] range