rgbwide2xyz
Description
specifies options using one or more name-value pair arguments.XYZ
= rgbwide2xyz(RGB
,BPS
,Name,Value
)
Examples
Convert Wide-Gamut RGB Values to CIE 1931 XYZ Values
Convert 10-bit BT.2020 RGB Green Value to XYZ
Create a wide-gamut RGB value for the color green.
rgbvalue = uint16([64 940 64]);
Convert the 10-bit BT.2020 RGB color value to an XYZ color value.
xyzvalue = rgbwide2xyz(rgbvalue,10);
Convert 12-bit BT.2100 RGB Blue Value to XYZ
Create a wide-gamut RGB color value for the color blue.
rgbvalue = uint16([64 64 940]);
Convert the 12-bit BT.2100 RGB value to an XYZ color value.
xyzvalue = rgbwide2xyz(rgbvalue,12,ColorSpace="BT.2100");
Convert 10-bit BT.2100 RGB White Value to XYZ Using HLG
Create a wide-gamut RGB value for the color white.
rgbvalue = uint16([940 940 940]);
Convert the 10-bit BT.2100 RGB color value to an XYZ color value, using the Hybrid Log Gamma (HLG) transfer function.
xyzvalue = rgbwide2xyz(rgbvalue,10,ColorSpace="BT.2100",LinearizationFcn="HLG");
Input Arguments
RGB
— Wide-gamut RGB color values
p-by-3 | m-by-n-by-3 numeric array | m-by-n-by-3-by-f numeric
array
Wide-gamut RGB color values, specified as one of the following:
p-by-3 numeric matrix of color values (one color per row)
m-by-n-by-3 numeric array representing an image
m-by-n-by-3-by-f numeric array representing a stack of images
The following table shows the data range for wide-gamut, integer color values for 10- and 12-bit data. The minimum value in the range maps to black, and the maximum value in the range maps to white. Only pixels with RGB values within the supported data range for wide-gamut values are guaranteed to be mapped to realizable colors.
Data Type | Full Data Range | Data Range for Wide-Gamut RGB |
---|---|---|
10-bit | [0, 1023] | [64, 940] |
12-bit | [0, 4095] | [256, 3760] |
Data Types: uint16
BPS
— Bits per sample for each channel of input image
10
| 12
Bits per sample for each channel of the input wide-gamut RGB image, specified as
10
or 12
.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: xyzvalue = rgbwide2xyz(rgbvalue,12,ColorSpace="BT.2100");
specifies the color space of the wide-gamut RGB values as
"BT.2100"
.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: xyzvalue = rgbwide2xyz(rgbvalue,12,"ColorSpace","BT.2100");
specifies the color space of the wide-gamut RGB values as
"BT.2100"
.
ColorSpace
— Color space of wide-gamut RGB values
"BT.2020"
(default) | "BT.2100"
Color space of the wide-gamut RGB values, specified as
"BT.2020"
or "BT.2100"
.
Data Types: char
| string
WhitePoint
— Reference white point
"d65"
(default) | "a"
| "c"
| "d50"
| "d55"
| "icc"
| "e"
| 3-element row vector
Reference white point, specified as a 3-element row vector or one of the CIE standard illuminants listed in the table.
Value | White Point |
---|---|
"a" | CIE standard illuminant A, |
"c" | CIE standard illuminant C, [0.9807, 1.0000, 1.1822] . Simulates average or
north sky daylight with correlated color temperature of 6774 K. Deprecated by
CIE. |
"e" | Equal-energy radiator, [1.000, 1.000, 1.000] . Useful as a theoretical
reference. |
"d50" | CIE standard illuminant D50, [0.9642, 1.0000, 0.8251] .
Simulates warm daylight at sunrise or sunset with correlated color
temperature of 5003 K. Also known as horizon light. |
| CIE standard illuminant D55, |
"d65" | CIE standard illuminant D65, [0.9504, 1.0000, 1.0888] . Simulates noon
daylight with correlated color temperature of 6504 K. |
"icc" | Profile Connection Space (PCS) illuminant used in ICC profiles. Approximation of
[0.9642, 1.000, 0.8249] using fixed-point, signed, 32-bit
numbers with 16 fractional bits. Actual value: [31595,32768,
27030]/32768 . |
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| char
| string
LinearizationFcn
— Transfer function for transformation
"PQ"
(default) | "HLG"
Transfer function for transformation, specified as one of these values:
Value | Description |
---|---|
"PQ" | Perceptual Quantization |
"HLG" | Hybrid Log Gamma |
Data Types: char
| string
Output Arguments
XYZ
— Values in CIE 1931 XYZ color space
numeric array
Values in the CIE 1931 XYZ color space, returned as a numeric array of the same size
as the RGB
input color values.
Data Types: double
References
[1] Rec. ITU-R BT.2020-2 (10/2015). "Parameter values for ultra-high definition television systems for production and international programme exchange." International Telecommunication Union; Broadcasting service (television). https://www.itu.int/rec/R-REC-BT.2020.
[2] Rec. ITU-R BT.2100-2 (07/2018). "Image parameter values for dynamic range television for use in production and international programme exchange." International Telecommunication Union; Broadcasting service (television). https://www.itu.int/rec/R-REC-BT.2100.
[3] Rec. ITU-R BT.2390-7 (07/2019). "High dynamic range television for production and international programme exchange." International Telecommunication Union; Broadcasting service (television). https://www.itu.int/pub/R-REP-BT.2390.
Version History
Introduced in R2020b
See Also
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)