Show / Hide Table of Contents

    Class NPPNativeMethods.NPPi.BGRToYUV

    BGR to YUV color conversion.

    Here is how NPP converts gamma corrected RGB or BGR to YUV.

    For digital RGB values in the range [0..255], Y has the range [0..255], U varies in the range [-112..+112], and V in the range [-157..+157].

    To fit in the range of [0..255], a constant value of 128 is added to computed U and V values, and V is then saturated.

    Npp32f nY = 0.299F * R + 0.587F * G + 0.114F * B;

    Npp32f nU = (0.492F * ((Npp32f)nB - nY)) + 128.0F;

    Npp32f nV = (0.877F * ((Npp32f)nR - nY)) + 128.0F;

    if (nV > 255.0F) nV = 255.0F;

    Inheritance
    System.Object
    NPPNativeMethods.NPPi.BGRToYUV
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda.NPP
    Assembly: NPP.dll
    Syntax
    public static class BGRToYUV

    Methods

    nppiBGRToYUV_8u_AC4P4R(CUdeviceptr, Int32, CUdeviceptr[], Int32, NppiSize)

    4 channel 8-bit unsigned packed BGR with alpha to 4 channel 8-bit unsigned planar YUV color conversion with alpha. images.

    Declaration
    public static NppStatus nppiBGRToYUV_8u_AC4P4R(CUdeviceptr pSrc, int nSrcStep, CUdeviceptr[] pDst, int nDstStep, NppiSize oSizeROI)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    CUdeviceptr[] pDst

    \ref destination_planar_image_pointer_array.

    System.Int32 nDstStep

    Destination-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiBGRToYUV_8u_AC4R(CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize)

    4 channel 8-bit unsigned packed BGR with alpha to 4 channel 8-bit unsigned packed YUV color conversion with alpha, not affecting alpha. images.

    Declaration
    public static NppStatus nppiBGRToYUV_8u_AC4R(CUdeviceptr pSrc, int nSrcStep, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    CUdeviceptr pDst

    Destination-Image Pointer.

    System.Int32 nDstStep

    Destination-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiBGRToYUV_8u_C3P3R(CUdeviceptr, Int32, CUdeviceptr[], Int32, NppiSize)

    3 channel 8-bit unsigned packed BGR to 3 channel 8-bit unsigned planar YUV color conversion.

    Declaration
    public static NppStatus nppiBGRToYUV_8u_C3P3R(CUdeviceptr pSrc, int nSrcStep, CUdeviceptr[] pDst, int nDstStep, NppiSize oSizeROI)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    CUdeviceptr[] pDst

    \ref destination_planar_image_pointer_array.

    System.Int32 nDstStep

    Destination-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiBGRToYUV_8u_C3R(CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize)

    3 channel 8-bit unsigned packed BGR to 3 channel 8-bit unsigned packed YUV color conversion.

    Declaration
    public static NppStatus nppiBGRToYUV_8u_C3R(CUdeviceptr pSrc, int nSrcStep, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    CUdeviceptr pDst

    Destination-Image Pointer.

    System.Int32 nDstStep

    Destination-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiBGRToYUV_8u_P3R(CUdeviceptr[], Int32, CUdeviceptr[], Int32, NppiSize)

    3 channel 8-bit unsigned planar BGR to 3 channel 8-bit unsigned planar YUV color conversion.

    Declaration
    public static NppStatus nppiBGRToYUV_8u_P3R(CUdeviceptr[] pSrc, int nSrcStep, CUdeviceptr[] pDst, int nDstStep, NppiSize oSizeROI)
    Parameters
    Type Name Description
    CUdeviceptr[] pSrc

    \ref source_planar_image_pointer_array.

    System.Int32 nSrcStep

    Source-Image Line Step.

    CUdeviceptr[] pDst

    \ref destination_planar_image_pointer_array.

    System.Int32 nDstStep

    Destination-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX