Class NPPNativeMethods.NPPi.FilterHarrisCornersBorder
Performs Harris Corner detection on a single channel 8-bit grayscale image and outputs a single channel 32-bit floating point image consisting the corner response at each pixel of the image. The algorithm consists of two phases. The first phase generates the floating point product of XX, YY, and XY gradients at each pixel in the image. The type of gradient used is controlled by the eFilterType and eMaskSize parameters. The second phase averages those products over a window of either 3x3 or 5x5 pixels around the center pixel then generates the Harris corner response at that pixel which is output in the destination image. The Harris response value is determined as H = ((XX///YY - XY///XY) - (nK///((XX + YY)///(XX + YY))))///nScale.
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.
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class FilterHarrisCornersBorder
Methods
nppiFilterHarrisCornersBorder_8u32f_C1R(CUdeviceptr, Int32, NppiSize, NppiPoint, CUdeviceptr, Int32, NppiSize, DifferentialKernel, MaskSize, MaskSize, Single, Single, NppiBorderType, CUdeviceptr)
1 channel 8-bit unsigned grayscale to 1 channel 32-bit floating point Harris corners response image with border control.
Declaration
public static NppStatus nppiFilterHarrisCornersBorder_8u32f_C1R(CUdeviceptr pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, CUdeviceptr pDst, int nDstStep, NppiSize oSizeROI, DifferentialKernel eFilterType, MaskSize eMaskSize, MaskSize eAvgWindowSize, float nK, float nScale, NppiBorderType eBorderType, CUdeviceptr pDeviceBuffer)
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 | pDst | output edge destination_image_pointer. |
System.Int32 | nDstStep | output edge destination_image_line_step. |
NppiSize | oSizeROI | Region-of-Interest (ROI). |
DifferentialKernel | eFilterType | selects between Sobel or Scharr filter type. |
MaskSize | eMaskSize | fixed filter mask size to use (3x3 or 5x5 for Sobel). |
MaskSize | eAvgWindowSize | fixed window mask size to use (3x3 or 5x5). |
System.Single | nK | Harris Corners constant (commonly used value is 0.04F). |
System.Single | nScale | output is scaled by this scale factor. |
NppiBorderType | eBorderType | The border type operation to be applied at source image border boundaries. |
CUdeviceptr | pDeviceBuffer | pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHarrisCornersBorderGetBufferSize() above) |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |
nppiFilterHarrisCornersBorderGetBufferSize(NppiSize, ref Int32)
Calculate scratch buffer size needed for the FilterHarrisCornersBorder function based on destination image SizeROI width and height.
Declaration
public static NppStatus nppiFilterHarrisCornersBorderGetBufferSize(NppiSize oSizeROI, ref int hpBufferSize)
Parameters
Type | Name | Description |
---|---|---|
NppiSize | oSizeROI | Region-of-Interest (ROI). |
System.Int32 | hpBufferSize | Required buffer size. Important: hpBufferSize is a host pointer. \ref general_scratch_buffer. |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError |