Learn R Programming

spacesXYZ (version 1.5-1)

CIECAM02fromXYZ: Compute CIECAM02 Quantities from XYZ

Description

CIECAM02 is a widely used Color Appearance Model. This function computes many of the quantities in this model from XYZ.

Usage

CIECAM02fromXYZ( XYZ, XYZ_w, L_A=100, Y_b=20, surround='Average', discount=TRUE )

Value

a data.frame with N rows and these columns:

XYZ

the input Nx3 matrix

h

hue angle, in degrees

J

correlate of Lightness

Q

correlate of Brightness

C

correlate of Chroma

M

correlate of Colorfulness

Jp

Lightness \(J'\) in CAM02-UCS space

abp

rectangular coordinates \((a',b')\) in CAM02-UCS space

The rownames are set to those of XYZ. The other function arguments (XYZ_w, ...) are attached to the data.frame as attributes.

Arguments

XYZ

a numeric Nx3 matrix with XYZ values in the rows. It can also be a vector that can be converted to such a matrix, by row.

XYZ_w

XYZ of the adapting white point. It should be scaled so that \(Y_w\)=100. All values must be positive. XYZ_w can also be a character string with the name of a standard illuminant, which is passed to standardXYZ() to get the XYZ.

L_A

absolute luminance of the adapting field.

Y_b

luminous factor of background.

surround

surround conditions, valid values are 'Average', 'Dim', 'Dark'. Matching is partial and caseless.

discount

whether or not observers are discounting the illuminant (color constancy is in effect).

Author

Glenn Davis

References

Fairchild, Mark D. CIECAM02. in Color Appearance Models (3rd ed.). pp. 287-302. John Wiley & Sons. 2013.

See Also

DeltaE_CAM02()

Examples

Run this code
CIECAM02fromXYZ( c(19.01,20,21.78), c(95.05,100,108.88), L_A=318.31 )
 
# XYZ.1 XYZ.2 XYZ.3        h        J        Q         C         M       Jp       abp.1       abp.2
# 19.01 20.00 21.78 219.0484 41.73109 195.3713 0.1047078 0.1088422 54.90433 -0.03666471 -0.02974185

Run the code above in your browser using DataLab