Table of Contents

Class TonemapDurand

Namespace
OpenCvSharp.XPhoto
Assembly
OpenCvSharp.dll

This algorithm decomposes image into two layers: base layer and detail layer using bilateral filter and compresses contrast of the base layer thus preserving all the details.

This implementation uses regular bilateral filter from OpenCV.

Saturation enhancement is possible as in cv::TonemapDrago.

For more information see @cite DD02 .

public sealed class TonemapDurand : Tonemap, IDisposable, ICvPtrHolder
Inheritance
TonemapDurand
Implements
Inherited Members

Properties

Contrast

Gets or sets resulting contrast on logarithmic scale, i. e. log(max / min), where max and min

public float Contrast { get; set; }

Property Value

float

Saturation

Gets or sets positive saturation enhancement value. 1.0 preserves saturation, values greater than 1 increase saturation and values less than 1 decrease it.

public float Saturation { get; set; }

Property Value

float

SigmaColor

Gets or sets bilateral filter sigma in color space

public float SigmaColor { get; set; }

Property Value

float

SigmaSpace

Gets or sets bilateral filter sigma in coordinate space

public float SigmaSpace { get; set; }

Property Value

float

Methods

Create(float, float, float, float, float)

Creates TonemapDurand object

public static TonemapDurand Create(float gamma = 1, float contrast = 4, float saturation = 1, float sigmaSpace = 2, float sigmaColor = 2)

Parameters

gamma float

positive 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.

contrast float

resulting contrast on logarithmic scale, i. e. log(max / min), where max and min

saturation float

positive saturation enhancement value. 1.0 preserves saturation, values greater than 1 increase saturation and values less than 1 decrease it.

sigmaSpace float

bilateral filter sigma in coordinate space

sigmaColor float

bilateral filter sigma in color space

Returns

TonemapDurand

DisposeManaged()

Releases managed resources

protected override void DisposeManaged()