Class NPPNativeMethods.NPPi.AffinTransforms
Affine warping, affine transform calculation Affine warping of an image is the transform of image pixel positions, defined by the following formulas: \f[ X_{new} = C_{00} * x + C_{01} * y + C_{02} \qquad Y_{new} = C_{10} * x + C_{11} * y + C_{12} \qquad C = \left[ \matrix{C_{00} & C_{01} & C_{02} \cr C_{10} & C_{11} & C_{12} } \right] \f] That is, any pixel with coordinates \f$(X_{new},Y_{new})\f$ in the transformed image is sourced from coordinates \f$(x,y)\f$ in the original image. The mapping \f$C\f$ is completely specified by 6 values \f$C_{ij}, i=\overline{0,1}, j=\overline{0,2}\f$. The transform maps parallel lines to parallel lines and preserves ratios of distances of points to lines. Implementation specific properties are discussed in each function's documentation.
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class AffinTransforms
Methods
nppiGetAffineBound(NppiRect, Double[,], Double[,])
Calculates bounding box of the affine transform projection of the given source rectangular ROI
Declaration
public static NppStatus nppiGetAffineBound(NppiRect srcRoi, double[, ] bound, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | bound | Bounding box of the transformed source ROI [2,2] |
System.Double[,] | coeffs | Affine transform coefficients [2,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 |
nppiGetAffineQuad(NppiRect, Double[,], Double[,])
Calculates affine transform projection of given source rectangular ROI
Declaration
public static NppStatus nppiGetAffineQuad(NppiRect srcRoi, double[, ] quad, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | quad | Destination quadrangle [4,2] |
System.Double[,] | coeffs | Affine transform coefficients [2,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 |
nppiGetAffineTransform(NppiRect, Double[,], Double[,])
Calculates affine transform coefficients given source rectangular ROI and its destination quadrangle projection
Declaration
public static NppStatus nppiGetAffineTransform(NppiRect srcRoi, double[, ] quad, double[, ] coeffs)
Parameters
Type | Name | Description |
---|---|---|
NppiRect | srcRoi | Source ROI |
System.Double[,] | quad | Destination quadrangle [4,2] |
System.Double[,] | coeffs | Affine transform coefficients [2,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 - #NPP_AFFINE_QUAD_INCORRECT_WARNING Indicates a warning when quad does not conform to the transform properties. Fourth vertex is ignored, internally computed coordinates are used instead |
nppiWarpAffine_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four channels RGBA) nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = C_{00} /// x + C_{01} /// y + C_{02} \qquad Y_{new} = C_{10} /// x + C_{11} /// y + C_{12} \qquad \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound 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 nppiWarpAffine_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffine_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, three channels) nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four channels) nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, three planes) nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four planes) nppiWarpAffine_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels RGBA). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = C_{00} /// x + C_{01} /// y + C_{02} \qquad Y_{new} = C_{10} /// x + C_{11} /// y + C_{12} \qquad \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpAffine_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffine_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, three channels). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, three planes). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four planes). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four channels RGBA). nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = C_{00} /// x + C_{01} /// y + C_{02} \qquad Y_{new} = C_{10} /// x + C_{11} /// y + C_{12} \qquad \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpAffine_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffine_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, three channels). nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_32s_C3R(CUdeviceptr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect srcRoi, CUdeviceptr pDst, int nDstStep, NppiRect dstRoi, double[, ] coeffs, InterpolationMode interpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | interpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpAffine_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four channels). nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, three planes). nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four planes). nppiWarpAffine_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_64f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels RGBA). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_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 |
nppiWarpAffine_64f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (64bit float, one channel). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_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 | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | srcRoi | |
CUdeviceptr | pDst | |
System.Int32 | nDstStep | |
NppiRect | dstRoi | |
System.Double[,] | coeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpAffine_64f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, three channels). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_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 |
nppiWarpAffine_64f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_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 |
nppiWarpAffine_64f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (64bit float, three channels RGB). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_P3R(CUdeviceptr[] aSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI, CUdeviceptr[] aDst, int nDstStep, NppiRect oDestROI, double[, ] aCoeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | aSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | oSrcROI | |
CUdeviceptr[] | aDst | |
System.Int32 | nDstStep | |
NppiRect | oDestROI | |
System.Double[,] | aCoeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpAffine_64f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (64bit float, four channels RGBA). nppiWarpAffine_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_64f_P4R(CUdeviceptr[] aSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI, CUdeviceptr[] aDst, int nDstStep, NppiRect oDestROI, double[, ] aCoeffs, InterpolationMode eInterpolation)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr[] | aSrc | |
NppiSize | oSrcSize | |
System.Int32 | nSrcStep | |
NppiRect | oSrcROI | |
CUdeviceptr[] | aDst | |
System.Int32 | nDstStep | |
NppiRect | oDestROI | |
System.Double[,] | aCoeffs | |
InterpolationMode | eInterpolation |
Returns
Type | Description |
---|---|
NppStatus |
nppiWarpAffine_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ X_{new} = C_{00} /// x + C_{01} /// y + C_{02} \qquad Y_{new} = C_{10} /// x + C_{11} /// y + C_{12} \qquad \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound 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 nppiWarpAffine_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 | Affine transform coefficients [2,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 interpolation 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 misalignment |
nppiWarpAffine_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, three channels). nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four channels). nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, three planes). nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffine_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four planes). nppiWarpAffine_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffine_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 |
nppiWarpAffineBack_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, four channels RGBA) nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpAffineBack. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02} = x \qquad C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound 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 doesn't 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 nppiWarpAffineBack_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffineBack_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, three channels) nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, four channels) nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, three planes) nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (16bit unsigned integer, four planes) nppiWarpAffineBack_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, four channels RGBA). nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpAffineBack. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02} = x \qquad C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpAffineBack_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffineBack_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, three channels). nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, four channels). nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, three planes). nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit float, four planes). nppiWarpAffineBack_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, four channels RGBA). nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpAffineBack. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02} = x \qquad C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound can help with destination ROI specification.
Declaration
public static NppStatus nppiWarpAffineBack_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 | Affine transform coefficients [2,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 misalignment |
nppiWarpAffineBack_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, three channels). nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, four channels). nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, three planes). nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (32bit signed integer, four planes). nppiWarpAffineBack_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, single channel). This function operates using given transform coefficients that can be obtained by using nppiGetAffineTransform function or set explicitly. Thus there is no need to invert coefficients in your application before calling WarpAffineBack. The function operates on source and destination regions of interest. The affine warp function transforms the source image pixel coordinates \f$(x,y)\f$ according to the following formulas: \f[ C_{00} /// X_{new} + C_{01} /// Y_{new} + C_{02} = x \qquad C_{10} /// X_{new} + C_{11} /// Y_{new} + C_{12} = y \f] The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. The functions nppiGetAffineQuad and nppiGetAffineBound 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 doesn't 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 nppiWarpAffineBack_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 | Affine transform coefficients [2,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 interpolation 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 misalignment |
nppiWarpAffineBack_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, three channels). nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, four channels). nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, three planes). nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineBack_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Inverse affine transform of an image (8bit unsigned integer, four planes). nppiWarpAffineBack_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineBack_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 |
nppiWarpAffineQuad_16u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four channels RGBA). nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, single channel). This function performs affine warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpAffineQuad uses the same formulas for pixel mapping as in nppiWarpAffine 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 doesn't 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 nppiWarpAffineQuad_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 misalignment |
nppiWarpAffineQuad_16u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, three channels). nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_16u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four channels). nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_16u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, three planes). nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_16u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (16bit unsigned integer, four planes). nppiWarpAffineQuad_16u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32f_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels RGBA). nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, single channel). This function performs affine warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpAffineQuad uses the same formulas for pixel mapping as in nppiWarpAffine 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 nppiWarpAffineQuad_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 misalignment |
nppiWarpAffineQuad_32f_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, three channels). nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32f_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four channels). nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32f_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, three planes). nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32f_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit float, four planes). nppiWarpAffineQuad_32f_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32s_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four channels RGBA). nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, single channel). This function performs affine warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpAffineQuad uses the same formulas for pixel mapping as in nppiWarpAffine 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 nppiWarpAffineQuad_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 misalignment |
nppiWarpAffineQuad_32s_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, three channels). nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32s_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four channels). nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32s_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, three planes). nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_32s_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (32bit signed integer, four planes). nppiWarpAffineQuad_32s_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_8u_AC4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four channels RGBA). nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, single channel). This function performs affine warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpAffineQuad uses the same formulas for pixel mapping as in nppiWarpAffine function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified eInterpolation 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 nppiWarpAffineQuad_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 misalignment ignored, internally computed coordinates are used instead |
nppiWarpAffineQuad_8u_C3R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, three channels). nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_8u_C4R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four channels). nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_8u_P3R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, three planes). nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |
nppiWarpAffineQuad_8u_P4R(CUdeviceptr[], NppiSize, Int32, NppiRect, Double[,], CUdeviceptr[], Int32, NppiRect, Double[,], InterpolationMode)
Affine transform of an image (8bit unsigned integer, four planes). nppiWarpAffineQuad_8u_C1R(CUdeviceptr, NppiSize, Int32, NppiRect, Double[,], CUdeviceptr, Int32, NppiRect, Double[,], InterpolationMode)
Declaration
public static NppStatus nppiWarpAffineQuad_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 |