NVIDIA Performance Primitives (NPP)
Version 9.2
|
Extracts Hough lines from a single channel 8-bit binarized (0, 255) source feature (canny edges, etc.) image. More...
Functions | |
NppStatus | nppiFilterHoughLineGetBufferSize (NppiSize oSizeROI, NppPointPolar nDelta, int nMaxLineCount, int *hpBufferSize) |
Calculate scratch buffer size needed for the FilterHoughLine or FilterHoughLineRegion functions based on destination image SizeROI width and height and nDelta parameters. More... |
|
NppStatus | nppiFilterHoughLine_8u32f_C1R (const Npp8u *pSrc, int nSrcStep, NppiSize oSizeROI, NppPointPolar nDelta, int nThreshold, NppPointPolar *pDeviceLines, int nMaxLineCount, int *pDeviceLineCount, Npp8u *pDeviceBuffer) |
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). More... |
|
NppStatus | nppiFilterHoughLineRegion_8u32f_C1R (const Npp8u *pSrc, int nSrcStep, NppiSize oSizeROI, NppPointPolar nDelta, int nThreshold, NppPointPolar *pDeviceLines, NppPointPolar oDstROI[2], int nMaxLineCount, int *pDeviceLineCount, Npp8u *pDeviceBuffer) |
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). More... |
|
Extracts Hough lines from a single channel 8-bit binarized (0, 255) source feature (canny edges, etc.) image.
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:
NppStatus nppiFilterHoughLine_8u32f_C1R | ( | const Npp8u * | pSrc, |
int | nSrcStep, | ||
NppiSize | oSizeROI, | ||
NppPointPolar | nDelta, | ||
int | nThreshold, | ||
NppPointPolar * | pDeviceLines, | ||
int | nMaxLineCount, | ||
int * | pDeviceLineCount, | ||
Npp8u * | pDeviceBuffer | ||
) |
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.
pSrc | Source-Image Pointer. |
nSrcStep | Source-Image Line Step. |
oSizeROI | Region-of-Interest (ROI). |
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. |
nThreshold | Minimum number of points to accept a line. |
pDeviceLines | Device pointer to (nMaxLineCount * sizeof(NppPointPolar) line objects. |
nMaxLineCount | The maximum number of lines to output. |
pDeviceLineCount | The number of lines detected by this function up to nMaxLineCount. |
pDeviceBuffer | pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHoughLineGetBufferSize() above) |
NppStatus nppiFilterHoughLineGetBufferSize | ( | NppiSize | oSizeROI, |
NppPointPolar | nDelta, | ||
int | nMaxLineCount, | ||
int * | hpBufferSize | ||
) |
Calculate scratch buffer size needed for the FilterHoughLine or FilterHoughLineRegion functions based on destination image SizeROI width and height and nDelta parameters.
oSizeROI | Region-of-Interest (ROI). |
nDelta | rho radial increment and theta angular increment that will be used in the FilterHoughLine or FilterHoughLineRegion function call. |
nMaxLineCount | The maximum number of lines expected from the FilterHoughLine or FilterHoughLineRegion function call. |
hpBufferSize | Required buffer size in bytes. Important: hpBufferSize is a host pointer. Scratch Buffer and Host Pointer. |
NppStatus nppiFilterHoughLineRegion_8u32f_C1R | ( | const Npp8u * | pSrc, |
int | nSrcStep, | ||
NppiSize | oSizeROI, | ||
NppPointPolar | nDelta, | ||
int | nThreshold, | ||
NppPointPolar * | pDeviceLines, | ||
NppPointPolar | oDstROI[2], | ||
int | nMaxLineCount, | ||
int * | pDeviceLineCount, | ||
Npp8u * | pDeviceBuffer | ||
) |
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.
pSrc | Source-Image Pointer. |
nSrcStep | Source-Image Line Step. |
oSizeROI | Region-of-Interest (ROI). |
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. |
nThreshold | Minimum number of points to accept a line. |
pDeviceLines | Device pointer to (nMaxLineCount * sizeof(NppPointPolar) line objects. |
oDstROI | Region limits with oDstROI[0].rho <= accepted rho <= oDstROI[1].rho and oDstROI[0].theta <= accepted theta <= oDstROI[1].theta. |
nMaxLineCount | The maximum number of lines to output. |
pDeviceLineCount | The number of lines detected by this function up to nMaxLineCount. |
pDeviceBuffer | pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHoughLineGetBufferSize() above) |