Qualpal
Repositories

qualpal::metrics::DIN99d

C++ · cpp · 4.1.0

class qualpal::metrics::DIN99d

DIN99d color difference metric with optional power transformation.

Computes the Euclidean distance between two colors in DIN99d color space. Optionally applies a power transformation for improved perceptual uniformity.

Template parameters

ColorType1, ColorType2

Any color type convertible to colors::DIN99d.

Parameters

use_power_transform

Whether to apply power transformation (default: true).

power

Power value for transformation (default: 0.74).

scale

Scale factor after transformation (default: 1.28).

See also

qualpal::colors::DIN99d

Methods

DIN99d

explicit inline DIN99d(bool use_power_transform = true, double power = 0.74, double scale = 1.28)

Construct DIN99d metric with configurable parameters.

Parameters

use_power_transform

Whether to apply power transformation (default: true)

power

Power value for transformation (default: 0.74)

scale

Scale factor after transformation (default: 1.28)

operator()

template<typename ColorType1, typename ColorType2> inline double operator()(const ColorType1 & c1, const ColorType2 & c2) const

Calculate color difference between two colors.

Template parameters

ColorType1

Any color class that can be converted to colors::DIN99d

ColorType2

Any color class that can be converted to colors::DIN99d

Parameters

c1

First color

c2

Second color

Returns

Color difference value (Delta E in DIN99d space)