Class NPPNativeMethods.NPPi.PerspectiveTransforms
Perspective warping, perspective transform calculation Perspective warping of an image is the transform of image pixel positions, defined by the following formulas: \f[ X_{new} = \frac{C_{00} * x + C_{01} * y + C_{02}}{C_{20} * x + C_{21} * y + C_{22}} \qquad Y_{new} = \frac{C_{10} * x + C_{11} * y + C_{12}}{C_{20} * x + C_{21} * y + C_{22}} \qquad C = \left[ \matrix{C_{00} & C_{01} & C_{02} \cr C_{10} & C_{11} & C_{12} \cr C_{20} & C_{21} & C_{22} } \right] \f] That is, any pixel of the transformed image with coordinates \f$(X_{new},Y_{new})\f$ has a preimage with coordinates \f$(x,y)\f$. The mapping \f$C\f$ is fully defined by 8 values \f$C_{ij}, (i,j)=\overline{0,2}\f$, except of \f$C_{22}\f$, which is a normalizer. The transform has a property of mapping any convex quadrangle to a convex quadrangle, which is used in a group of functions nppiWarpPerspectiveQuad. The NPPI implementation of perspective transform has some issues which are discussed in each function's documentation.
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class PerspectiveTransforms
Methods
nppiGetPerspectiveBound(NppiRect, Double[,], Double[,])
Calculates bounding box of the perspective transform projection of the given source rectangular ROI
Declaration
public static NppStatus nppiGetPerspectiveBound(NppiRect srcRoi, double[, ] bound, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | bound | Bounding box of the transformed source ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
Returns
Type | Description |
---|---|
NppStatus | Error codes: - #NPP_SIZE_ERROR Indicates an error condition if any image dimension has zero or negative value - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid |
nppiGetPerspectiveQuad(NppiRect, Double[,], Double[,])
Calculates perspective transform projection of given source rectangular ROI
Declaration
public static NppStatus nppiGetPerspectiveQuad(NppiRect srcRoi, double[, ] quad, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | quad | Destination quadrangle [4,2] |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
Returns
Type | Description |
---|---|
NppStatus | Error codes: - #NPP_SIZE_ERROR Indicates an error condition if any image dimension has zero or negative value - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid |
nppiGetPerspectiveTransform(NppiRect, Double[,], Double[,])
Calculates perspective transform coefficients given source rectangular ROI and its destination quadrangle projection
Declaration
public static NppStatus nppiGetPerspectiveTransform(NppiRect srcRoi, double[, ] quad, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | quad | Destination quadrangle [4,2] |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
Returns
Type | Description |
---|---|
NppStatus | Error codes: - #NPP_SIZE_ERROR Indicates an error condition if any image dimension has zero or negative value - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid |
nppiWarpPerspective_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four channels RGBA) nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_16u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = \frac{C_{00} /// x + C_{01} /// y + C_{02}}{C_{20} /// x + C_{21} /// y + C_{22}} \qquad Y_{new} = \frac{C_{10} /// x + C_{11} /// y + C_{12}}{C_{20} /// x + C_{21} /// y + C_{22}} \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspective_16u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspective_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, three channels) nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_16u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four channels) nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_16u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, three planes) nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_16u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four planes) nppiWarpPerspective_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_16u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four channels RGBA). nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32f_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = \frac{C_{00} /// x + C_{01} /// y + C_{02}}{C_{20} /// x + C_{21} /// y + C_{22}} \qquad Y_{new} = \frac{C_{10} /// x + C_{11} /// y + C_{12}}{C_{20} /// x + C_{21} /// y + C_{22}} \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpPerspective_32f_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspective_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, three channels). nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32f_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four channels). nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32f_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, three planes). nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32f_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four planes). nppiWarpPerspective_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32f_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four channels RGBA). nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32s_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = \frac{C_{00} /// x + C_{01} /// y + C_{02}}{C_{20} /// x + C_{21} /// y + C_{22}} \qquad Y_{new} = \frac{C_{10} /// x + C_{11} /// y + C_{12}}{C_{20} /// x + C_{21} /// y + C_{22}} \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpPerspective_32s_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspective_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, three channels). nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32s_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four channels). nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32s_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, three planes). nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32s_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four planes). nppiWarpPerspective_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_32s_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_8u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = \frac{C_{00} /// x + C_{01} /// y + C_{02}}{C_{20} /// x + C_{21} /// y + C_{22}} \qquad Y_{new} = \frac{C_{10} /// x + C_{11} /// y + C_{12}}{C_{20} /// x + C_{21} /// y + C_{22}} \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspective_8u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspective_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, three channels). nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_8u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four channels). nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_8u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, three planes). nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_8u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspective_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four planes). nppiWarpPerspective_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspective_8u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, four channels RGBA) nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpPerspectiveBack. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ \frac{C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = x \qquad \frac{C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveBack_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, three channels) nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, four channels) nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, three planes) nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (16bit unsigned integer, four planes) nppiWarpPerspectiveBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_16u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, four channels RGBA). nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpPerspectiveBack. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ \frac{C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = x \qquad \frac{C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveBack_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, three channels). nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, four channels). nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, three planes). nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit float, four planes). nppiWarpPerspectiveBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32f_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, four channels RGBA). nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpPerspectiveBack. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ \frac{C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = x \qquad \frac{C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveBack_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, three channels). nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, four channels). nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, three planes). nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (32bit signed integer, four planes). nppiWarpPerspectiveBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_32s_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetPerspectiveTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpPerspectiveBack. The function operates on source and destination regions of interest. The perspective warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ \frac{C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = x \qquad \frac{C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12}}{C_{20} /// X_{new} + C_{21} /// Y_{new} + C_{22}} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetPerspectiveQuad and nppiGetPerspectiveBound can help with destination ROI specification.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | coeffs | Perspective transform coefficients [3,3] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveBack_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, three channels). nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, four channels). nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, three planes). nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveBack_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse perspective transform of an image (8bit unsigned integer, four planes). nppiWarpPerspectiveBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveBack_8u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four channels RGBA). nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, single channel). This function performs perspective warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpPerspectiveQuad uses the same formulas for pixel mapping as in nppiWarpPerspective function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
System.Double[,] | srcQuad | Source quadrangle [4,2] |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | dstQuad | Destination quadrangle [4,2] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveQuad_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, three channels). nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four channels). nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, three planes). nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (16bit unsigned integer, four planes). nppiWarpPerspectiveQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_16u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four channels RGBA). nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, single channel). This function performs perspective warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpPerspectiveQuad uses the same formulas for pixel mapping as in nppiWarpPerspective function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI.
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
System.Double[,] | srcQuad | Source quadrangle [4,2] |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | dstQuad | Destination quadrangle [4,2] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveQuad_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, three channels). nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four channels). nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, three planes). nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit float, four planes). nppiWarpPerspectiveQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32f_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four channels RGBA). nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, single channel). This function performs perspective warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpPerspectiveQuad uses the same formulas for pixel mapping as in nppiWarpPerspective function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI.
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
System.Double[,] | srcQuad | Source quadrangle [4,2] |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | dstQuad | Destination quadrangle [4,2] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveQuad_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, three channels). nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four channels). nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, three planes). nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (32bit signed integer, four planes). nppiWarpPerspectiveQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_32s_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_AC4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, single channel). This function performs perspective warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpPerspectiveQuad uses the same formulas for pixel mapping as in nppiWarpPerspective function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI.
NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but does not perform memory access checks and requires the destination ROI to be 64 bytes aligned. Hence any destination ROI is chunked into 3 vertical stripes: the first and the third are processed by accurate kernels and the central one is processed by the fast one. In order to get the maximum available speed of execution, the projection of destination ROI onto image addresses must be 64 bytes aligned. This is always true if the values (int)((void *)(pDst + dstRoi.x)) and (int)((void *)(pDst + dstRoi.x + dstRoi.width)) are multiples of 64. Another rule of thumb is to specify destination ROI in such way that left and right sides of the projected image are separated from the ROI by at least 63 bytes from each side. However, this requires the whole ROI to be part of allocated memory. In case when the conditions above are not satisfied, the function may decrease in speed slightly and will return NPP_MISALIGNED_DST_ROI_WARNING warning.
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | Source-Image Pointer. |
NppiSize | oSrcSize | Size of source image in pixels |
System.Int32 | nSrcStep | Source-Image Line Step. |
NppiRect | srcRoi | Source ROI |
System.Double[,] | srcQuad | Source quadrangle [4,2] |
CUdeviceptr | pDst | Destination-Image Pointer. |
System.Int32 | nDstStep | Destination-Image Line Step. |
NppiRect | dstRoi | Destination ROI |
System.Double[,] | dstQuad | Destination quadrangle [4,2] |
InterpolationMode | eInterpolation | Interpolation mode: can be NearestNeighbor, Linear or Cubic |
Returns
Type | Description |
---|---|
NppStatus | StepError, NotEvenStepError, NullPointerError, AlignmentError, StepError, SizeError - #NPP_RECT_ERROR Indicates an error condition if width or height of the intersection of the srcRoi and source image is less than or equal to 1 - #NPP_WRONG_INTERSECTION_ROI_ERROR Indicates an error condition if srcRoi has no intersection with the source image - #NPP_INTERPOLATION_ERROR Indicates an error condition if eInterpolation has an illegal value - #NPP_COEFF_ERROR Indicates an error condition if coefficient values are invalid - #NPP_WRONG_INTERSECTION_QUAD_WARNING Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI - #NPP_MISALIGNED_DST_ROI_WARNING Indicates a warning that the speed of primitive execution was reduced due to destination ROI |
nppiWarpPerspectiveQuad_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, three channels). nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four channels). nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_C4R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, three planes). nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_P3R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpPerspectiveQuad_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Perspective transform of an image (8bit unsigned integer, four planes). nppiWarpPerspectiveQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpPerspectiveQuad_8u_P4R(CUdeviceptr[] pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, double[, ] srcQuad, CUdeviceptr[] pDst, int nDstStep, NppiRect dstRoi, double[, ] dstQuad, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
System.Double[,] | srcQuad | |
CUdeviceptr[] | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | dstQuad | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |