Class XYZscalingAdaptation

java.lang.Object
imagingbook.common.color.adapt.XYZscalingAdaptation
All Implemented Interfaces:
ChromaticAdaptation

public class XYZscalingAdaptation extends Object implements ChromaticAdaptation

This class represents a linear chromatic adaptation transform, mapping XYZ color coordinates from a source white (reference) point to a target white point. Both white points are passed to the constructor. The actual color mapping is done by method applyTo(float[]). See the Section 14.6 of [1] for additional details and examples.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/11/14
See Also:
  • Method Details

    • getInstance

      public static XYZscalingAdaptation getInstance(double[] W1, double[] W2)
      Returns a XYZscalingAdaptation instance for the specified white point coordinates.
      Parameters:
      W1 - source white point (to map from)
      W2 - target white point (to map to)
      Returns:
      a XYZscalingAdaptation instance
    • getInstance

      public static XYZscalingAdaptation getInstance(Illuminant illum1, Illuminant illum2)
      Returns a XYZscalingAdaptation instance for the specified illuminants (white points).
      Parameters:
      illum1 - source illuminant (white point to map from)
      illum2 - target illuminant (white point to map to)
      Returns:
      a XYZscalingAdaptation instance
    • applyTo

      public float[] applyTo(float[] XYZ1)
      Description copied from interface: ChromaticAdaptation
      Transforms the specified XYZ source color coordinates to target coordinates. The specified color coordinates are interpreted relative to (source) white point (W1). Returns a new color adapted to (target) white point W2.
      Specified by:
      applyTo in interface ChromaticAdaptation
      Parameters:
      XYZ1 - the original color point w.r.t. the source white point (W1)
      Returns:
      the adapted color w.r.t. the target white point (W2).
    • applyTo

      public double[] applyTo(double[] XYZ1)
      Description copied from interface: ChromaticAdaptation
      Specified by:
      applyTo in interface ChromaticAdaptation
      Parameters:
      XYZ1 - the original color point w.r.t. the source white point (W1)
      Returns:
      the adapted color w.r.t. the target white point (W2).