All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
FilterHarrisCornersBorder
Computer Vision

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

  pSrc | Source-Image Pointer.
  nSrcStep | Source-Image Line Step.
  oSrcSize | Source image width and height in pixels relative to pSrc.
  oSrcOffset | The pixel offset that pSrc points to relative to the origin of the source image.
  pDst | output edge destination_image_pointer.
  nDstStep | output edge destination_image_line_step.
  oSizeROI | Region-of-Interest (ROI).
  eFilterType | selects between Sobel or Scharr filter type.
  eMaskSize | fixed filter mask size to use (3x3 or 5x5 for Sobel).
  eAvgWindowSize | fixed window mask size to use (3x3 or 5x5).
  nK | Harris Corners constant (commonly used value is 0.04F).
  nScale | output is scaled by this scale factor.
  eBorderType | source image border type to use use.
  pDeviceBuffer | pointer to scratch DEVICE memory buffer of size hpBufferSize (see nppiFilterHarrisCornersBorderGetBufferSize() above)
  nppStreamCtx | Application 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

  oSizeROI | Region-of-Interest (ROI).
  hpBufferSize | Required 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