NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 10.2.*.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
CompressMarkerLabels

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.

NOTE: When compressing labels generated by the nppiLabelMarkersUF() functions the value of the nStartingNumber parameter below MUST be set to ROI width * ROI height.

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_32u16u_C1R (int nStartingNumber, int *hpBufferSize)
  Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer to 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.

NOTE: When compressing labels generated by the nppiLabelMarkersUF() functions the value of the nStartingNumber parameter below MUST be set to ROI width * ROI height.

NppStatus  nppiCompressMarkerLabels_8u_C1IR_Ctx (Npp8u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer, NppStreamContext nppStreamCtx)
  1 channel 8-bit unsigned integer in place connected region marker label renumbering with numbering sparseness elimination. More...
 
NppStatus  nppiCompressMarkerLabels_8u_C1IR (Npp8u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
 
NppStatus  nppiCompressMarkerLabels_32u8u_C1R_Ctx (Npp32u *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer, NppStreamContext nppStreamCtx)
  1 channel 32-bit unsigned integer to 8-bit unsigned integer 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)
 
NppStatus  nppiCompressMarkerLabels_16u_C1IR_Ctx (Npp16u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer, NppStreamContext nppStreamCtx)
  1 channel 16-bit unsigned integer in place 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)
 
NppStatus  nppiCompressMarkerLabels_32u16u_C1R_Ctx (Npp32u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer, NppStreamContext nppStreamCtx)
  1 channel 32-bit unsigned integer to 16-bit unsigned integer connected region marker label renumbering with numbering sparseness elimination. More...
 
NppStatus  nppiCompressMarkerLabels_32u16u_C1R (Npp32u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer)
 
NppStatus  nppiCompressMarkerLabels_32u_C1IR_Ctx (Npp32u *pSrcDst, int nSrcDstStep, NppiSize oSizeROI, int nStartingNumber, int *pNewNumber, Npp8u *pBuffer, NppStreamContext nppStreamCtx)
  1 channel 32-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)
 

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 
)
NppStatus nppiCompressMarkerLabels_16u_C1IR_Ctx ( Npp16u pSrcDst,
int  nSrcDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer,
NppStreamContext  nppStreamCtx 
)

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.
nppStreamCtx Application Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes
NppStatus nppiCompressMarkerLabels_32u16u_C1R ( Npp32u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer 
)
NppStatus nppiCompressMarkerLabels_32u16u_C1R_Ctx ( Npp32u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer,
NppStreamContext  nppStreamCtx 
)

1 channel 32-bit unsigned integer to 16-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_32u function or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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.
nppStreamCtx Application Managed Stream Context.
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 
)
NppStatus nppiCompressMarkerLabels_32u8u_C1R_Ctx ( Npp32u pSrc,
int  nSrcStep,
Npp8u pDst,
int  nDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer,
NppStreamContext  nppStreamCtx 
)

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 or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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.
nppStreamCtx Application Managed Stream Context.
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 
)
NppStatus nppiCompressMarkerLabels_32u_C1IR_Ctx ( Npp32u pSrcDst,
int  nSrcDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer,
NppStreamContext  nppStreamCtx 
)

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 or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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.
nppStreamCtx Application Managed Stream Context.
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 
)
NppStatus nppiCompressMarkerLabels_8u_C1IR_Ctx ( Npp8u pSrcDst,
int  nSrcDstStep,
NppiSize  oSizeROI,
int  nStartingNumber,
int *  pNewNumber,
Npp8u pBuffer,
NppStreamContext  nppStreamCtx 
)

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.
nppStreamCtx Application Managed Stream Context.
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_32u16u_C1R ( int  nStartingNumber,
int *  hpBufferSize 
)

Calculate scratch buffer size needed for 1 channel 32-bit unsigned integer to 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_8u32u function or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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 or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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 or ROI width * ROI height for images generated by the nppiLabelMarkersUF funcions.
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.