Show / Hide Table of Contents

    Class NPPNativeMethods.NPPi.GradientVectorScharrBorder

    RGB Color to Scharr Gradient Vector conversion using user selected fixed mask size and gradient distance method. Functions support up to 4 optional single channel output gradient vectors, X (vertical), Y (horizontal), magnitude, and angle with user selectable distance methods. Output for a particular vector is disabled by supplying a NULL pointer for that vector. X and Y gradient vectors are in cartesian form in the destination data type.
    Magnitude vectors are polar gradient form in the destination data type, angle is always in floating point polar gradient format. Only fixed mask sizes of 3x3 are supported. Only nppiNormL1 (sum) and nppiNormL2 (sqrt of sum of squares) distance methods are currently supported.

    Currently only the NPP_BORDER_REPLICATE border type operation is supported. Borderless output can be accomplished by using a larger source image than the destination and adjusting oSrcSize and oSrcOffset parameters accordingly.

    For the C1R versions of the function the pDstMag output image value for L1 normalization consists of the absolute value of the pDstX value plus the absolute value of the pDstY value at that particular image pixel location. For the C1R versions of the function the pDstMag output image value for L2 normalization consists of the square root of the pDstX value squared plus the pDstY value squared at that particular image pixel location. For the C1R versions of the function the pDstAngle output image value consists of the arctangent (atan2) of the pDstY value and the pDstX value at that particular image pixel location.

    For the C3C1R versions of the function, regardless of the selected normalization method, the L2 normalization value is first determined for each or the pDstX and pDstY values for each source channel then the largest L2 normalization value (largest gradient) is used to select which of the 3 pDstX channel values are output to the pDstX image or pDstY channel values are output to the pDstY image. For the C3C1R versions of the function the pDstMag output image value for L1 normalizaton consists of the same technique used for the C1R version for each source image channel. Then the largest L2 normalization value is again used to select which of the 3 pDstMag channel values to output to the pDstMag image. For the C3C1R versions of the function the pDstMag output image value for L2 normalizaton consists of just outputting the largest per source channel L2 normalization value to the pDstMag image. For the C3C1R versions of the function the pDstAngle output image value consists of the same technique used for the C1R version calculated for each source image channel. Then the largest L2 normalization value is again used to select which of the 3 angle values to output to the pDstAngle image.

    Inheritance
    System.Object
    NPPNativeMethods.NPPi.GradientVectorScharrBorder
    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 GradientVectorScharrBorder

    Methods

    nppiGradientVectorScharrBorder_16s32f_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    1 channel 16-bit signed packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_16s32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_16s32f_C3C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    3 channel 16-bit signed packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_16s32f_C3C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_16u32f_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    1 channel 16-bit unsigned packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_16u32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_16u32f_C3C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    3 channel 16-bit unsigned packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_16u32f_C3C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_32f_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    1 channel 32-bit floating point packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_32f_C3C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    3 channel 32-bit floating point packed RGB to optional 1 channel 32-bit floating point X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_32f_C3C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_8u16s_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    1 channel 8-bit unsigned packed RGB to optional 1 channel 16-bit signed X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_8u16s_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

    nppiGradientVectorScharrBorder_8u16s_C3C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, NppiSize, MaskSize, NppiNorm, NppiBorderType)

    3 channel 8-bit unsigned packed RGB to optional 1 channel 16-bit signed X (vertical), Y (horizontal), magnitude, and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.

    Declaration
    public static NppStatus nppiGradientVectorScharrBorder_8u16s_C3C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDstX, int nDstXStep, CUdeviceptr pDstY, int nDstYStep, CUdeviceptr pDstMag, int nDstMagStep, CUdeviceptr pDstAngle, int nDstAngleStep, NppiSize oSizeROI, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSrcSize

    Source image width and height in pixels relative to pSrc.

    NppiPoint oSrcOffset

    The pixel offset that pSrc points to relative to the origin of the source image.

    CUdeviceptr pDstX

    X vector destination_image_pointer

    System.Int32 nDstXStep

    X vector destination_image_line_step.

    CUdeviceptr pDstY

    Y vector destination_image_pointer.

    System.Int32 nDstYStep

    Y vector destination_image_line_step.

    CUdeviceptr pDstMag

    magnitude destination_image_pointer.

    System.Int32 nDstMagStep

    magnitude destination_image_line_step.

    CUdeviceptr pDstAngle

    angle destination_image_pointer.

    System.Int32 nDstAngleStep

    angle destination_image_line_step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    MaskSize eMaskSize

    fixed filter mask size to use.

    NppiNorm eNorm

    gradient distance method to use.

    NppiBorderType eBorderType

    The border type operation to be applied at source image border boundaries.

    Returns
    Type Description
    NppStatus

    StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError

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