# Reinhard global filter¶

## Description¶

This filter is a tone-mapping filter. It compresses highlights and over-exposed pixels of the image to improve its dynamic range, in a similar way to film or digital cameras. When using strong correction parameters, the effect can be much more powerful than cameras, because ocean’s virtual sensor has virtually infinite dynamic range. Too strong correction parameters may produce unnatural results, such as washed-out highlights.

This filter applies the same brightness correction curve to the whole image, which means it does not adapt its parameter locally to brightness zones. If you need a filter that detects dark and bright areas, and apply different compression curves to them, try the Reinhard local 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.2126R+0.7152G+0.0722B

## Input and output¶

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

• Output channels are the same as input.

• Does not alter the buffer dimensions

• Removes denoising meta-data

## 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="reinhardglobal" name="#" stops="3" strength="0.8"/>