NVIDIA 2D Image And Signal Performance Primitives (NPP)
Version 11.8..*
|
Various functions for interpolating pixels in image contours. More...
ContoursImageMarchingSquaresInterpolation | |
Apply Marching Squares bilinear interpolation to all contour pixels in a contours image where contour pixels have values of 0 and non-contour pixels have values of 255. | |
NppStatus | nppiContoursImageMarchingSquaresInterpolation_32f_C1R_Ctx (Npp8u *pContoursImageDev, Npp32s nContoursImageStep, NppiPoint32f *pContoursInterpolatedImageDev, Npp32s nContoursInterpolatedImageStep, NppiContourPixelDirectionInfo *pContoursDirectionImageDev, Npp32s nContoursDirectionImageStep, NppiContourPixelGeometryInfo *pContoursPixelGeometryListsDev, NppiContourPixelGeometryInfo *pContoursPixelGeometryListsHost, NppiPoint32f *pContoursInterpolatedGeometryListsDev, Npp32u *pContoursPixelsFoundListHost, Npp32u *pContoursPixelsStartingOffsetDev, Npp32u *pContoursPixelsStartingOffsetHost, Npp32u nTotalImagePixelContourCount, Npp32u nMaxMarkerLabelID, Npp32u nFirstContourGeometryListID, Npp32u nLastContourGeometryListID, NppiContourBlockSegment *pContoursBlockSegmentListDev, NppiContourBlockSegment *pContoursBlockSegmentListHost, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
1 channel integer coordinate based contours image to marching squares bilinear interpolated coordinates contours image. More... |
|
NppStatus | nppiContoursImageMarchingSquaresInterpolation_64f_C1R_Ctx (Npp8u *pContoursImageDev, Npp32s nContoursImageStep, NppiPoint64f *pContoursInterpolatedImageDev, Npp32s nContoursInterpolatedImageStep, NppiContourPixelDirectionInfo *pContoursDirectionImageDev, Npp32s nContoursDirectionImageStep, NppiContourPixelGeometryInfo *pContoursPixelGeometryListsDev, NppiContourPixelGeometryInfo *pContoursPixelGeometryListsHost, NppiPoint64f *pContoursInterpolatedGeometryListsDev, Npp32u *pContoursPixelsFoundListHost, Npp32u *pContoursPixelsStartingOffsetDev, Npp32u *pContoursPixelsStartingOffsetHost, Npp32u nTotalImagePixelContourCount, Npp32u nMaxMarkerLabelID, Npp32u nFirstContourGeometryListID, Npp32u nLastContourGeometryListID, NppiContourBlockSegment *pContoursBlockSegmentListDev, NppiContourBlockSegment *pContoursBlockSegmentListHost, NppiSize oSizeROI, NppStreamContext nppStreamCtx) |
Various functions for interpolating pixels in image contours.
NppStatus nppiContoursImageMarchingSquaresInterpolation_32f_C1R_Ctx | ( | Npp8u * | pContoursImageDev, |
Npp32s | nContoursImageStep, | ||
NppiPoint32f * | pContoursInterpolatedImageDev, | ||
Npp32s | nContoursInterpolatedImageStep, | ||
NppiContourPixelDirectionInfo * | pContoursDirectionImageDev, | ||
Npp32s | nContoursDirectionImageStep, | ||
NppiContourPixelGeometryInfo * | pContoursPixelGeometryListsDev, | ||
NppiContourPixelGeometryInfo * | pContoursPixelGeometryListsHost, | ||
NppiPoint32f * | pContoursInterpolatedGeometryListsDev, | ||
Npp32u * | pContoursPixelsFoundListHost, | ||
Npp32u * | pContoursPixelsStartingOffsetDev, | ||
Npp32u * | pContoursPixelsStartingOffsetHost, | ||
Npp32u | nTotalImagePixelContourCount, | ||
Npp32u | nMaxMarkerLabelID, | ||
Npp32u | nFirstContourGeometryListID, | ||
Npp32u | nLastContourGeometryListID, | ||
NppiContourBlockSegment * | pContoursBlockSegmentListDev, | ||
NppiContourBlockSegment * | pContoursBlockSegmentListHost, | ||
NppiSize | oSizeROI, | ||
NppStreamContext | nppStreamCtx | ||
) |
1 channel integer coordinate based contours image to marching squares bilinear interpolated coordinates contours image.
Note that ALL input and output data for the function MUST be in device memory except where noted otherwise. Also nFirstContourID and nLastContourID allow only a portion of the contour geometry lists in the image to be output.
Note that the geometry list for each contour will begin at pContoursGeometryListsHost[pContoursPixelStartingOffsetHost[nContourID] * sizeof(NppiContourPixelGeometryInfo).
Note that to significantly improve performance by default a contour that contains more than 256K pixels will be bypassed when generating the output geometry list. The contour ID and number of contour pixels will be output in the contour list however. You can still get this function to output the geometry of this size contour howver by calling the function with a starting contour ID of that contour ID and and ending contour ID of that contour ID + 1. Note that doing so for contours approaching a million pixels can take many minutes. Also, due to the structure of some images contour ID 0 can contain ALL contours in the image so setting the starting contour ID to 1 can significantly increase output preprocessing performance.
Also note that the ordered contour geometry list is contained in the oContourOrderedGeometryLocation object within the NppiContourPixelGeometryInfo object for each contour pixel and that this location information is the only valid information in the object relevent to that ordered pixel.
Note that for a particular contour geometry pixel list the bounding box for that contour will be contained in the following elements of first pixel (pixel 0) of the corresponding contour pixel list.
Note that while the bounding box is relatively accurate occasionally a few contour pixels may extend beyond the bounding box limits.
pContoursImageDev | pointer to device memory image of at least oSizeROI.width * sizeof(Npp8u) * oSizeROI.height bytes. |
nContoursImageStep | image line step. |
pContoursInterpolatedImageDev | pointer to device memory image of at least oSizeROI.width * sizeof(NppiPoint32f) * OSizeROI.height bytes. |
nContoursInterpolatedImageStep | image line step |
pContoursDirectionImageDev | Source-Image Pointer to output image in device memory containing per contour pixel direction info around each uniquely labeled connected pixel region returned by corresponding nppiCompressedMarkerLabelsUFInfo call. |
nContoursDirectionImageStep | image_line_step for contours image. |
pContoursPixelGeometryListsDev | pointer to device memory buffer allocated to be at least as big as size returned by corresponding nppiCompressedMarkerLabelsUFGetGeometryListsSize call. |
pContoursPixelGeometryListsHost | pointer to host memory buffer allocated to be at least as big as size returned by corresponding nppiCompressedMarkerLabelsUFGetGeometryListsSize call. |
pContoursInterpolatedGeometryListsDev | pointer to device memory buffer allocated to be at least nTotalImagePixelContourCount * sizeof(NppPoint32f) bytes. |
pContoursPixelsFoundListHost | host memory pointer to array of nMaxMarkerLabelID unsigned integers returned by previous call to nppiCompressedMarkerLabelsUFContoursPixelGeometryLists_C1R_Ctx. |
pContoursPixelsStartingOffsetDev | device memory pointer to array of unsigned integers returned by this call representing the starting offset index of each contour found during geometry list generation. |
pContoursPixelsStartingOffsetHost | host memory pointer to array of unsigned integers returned by this call representing the starting offset index of each contour found during geometry list generation. |
nTotalImagePixelContourCount | the total number of contour pixels in the image returned by nppiCompressedMarkerLabelsUFInfo_32u_C1R_Ctx() call. |
nMaxMarkerLabelID | the value of the maximum marker label ID returned by corresponding compress marker labels UF call. |
nFirstContourGeometryListID | the ID of the first contour geometry list to output. |
nLastContourGeometryListID | the ID of the last contour geometry list to output, last ID MUST be greater than first ID. |
pContoursBlockSegmentListDev | device memory pointer to array of NppiContourBlockSegment objects, contents will be initialized by NPP. |
pContoursBlockSegmentListHost | host memory pointer to array of NppiContourBlockSegment objects, contents will be intialized by NPP. |
oSizeROI | Region-of-Interest (ROI) for the images, must be the same as used in previous calls. |
nppStreamCtx | Application Managed Stream Context. |
NppStatus nppiContoursImageMarchingSquaresInterpolation_64f_C1R_Ctx | ( | Npp8u * | pContoursImageDev, |
Npp32s | nContoursImageStep, | ||
NppiPoint64f * | pContoursInterpolatedImageDev, | ||
Npp32s | nContoursInterpolatedImageStep, | ||
NppiContourPixelDirectionInfo * | pContoursDirectionImageDev, | ||
Npp32s | nContoursDirectionImageStep, | ||
NppiContourPixelGeometryInfo * | pContoursPixelGeometryListsDev, | ||
NppiContourPixelGeometryInfo * | pContoursPixelGeometryListsHost, | ||
NppiPoint64f * | pContoursInterpolatedGeometryListsDev, | ||
Npp32u * | pContoursPixelsFoundListHost, | ||
Npp32u * | pContoursPixelsStartingOffsetDev, | ||
Npp32u * | pContoursPixelsStartingOffsetHost, | ||
Npp32u | nTotalImagePixelContourCount, | ||
Npp32u | nMaxMarkerLabelID, | ||
Npp32u | nFirstContourGeometryListID, | ||
Npp32u | nLastContourGeometryListID, | ||
NppiContourBlockSegment * | pContoursBlockSegmentListDev, | ||
NppiContourBlockSegment * | pContoursBlockSegmentListHost, | ||
NppiSize | oSizeROI, | ||
NppStreamContext | nppStreamCtx | ||
) |