NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.4.0.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
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. More...

Functions

NppStatus nppiFilterHarrisCornersBorderGetBufferSize (NppiSize oSizeROI, int *hpBufferSize)
 Calculate scratch buffer size needed for the FilterHarrisCornersBorder function based on destination image SizeROI width and height. More...
 
NppStatus nppiFilterHarrisCornersBorder_8u32f_C1R_Ctx (const Npp8u *pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, NppiDifferentialKernel eFilterType, NppiMaskSize eMaskSize, NppiMaskSize eAvgWindowSize, Npp32f nK, Npp32f nScale, NppiBorderType eBorderType, Npp8u *pDeviceBuffer, NppStreamContext nppStreamCtx)
 1 channel 8-bit unsigned grayscale to 1 channel 32-bit floating point Harris corners response image with border control. More...
 
NppStatus nppiFilterHarrisCornersBorder_8u32f_C1R (const Npp8u *pSrc, int nSrcStep, NppiSize oSrcSize, NppiPoint oSrcOffset, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, NppiDifferentialKernel eFilterType, NppiMaskSize eMaskSize, NppiMaskSize eAvgWindowSize, Npp32f nK, Npp32f nScale, NppiBorderType eBorderType, Npp8u *pDeviceBuffer)
 

Detailed Description

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.

Function Documentation

NppStatus nppiFilterHarrisCornersBorder_8u32f_C1R ( const Npp8u pSrc,
int  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppiDifferentialKernel  eFilterType,
NppiMaskSize  eMaskSize,
NppiMaskSize  eAvgWindowSize,
Npp32f  nK,
Npp32f  nScale,
NppiBorderType  eBorderType,
Npp8u pDeviceBuffer 
)
NppStatus nppiFilterHarrisCornersBorder_8u32f_C1R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
NppiSize  oSrcSize,
NppiPoint  oSrcOffset,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppiDifferentialKernel  eFilterType,
NppiMaskSize  eMaskSize,
NppiMaskSize  eAvgWindowSize,
Npp32f  nK,
Npp32f  nScale,
NppiBorderType  eBorderType,
Npp8u pDeviceBuffer,
NppStreamContext  nppStreamCtx 
)

1 channel 8-bit unsigned grayscale to 1 channel 32-bit floating point Harris corners response image with border control.

Parameters
pSrcSource-Image Pointer.
nSrcStepSource-Image Line Step.
oSrcSizeSource image width and height in pixels relative to pSrc.
oSrcOffsetThe pixel offset that pSrc points to relative to the origin of the source image.
pDstoutput edge destination_image_pointer.
nDstStepoutput edge destination_image_line_step.
oSizeROIRegion-of-Interest (ROI).
eFilterTypeselects between Sobel or Scharr filter type.
eMaskSizefixed filter mask size to use (3x3 or 5x5 for Sobel).
eAvgWindowSizefixed window mask size to use (3x3 or 5x5).
nKHarris Corners constant (commonly used value is 0.04F).
nScaleoutput is scaled by this scale factor.
eBorderTypesource image border type to use use.
pDeviceBufferpointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHarrisCornersBorderGetBufferSize() above)
nppStreamCtxApplication Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiFilterHarrisCornersBorderGetBufferSize ( NppiSize  oSizeROI,
int *  hpBufferSize 
)

Calculate scratch buffer size needed for the FilterHarrisCornersBorder function based on destination image SizeROI width and height.

Parameters
oSizeROIRegion-of-Interest (ROI).
hpBufferSizeRequired buffer size. Important: hpBufferSize is a host pointer. Scratch Buffer and Host Pointer.
Returns
Image Data Related Error Codes, ROI Related Error Codes

Copyright © 2009-2020 NVIDIA Corporation