ManagedCuda.NPP.NPPImage_8uC3.WarpPerspectiveQuad C# (CSharp) Method

WarpPerspectiveQuad() public method

Perspective transform of an image. This function performs perspective warping of a the specified quadrangle in the source image to the specified quadrangle in the destination image. The function nppiWarpPerspectiveQuad uses the same formulas for pixel mapping as in nppiWarpPerspective function. The transform coefficients are computed internally. The transformed part of the source image is resampled using the specified interpolation method and written to the destination ROI. NPPI specific recommendation: The function operates using 2 types of kernels: fast and accurate. The fast method is about 4 times faster than its accurate variant, but 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.
public WarpPerspectiveQuad ( double srcQuad, NPPImage_8uC3 dest, double destQuad, InterpolationMode eInterpolation ) : void
srcQuad double Source quadrangle [4,2]
dest NPPImage_8uC3 Destination image
destQuad double Destination quadrangle [4,2]
eInterpolation InterpolationMode Interpolation mode: can be , or
return void
        public void WarpPerspectiveQuad(double[,] srcQuad, NPPImage_8uC3 dest, double[,] destQuad, InterpolationMode eInterpolation)
        {
            NppiRect rectIn = new NppiRect(_pointRoi, _sizeRoi);
            NppiRect rectOut = new NppiRect(dest.PointRoi, dest.SizeRoi);
            status = NPPNativeMethods.NPPi.PerspectiveTransforms.nppiWarpPerspectiveQuad_8u_C3R(_devPtr, _sizeOriginal, _pitch, rectIn, srcQuad, dest.DevicePointer, dest.Pitch, rectOut, destQuad, eInterpolation);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiWarpPerspectiveQuad_8u_C3R", status));
            NPPException.CheckNppStatus(status, this);
        }

Same methods

NPPImage_8uC3::WarpPerspectiveQuad ( NPPImage_8uC1 src0, NPPImage_8uC1 src1, NPPImage_8uC1 src2, double srcQuad, NPPImage_8uC1 dest0, NPPImage_8uC1 dest1, NPPImage_8uC1 dest2, double destQuad, InterpolationMode eInterpolation ) : void
NPPImage_8uC3