RGB to XYZ color conversion.
More...
|
NppStatus |
nppiRGBToXYZ_8u_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
|
3 channel 8-bit unsigned packed RGB to 3 channel 8-bit unsigned packed XYZ color conversion. More...
|
|
NppStatus |
nppiRGBToXYZ_8u_C3R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI) |
|
NppStatus |
nppiRGBToXYZ_8u_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
|
4 channel 8-bit unsigned packed RGB with alpha to 4 channel 8-bit unsigned packed XYZ with alpha color conversion. More...
|
|
NppStatus |
nppiRGBToXYZ_8u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI) |
|
RGB to XYZ color conversion.
Here is how NPP converts gamma corrected RGB or BGR to XYZ.
*
Npp32f nX = 0.412453F * nNormalizedR + 0.35758F * nNormalizedG + 0.180423F * nNormalizedB;
* if (nX > 1.0F)
* nX = 1.0F;
*
Npp32f nY = 0.212671F * nNormalizedR + 0.71516F * nNormalizedG + 0.072169F * nNormalizedB;
* if (nY > 1.0F)
* nY = 1.0F;
*
Npp32f nZ = 0.019334F * nNormalizedR + 0.119193F * nNormalizedG + 0.950227F * nNormalizedB;
* if (nZ > 1.0F)
* nZ = 1.0F;
* X = (
Npp8u)(nX * 255.0F);
* Y = (
Npp8u)(nY * 255.0F);
* Z = (
Npp8u)(nZ * 255.0F);
*