Reinhard local filter

Description

Filter This filter is a tone-mapping filter. It compresses highlights and over-exposed zones of the image to improve its dynamic range. It detects dark and bright areas and applies different compressions to them, similarly to traditionnal dodging-and-burning photography techniques. This provides strong and efficient dynamic range compression, as well as HDR toning effects.

This filter uses complex zone detectione, which are expensive to compute. It may also introduce artifacts such as dark rings around bright areas. If you need a simpler and more conservative algorithm, try the Reinhard global filter.

This filter works both in XYZ and RGB color spaces. For RGB color spaces, it assumes sRGB color space as defined in IEC 61966-2-1:1999 for computing brightness, using the formula Y=0.2126*R+0.7152*G+0.0722*B

Input and output

Input channels must contain either X,Y,Z or R,G,B channels

Output channels are the same as input.

This filter does not alter the buffer dimensions.

Parameters

name type description
stops real The number of over-exposed EV stops to recover, between 0 and 16
strength real The highlight compression strength. A value of 0 will produce no effect, a value of 1 will produce maximum highlight compression

Ocean XML 3.0 example

<filter type="reinhardlocal" name="#" stops="4" strength="0.5"/>