java.lang.Object
imagingbook.common.color.adapt.BradfordAdaptation
- All Implemented Interfaces:
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[])
. The underlying linear transformation is specified by a 3x3 matrix, which
may be retrieved by getAdaptationMatrix()
). See Sec. 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 Summary
Modifier and TypeMethodDescriptiondouble[]
applyTo
(double[] XYZA) Double version ofChromaticAdaptation.applyTo(float[])
.float[]
applyTo
(float[] XYZA) Transforms the specified XYZ source color coordinates to target coordinates.double[][]
Returns the composite color adaptation transformation matrix.static BradfordAdaptation
getInstance
(double[] W1, double[] W2) Returns aBradfordAdaptation
instance for the specified white point coordinates.static BradfordAdaptation
getInstance
(Illuminant illum1, Illuminant illum2) Returns aBradfordAdaptation
instance for the specified illuminants (white points).static double[][]
getMCAT()
static double[][]
getMCATi()
static void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.common.color.adapt.ChromaticAdaptation
applyTo
-
Method Details
-
getInstance
Returns aBradfordAdaptation
instance for the specified white point coordinates.- Parameters:
W1
- source white point (to map from)W2
- target white point (to map to)- Returns:
- a
BradfordAdaptation
instance
-
getInstance
Returns aBradfordAdaptation
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
BradfordAdaptation
instance
-
getMCAT
-
getMCATi
-
applyTo
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 interfaceChromaticAdaptation
- Parameters:
XYZA
- 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
Description copied from interface:ChromaticAdaptation
Double version ofChromaticAdaptation.applyTo(float[])
.- Specified by:
applyTo
in interfaceChromaticAdaptation
- Parameters:
XYZA
- the original color point w.r.t. the source white point (W1)- Returns:
- the adapted color w.r.t. the target white point (W2).
-
getAdaptationMatrix
Returns the composite color adaptation transformation matrix.- Returns:
- the color adaptation transformation matrix
-
main
-