CompressMarkerLabels
Computer Vision

Removes sparseness between marker label IDs output from LabelMarkers call. More...

## CompressMarkerLabelsGetBufferSize

Before calling any of the CompressMarkerLabels functions the application first needs to call the corresponding CompressMarkerLabelsGetBufferSize function to determine the amount of device memory to allocate as a working buffer. The application allocated device memory is then passed as the pBuffer parameter to the corresponding CompressMarkerLabels function.
NppStatus | nppiCompressMarkerLabelsGetBufferSize_8u_C1R (int nStartingNumber, int *hpBufferSize)
| Calculate scratch buffer size needed for 1 channel 8-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call. More...
NppStatus | nppiCompressMarkerLabelsGetBufferSize_32u8u_C1R (int nStartingNumber, int *hpBufferSize)
| Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer to 8-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call. More...
NppStatus | nppiCompressMarkerLabelsGetBufferSize_16u_C1R (int nStartingNumber, int *hpBufferSize)
| Calculate scratch buffer size needed for 1 channel 16-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call. More...
NppStatus | nppiCompressMarkerLabelsGetBufferSize_32u_C1R (int nStartingNumber, int *hpBufferSize)
| Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call. More...

## CompressMarkerLabels

Renumber connected region marker label IDs from a previous call to nppiLabelMarkers to eliminate label numbering sparseness.

Note that while marker label IDs still start at ID number 1, the value of pNewNumber returned by this function will represent the minimum number of label IDs to give each connected region in the image a unique label ID. However, if you initially used nppiLabelMarkers_8u and the pNumber value returned by that function was over 255 then you will still have one or more disjoint connected regions with the same label ID in the final output from this function. Also, the output of nppiCompressMarkerLabels_32u8u will only produce correct results if the pNewNumber value returned by this function is less than 256.

Before calling any of the CompressMarkerLabels functions the application first needs to call the corresponding CompressMarkerLabelsGetBufferSize to determine the amount of device memory to allocate as a working buffer. The allocated device memory is then passed as the pBuffer parameter to the corresponding CompressMarkerLabels function.

NppStatus | nppiCompressMarkerLabels_8u_C1IR (Npp8u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
| 1 channel 8-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination. More...
NppStatus | nppiCompressMarkerLabels_32u8u_C1R (Npp32u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
| 1 channel 32-bit unsigned integer to 8-bit unsigned integer connected region marker label renumbering with numbering sparseness elimination. More...
NppStatus | nppiCompressMarkerLabels_16u_C1IR (Npp16u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
| 1 channel 16-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination. More...
NppStatus | nppiCompressMarkerLabels_32u_C1IR (Npp32u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
| 1 channel 32-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination. More...

## Detailed Description

Removes sparseness between marker label IDs output from LabelMarkers call.

## Function Documentation

NppStatus nppiCompressMarkerLabels_16u_C1IR | ( | Npp16u * | pSrcDst,
|  | int | nSrcDstStep,
|  | NppiSize | oSizeROI,
|  | int | nStartingNumber,
|  | int * | pNewNumber,
|  | Npp8u * | pBuffer
| ) |  |

1 channel 16-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination.

Parameters

  pSrcDst | In-Place Image Pointer.
  nSrcDstStep | Source-Image Line Step.
  oSizeROI | Region-of-Interest (ROI).
  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_16u function.
  pNewNumber | Pointer to host memory integer value where the maximum renumbered marker label ID will be returned.
  pBuffer | Pointer to device memory scratch buffer at least as large as value returned by the corresponding CompressMarkerLabelsGetBufferSize call.

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiCompressMarkerLabels_32u8u_C1R | ( | Npp32u * | pSrc,
|  | int | nSrcStep,
|  | Npp8u * | pDst,
|  | int | nDstStep,
|  | NppiSize | oSizeROI,
|  | int | nStartingNumber,
|  | int * | pNewNumber,
|  | Npp8u * | pBuffer
| ) |  |

1 channel 32-bit unsigned integer to 8-bit unsigned integer connected region marker label renumbering with numbering sparseness elimination.

Parameters

  pSrc | Source-Image Pointer.
  nSrcStep | Source-Image Line Step.
  pDst | Destination-Image Pointer.
  nDstStep | Destination-Image Line Step.
  oSizeROI | Region-of-Interest (ROI).
  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_8u32u function.
  pNewNumber | Pointer to host memory integer value where the maximum renumbered marker label ID will be returned.
  pBuffer | Pointer to device memory scratch buffer at least as large as value returned by the corresponding CompressMarkerLabelsGetBufferSize call.

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiCompressMarkerLabels_32u_C1IR | ( | Npp32u * | pSrcDst,
|  | int | nSrcDstStep,
|  | NppiSize | oSizeROI,
|  | int | nStartingNumber,
|  | int * | pNewNumber,
|  | Npp8u * | pBuffer
| ) |  |

1 channel 32-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination.

Parameters

  pSrcDst | In-Place Image Pointer.
  nSrcDstStep | Source-Image Line Step.
  oSizeROI | Region-of-Interest (ROI).
  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_8u32u function.
  pNewNumber | Pointer to host memory integer value where the maximum renumbered marker label ID will be returned.
  pBuffer | Pointer to device memory scratch buffer at least as large as value returned by the corresponding CompressMarkerLabelsGetBufferSize call.

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiCompressMarkerLabels_8u_C1IR | ( | Npp8u * | pSrcDst,
|  | int | nSrcDstStep,
|  | NppiSize | oSizeROI,
|  | int | nStartingNumber,
|  | int * | pNewNumber,
|  | Npp8u * | pBuffer
| ) |  |

1 channel 8-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination.

Parameters

  pSrcDst | In-Place Image Pointer.
  nSrcDstStep | Source-Image Line Step.
  oSizeROI | Region-of-Interest (ROI).
  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_8u function.
  pNewNumber | Pointer to host memory integer value where the maximum renumbered marker label ID will be returned.
  pBuffer | Pointer to device memory scratch buffer at least as large as value returned by the corresponding CompressMarkerLabelsGetBufferSize call.

Returns
  Image Data Related Error Codes, ROI Related Error Codes

NppStatus nppiCompressMarkerLabelsGetBufferSize_16u_C1R | ( | int | nStartingNumber,
|  | int * | hpBufferSize
| ) |  |

Calculate scratch buffer size needed for 1 channel 16-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call.

Parameters

  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_16u function.
  hpBufferSize | Required buffer size in bytes.

NppStatus nppiCompressMarkerLabelsGetBufferSize_32u8u_C1R | ( | int | nStartingNumber,
|  | int * | hpBufferSize
| ) |  |

Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer to 8-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call.

Parameters

  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_8u32u function.
  hpBufferSize | Required buffer size in bytes.

NppStatus nppiCompressMarkerLabelsGetBufferSize_32u_C1R | ( | int | nStartingNumber,
|  | int * | hpBufferSize
| ) |  |

Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call.

Parameters

  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_32u function.
  hpBufferSize | Required buffer size in bytes.

NppStatus nppiCompressMarkerLabelsGetBufferSize_8u_C1R | ( | int | nStartingNumber,
|  | int * | hpBufferSize
| ) |  |

Calculate scratch buffer size needed for 1 channel 8-bit unsigned integer CompressMarkerLabels function based on the number returned in pNumber from a previous nppiLabelMarkers call.

Parameters

  nStartingNumber | The value returned from a previous call to the nppiLabelMarkers_8u function.
  hpBufferSize | Required buffer size in bytes.

Copyright © 2009-2017 NVIDIA Corporation