Show / Hide Table of Contents

    Class NPPNativeMethods.NPPi.FilterHoughLine

    Extracts Hough lines from a single channel 8-bit binarized (0, 255) source feature (canny edges, etc.) image and outputs a list of lines in point polar format representing the length(rho) and angle(theta) of each line from the origin of the normal to the line using the formula rho = x cos(theta) + y sin(theta). The level of discretization, nDelta, is specified as an input parameter.The performance and effectiveness of this function highly depends on this parameter with higher performance for larger numbers and more detailed results for lower numbers. Also, lines are not guaranteed to be added to the pDeviceLines list in the same order from one call to the next. However, all of the same lines will still be generated as long as nMaxLineCount is set large enough so that they all can fit in the list. To convert lines in point polar format back to cartesian lines use the following formula:

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

    Methods

    nppiFilterHoughLine_8u32f_C1R(CUdeviceptr, Int32, NppiSize, NppPointPolar, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr)

    1 channel 8-bit unsigned binarized (0, 255) source feature (canny edges, etc.) source image to list of lines in point polar format representing the length (rho) and angle (theta) of each line from the origin of the normal to the line using the formula rho = x cos(theta) + y sin(theta). The level of discretization, nDelta, is specified as an input parameter. The performance and effectiveness of this function highly depends on this parameter with higher performance for larger numbers and more detailed results for lower numbers. nDelta must have the same values as those used in the nppiFilterHoughLineGetBufferSize() function call.

    Declaration
    public static NppStatus nppiFilterHoughLine_8u32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSizeROI, NppPointPolar nDelta, int nThreshold, CUdeviceptr pDeviceLines, int nMaxLineCount, CUdeviceptr pDeviceLineCount, CUdeviceptr pDeviceBuffer)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    NppPointPolar nDelta

    Discretization steps, range 0.0F < radial increment nDelta.rho < 3.0F, 1.0F recommended, range 0.25F < angular increment nDelta.theta < 3.0F, 1.0F recommended.

    System.Int32 nThreshold

    Minimum number of points to accept a line.

    CUdeviceptr pDeviceLines

    Device pointer to (nMaxLineCount * sizeof(NppPointPolar) line objects.

    System.Int32 nMaxLineCount

    The maximum number of lines to output.

    CUdeviceptr pDeviceLineCount

    The number of lines detected by this function up to nMaxLineCount.

    CUdeviceptr pDeviceBuffer

    pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHoughLineGetBufferSize() above)

    Returns
    Type Description
    NppStatus

    nppiFilterHoughLineGetBufferSize(NppiSize, NppPointPolar, Int32, ref Int32)

    Calculate scratch buffer size needed for the FilterHoughLine or FilterHoughLineRegion functions based on destination image SizeROI width and height and nDelta parameters.

    Declaration
    public static NppStatus nppiFilterHoughLineGetBufferSize(NppiSize oSizeROI, NppPointPolar nDelta, int nMaxLineCount, ref int hpBufferSize)
    Parameters
    Type Name Description
    NppiSize oSizeROI

    Region-of-Interest (ROI).

    NppPointPolar nDelta

    rho radial increment and theta angular increment that will be used in the FilterHoughLine or FilterHoughLineRegion function call.

    System.Int32 nMaxLineCount

    The maximum number of lines expected from the FilterHoughLine or FilterHoughLineRegion function call.

    System.Int32 hpBufferSize

    Required buffer size in bytes. Important: hpBufferSize is a

    Returns
    Type Description
    NppStatus

    nppiFilterHoughLineRegion_8u32f_C1R(CUdeviceptr, Int32, NppiSize, NppPointPolar, Int32, CUdeviceptr, NppPointPolar[], Int32, CUdeviceptr, CUdeviceptr)

    1 channel 8-bit unsigned binarized (0, 255) source feature (canny edges, etc.) source image to list of lines in point polar format representing the length (rho) and angle (theta) of each line from the origin of the normal to the line using the formula rho = x cos(theta) + y sin(theta). The level of discretization, nDelta, is specified as an input parameter. The performance and effectiveness of this function highly depends on this parameter with higher performance for larger numbers and more detailed results for lower numbers. nDelta must have the same values as those used in the nppiFilterHoughLineGetBufferSize() function call. The oDstROI region limits are used to limit accepted lines to those that fall within those limits.

    Declaration
    public static NppStatus nppiFilterHoughLineRegion_8u32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSizeROI, NppPointPolar nDelta, int nThreshold, CUdeviceptr pDeviceLines, NppPointPolar[] oDstROI, int nMaxLineCount, CUdeviceptr pDeviceLineCount, CUdeviceptr pDeviceBuffer)
    Parameters
    Type Name Description
    CUdeviceptr pSrc

    Source-Image Pointer.

    System.Int32 nSrcStep

    Source-Image Line Step.

    NppiSize oSizeROI

    Region-of-Interest (ROI).

    NppPointPolar nDelta

    Discretization steps, range 0.0F < radial increment nDelta.rho < 3.0F, 1.0F recommended, range 0.25F < angular increment nDelta.theta < 3.0F, 1.0F recommended.

    System.Int32 nThreshold

    Minimum number of points to accept a line.

    CUdeviceptr pDeviceLines

    Device pointer to (nMaxLineCount * sizeof(NppPointPolar) line objects.

    NppPointPolar[] oDstROI

    Region limits with oDstROI[0].rho <= accepted rho <= oDstROI[1].rho and oDstROI[0].theta <= accepted theta <= oDstROI[1].theta.

    System.Int32 nMaxLineCount

    The maximum number of lines to output.

    CUdeviceptr pDeviceLineCount

    The number of lines detected by this function up to nMaxLineCount.

    CUdeviceptr pDeviceBuffer

    pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHoughLineGetBufferSize() above)

    Returns
    Type Description
    NppStatus
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX