Visible to Intel only — GUID: GUID-F0A3F7EC-CAEA-4A4C-A645-4F1A2001A9A1
Visible to Intel only — GUID: GUID-F0A3F7EC-CAEA-4A4C-A645-4F1A2001A9A1
LUVToRGB, LUVToBGR
Converts a LUV image to the RGB or BGR color model.
Syntax
Case 1: LUV to RGB
IppStatus ippiLUVToRGB_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C3R | 16u_C3R | 16s_C3R | 32f_C3R |
8u_AC4R | 16u_AC4R | 16s_AC4R | 32f_AC4R |
Case 2: LUV to BGR
IppStatus ippiLUVToBGR_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);
Supported values for mod:
8u_C3R | 32f_C3R |
Include Files
ippcc.h
Domain Dependencies
Headers: ippcore.h, ippvm.h, ipps.h, ippi.h
Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib
Parameters
pSrc |
Pointer to the source image ROI. |
srcStep |
Distance in bytes between starts of consecutive lines in the source image. |
pDst |
Pointer to the destination image ROI. |
dstStep |
Distance in bytes between starts of consecutive lines in the destination image. |
roiSize |
Size of the source and destination ROI in pixels. |
Description
This function operates with ROI (see Regions of Interest in Intel IPP ).
This function converts the CIE LUV image pSrc to the RGB or BGR image pDst in two steps. First, the conversion is carried out into CIE XYZ format.
To accomplish it, LUV components are transformed back into their original range. This is done for different data types in the following way.
For 8u data type:
L = L * 100./ IPP_MAX_8U
U = (U * 354./ IPP_MAX_8U) - 134.
V = (V * 262./ IPP_MAX_8U) - 140.
For 16u data type:
L = L * 100./ IPP_MAX_16U
U = (U * 354./ IPP_MAX_16U) - 134.
V = (V * 262./ IPP_MAX_16U) - 140.
For 16s data type:
L = (L - IPP_MIN_16S)* 100./ IPP_MAX_16U
U = ((U - IPP_MIN_16S)* 354./ IPP_MAX_16U) - 134.
V = ((V - IPP_MIN_16S) * 262./ IPP_MAX_16U) - 140.
After that, conversion to XYZ format takes place as follows:
Y = Yn * ((L + 16.) / 116.)**3.
X = -9.* Y * u / ((u - 4.)* v - u* v )
Z = (9.* Y - 15*v*Y - v*X) / 3. * v
where
u = U / (13.* L) + un
v = V / (13.* L) + vn
and
un = 4.*xn / (-2.*xn + 12.*yn + 3.)
vn = 9.*yn / (-2.*xn + 12.*yn + 3.)
Here xn = 0.312713, yn = 0.329016 are the CIE chromaticity coordinates of the D65 white point, and Yn = 1.0 is the luminance of the D65 white point.
After this intermediate conversion is done, the obtained XYZ image is then converted to the destination RGB or BGR format using equations defined for the ippiXYZToRGB function.
Return Values
ippStsNoErr |
Indicates no error. Any other value indicates an error. |
ippStsNullPtrErr |
Indicates an error condition if pSrc or pDst is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with a zero or negative value. |