Library/ManagedCuda/NPP/NPPImage_32fC1.cs
/// <summary>
/// Affine transform of an image. <para/>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.<para/>
/// NPPI specific recommendation: <para/>
/// 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 <para/>
/// <code>(int)((void *)(pDst + dstRoi.x))</code> and <para/>
/// <code>(int)((void *)(pDst + dstRoi.x + dstRoi.width))</code> <para/>
/// 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.
/// </summary>
/// <param name="srcQuad">Source quadrangle [4,2]</param>
/// <param name="dest">Destination image</param>
/// <param name="dstQuad">Destination quadrangle [4,2]</param>
/// <param name="eInterpolation">Interpolation mode: can be <see cref="InterpolationMode.NearestNeighbor"/>, <see cref="InterpolationMode.Linear"/> or <see cref="InterpolationMode.Cubic"/></param>
Affine transform of an image. 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 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.
Affine transform of an image . 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 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 .
public void WarpAffineQuad(double[,] srcQuad, NPPImage_32fC1 dest, double[,] dstQuad, InterpolationMode eInterpolation)
		{
			NppiRect rectIn = new NppiRect(_pointRoi, _sizeRoi);
			NppiRect rectOut = new NppiRect(dest.PointRoi, dest.SizeRoi);
			status = NPPNativeMethods.NPPi.AffinTransforms.nppiWarpAffineQuad_32f_C1R(_devPtr, _sizeOriginal, _pitch, rectIn, srcQuad, dest.DevicePointer, dest.Pitch, rectOut, dstQuad, eInterpolation);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiWarpAffineQuad_32f_C1R", status));
			NPPException.CheckNppStatus(status, this);
		}
public void WarpAffineQuad ( double [ , ] srcQuad , NPPImage_32fC1 dest , double [ , ] dstQuad , InterpolationMode eInterpolation ) { NppiRect rectIn = new NppiRect ( _pointRoi , _sizeRoi ) ; NppiRect rectOut = new NppiRect ( dest . PointRoi , dest . SizeRoi ) ; status = NPPNativeMethods . NPPi . AffinTransforms . nppiWarpAffineQuad_32f_C1R ( _devPtr , _sizeOriginal , _pitch , rectIn , srcQuad , dest . DevicePointer , dest . Pitch , rectOut , dstQuad , eInterpolation ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; NPPException . CheckNppStatus ( status , this ) ; }
Affine transform of an image.
Affine transform of an image .
srcQuad
double[,]
Source quadrangle [4,2]
Source quadrangle [ 4 2 ]
dest
NPPImage_32fC1
None
dstQuad
double[,]
Destination quadrangle [4,2]
Destination quadrangle [ 4 2 ]
eInterpolation
InterpolationMode
Interpolation mode: can be ,  or
Interpolation mode : can be or