本文整理汇总了C#中ManagedCuda.NPP.NPPImage_32fC1类的典型用法代码示例。如果您正苦于以下问题:C# NPPImage_32fC1类的具体用法?C# NPPImage_32fC1怎么用?C# NPPImage_32fC1使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NPPImage_32fC1类属于ManagedCuda.NPP命名空间,在下文中一共展示了NPPImage_32fC1类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AlphaComp
/// <summary>
/// Image composition using constant alpha.
/// </summary>
/// <param name="alpha1">constant alpha for this image</param>
/// <param name="src2">2nd source image</param>
/// <param name="alpha2">constant alpha for src2</param>
/// <param name="dest">Destination image</param>
/// <param name="nppAlphaOp">alpha compositing operation</param>
public void AlphaComp(float alpha1, NPPImage_32fC1 src2, float alpha2, NPPImage_32fC1 dest, NppiAlphaOp nppAlphaOp)
{
status = NPPNativeMethods.NPPi.AlphaCompConst.nppiAlphaCompC_32f_C1R(_devPtrRoi, _pitch, alpha1, src2.DevicePointerRoi, src2.Pitch, alpha2, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nppAlphaOp);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiAlphaCompC_32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:14,代码来源:NPPImage_32fC1.cs
示例2: MagnitudeSqr
/// <summary>
/// 32-bit floating point complex to 32-bit floating point squared magnitude.
/// <para/>
/// Converts complex-number pixel image to single channel image computing
/// the result pixels as the squared magnitude of the complex values.
/// <para/>
/// The squared magnitude is an itermediate result of magnitude computation and
/// can thus be computed faster than actual magnitude. If magnitudes are required
/// for sorting/comparing only, using this function instead of nppiMagnitude_32fc32f_C1R
/// can be a worthwhile performance optimization.
/// </summary>
/// <param name="dest">Destination image</param>
public void MagnitudeSqr(NPPImage_32fC1 dest)
{
status = NPPNativeMethods.NPPi.LinearTransforms.nppiMagnitudeSqr_32fc32f_C1R(_devPtrRoi, _pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMagnitudeSqr_32fc32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:18,代码来源:NPPImage_32fcC1.cs
示例3: RemapA
/// <summary>
/// image remap. Not affecting Alpha.
/// </summary>
/// <param name="dst">Destination-Image</param>
/// <param name="pXMap">Device memory pointer to 2D image array of X coordinate values to be used when sampling source image. </param>
/// <param name="pYMap">Device memory pointer to 2D image array of Y coordinate values to be used when sampling source image. </param>
/// <param name="eInterpolation">The type of eInterpolation to perform resampling.</param>
public void RemapA(NPPImage_8uC4 dst, NPPImage_32fC1 pXMap, NPPImage_32fC1 pYMap, InterpolationMode eInterpolation)
{
NppiRect srcRect = new NppiRect(_pointRoi, _sizeRoi);
status = NPPNativeMethods.NPPi.Remap.nppiRemap_8u_AC4R(_devPtr, _sizeRoi, _pitch, srcRect, pXMap.DevicePointerRoi, pXMap.Pitch, pYMap.DevicePointerRoi, pYMap.Pitch, dst.DevicePointerRoi, dst.Pitch, dst.SizeRoi, eInterpolation);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiRemap_8u_AC4R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:14,代码来源:NPPImage_8uC4.cs
示例4: CrossCorrValid_Norm
/// <summary>
/// image CrossCorrValid_Norm.
/// </summary>
/// <param name="tpl">template image.</param>
/// <param name="dst">Destination-Image</param>
public void CrossCorrValid_Norm(NPPImage_16uC1 tpl, NPPImage_32fC1 dst)
{
status = NPPNativeMethods.NPPi.ImageProximity.nppiCrossCorrValid_Norm_16u32f_C1R(_devPtrRoi, _pitch, _sizeRoi, tpl.DevicePointerRoi, tpl.Pitch, tpl.SizeRoi, dst.DevicePointerRoi, dst.Pitch);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiCrossCorrValid_Norm_16u32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_16uC1.cs
示例5: GradientVectorSobelBorder
/// <summary>
/// 3 channel 8-bit unsigned packed RGB to optional 1 channel 16-bit signed X (vertical), Y (horizontal), magnitude,
/// and/or 32-bit floating point angle gradient vectors with user selectable fixed mask size and distance method with border control.
/// </summary>
/// <param name="destX">X vector destination_image_pointer</param>
/// <param name="destY">Y vector destination_image_pointer.</param>
/// <param name="destMag">magnitude destination_image_pointer.</param>
/// <param name="destAngle">angle destination_image_pointer.</param>
/// <param name="eMaskSize">fixed filter mask size to use.</param>
/// <param name="eNorm">gradient distance method to use.</param>
/// <param name="eBorderType">The border type operation to be applied at source image border boundaries.</param>
public void GradientVectorSobelBorder(NPPImage_16sC1 destX, NPPImage_16sC1 destY, NPPImage_16sC1 destMag, NPPImage_32fC1 destAngle, MaskSize eMaskSize, NppiNorm eNorm, NppiBorderType eBorderType)
{
status = NPPNativeMethods.NPPi.GradientVectorSobelBorder.nppiGradientVectorSobelBorder_8u16s_C3C1R(_devPtr, _pitch, _sizeOriginal, _pointRoi, destX.DevicePointerRoi, destX.Pitch, destY.DevicePointerRoi, destY.Pitch, destMag.DevicePointerRoi, destMag.Pitch, destAngle.DevicePointerRoi, destAngle.Pitch, _sizeRoi, eMaskSize, eNorm, eBorderType);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiGradientVectorSobelBorder_8u16s_C3C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:17,代码来源:NPPImage_8uC3.cs
示例6: AddProduct
/// <summary>
/// One 8-bit unsigned char channel image squared then added to in place floating point destination image.
/// </summary>
/// <param name="dest">Destination image</param>
public void AddProduct(NPPImage_32fC1 dest)
{
status = NPPNativeMethods.NPPi.AddSquare.nppiAddSquare_16u32f_C1IR(_devPtrRoi, _pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiAddSquare_16u32f_C1IR", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:10,代码来源:NPPImage_16uC1.cs
示例7: SumWindowRowBorder
/// <summary>
/// Apply Row Window Summation filter over a 1D mask region around each source
/// pixel for 1-channel 8-bit pixel input images with 32-bit floating point output.
/// Result 32-bit floating point pixel is equal to the sum of the corresponding and
/// neighboring row pixel values in a mask region of the source image defined
/// by nKernelDim and nAnchorX.
/// </summary>
/// <param name="dest">Destination image</param>
/// <param name="nMaskSize">Length of the linear kernel array.</param>
/// <param name="nAnchor">X offset of the kernel origin frame of reference w.r.t the source pixel.</param>
/// <param name="eBorderType">The border type operation to be applied at source image border boundaries.</param>
public void SumWindowRowBorder(NPPImage_32fC1 dest, int nMaskSize, int nAnchor, NppiBorderType eBorderType)
{
status = NPPNativeMethods.NPPi.WindowSum1D.nppiSumWindowRowBorder_16u32f_C1R(_devPtr, _pitch, _sizeOriginal, _pointRoi, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nMaskSize, nAnchor, eBorderType);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiSumWindowRowBorder_16u32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:17,代码来源:NPPImage_16uC1.cs
示例8: ResizeSqrPixel
/// <summary>
/// planar image resize.
/// </summary>
/// <param name="src0">Source image (Channel 0)</param>
/// <param name="src1">Source image (Channel 1)</param>
/// <param name="src2">Source image (Channel 2)</param>
/// <param name="dest0">Destination image (Channel 0)</param>
/// <param name="dest1">Destination image (Channel 1)</param>
/// <param name="dest2">Destination image (Channel 2)</param>
/// <param name="nXFactor">Factor by which x dimension is changed. </param>
/// <param name="nYFactor">Factor by which y dimension is changed. </param>
/// <param name="nXShift">Source pixel shift in x-direction.</param>
/// <param name="nYShift">Source pixel shift in y-direction.</param>
/// <param name="eInterpolation">The type of eInterpolation to perform resampling.</param>
public static void ResizeSqrPixel(NPPImage_32fC1 src0, NPPImage_32fC1 src1, NPPImage_32fC1 src2, NPPImage_32fC1 dest0, NPPImage_32fC1 dest1, NPPImage_32fC1 dest2, double nXFactor, double nYFactor, double nXShift, double nYShift, InterpolationMode eInterpolation)
{
CUdeviceptr[] src = new CUdeviceptr[] { src0.DevicePointer, src1.DevicePointer, src2.DevicePointer };
CUdeviceptr[] dst = new CUdeviceptr[] { dest0.DevicePointer, dest1.DevicePointer, dest2.DevicePointer };
NppiRect srcRect = new NppiRect(src0.PointRoi, src0.SizeRoi);
NppiRect dstRect = new NppiRect(dest0.PointRoi, dest0.SizeRoi);
NppStatus status = NPPNativeMethods.NPPi.ResizeSqrPixel.nppiResizeSqrPixel_32f_P3R(src, src0.SizeRoi, src0.Pitch, srcRect, dst, dest0.Pitch, dstRect, nXFactor, nYFactor, nXShift, nYShift, eInterpolation);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiResizeSqrPixel_32f_P3R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:24,代码来源:NPPImage_32fC3.cs
示例9: WarpPerspectiveQuad
/// <summary>
/// Perspective transform of an image.<para/>
/// 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.<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="src0">Source image (Channel 0)</param>
/// <param name="src1">Source image (Channel 1)</param>
/// <param name="src2">Source image (Channel 2)</param>
/// <param name="srcQuad">Source quadrangle [4,2]</param>
/// <param name="dest0">Destination image (Channel 0)</param>
/// <param name="dest1">Destination image (Channel 1)</param>
/// <param name="dest2">Destination image (Channel 2)</param>
/// <param name="destQuad">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>
public static void WarpPerspectiveQuad(NPPImage_32fC1 src0, NPPImage_32fC1 src1, NPPImage_32fC1 src2, double[,] srcQuad, NPPImage_32fC1 dest0, NPPImage_32fC1 dest1, NPPImage_32fC1 dest2, double[,] destQuad, InterpolationMode eInterpolation)
{
NppiRect rectIn = new NppiRect(src0.PointRoi, src0.SizeRoi);
NppiRect rectOut = new NppiRect(dest0.PointRoi, dest0.SizeRoi);
CUdeviceptr[] src = new CUdeviceptr[] { src0.DevicePointer, src1.DevicePointer, src2.DevicePointer };
CUdeviceptr[] dst = new CUdeviceptr[] { dest0.DevicePointer, dest1.DevicePointer, dest2.DevicePointer };
NppStatus status = NPPNativeMethods.NPPi.PerspectiveTransforms.nppiWarpPerspectiveQuad_32f_P3R(src, src0.Size, src0.Pitch, rectIn, srcQuad, dst, dest0.Pitch, rectOut, destQuad, eInterpolation);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiWarpPerspectiveQuad_32f_P3R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:49,代码来源:NPPImage_32fC3.cs
示例10: GradientColorToGray
/// <summary>
/// 3 channel 32-bit floating point packed RGB to 1 channel 32-bit floating point packed Gray Gradient conversion.
/// </summary>
/// <param name="dest">Destination image</param>
/// <param name="eNorm">Gradient distance method to use.</param>
public void GradientColorToGray(NPPImage_32fC1 dest, NppiNorm eNorm)
{
NppStatus status = NPPNativeMethods.NPPi.GradientColorToGray.nppiGradientColorToGray_32f_C3C1R(DevicePointerRoi, Pitch, dest.DevicePointerRoi, dest.Pitch, SizeRoi, eNorm);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiGradientColorToGray_32f_C3C1R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_32fC3.cs
示例11: Resize
/// <summary>
/// resizes planar images.
/// </summary>
/// <param name="src0">Source image (Channel 0)</param>
/// <param name="src1">Source image (Channel 1)</param>
/// <param name="src2">Source image (Channel 2)</param>
/// <param name="dest0">Destination image (Channel 0)</param>
/// <param name="dest1">Destination image (Channel 1)</param>
/// <param name="dest2">Destination image (Channel 2)</param>
/// <param name="xFactor">X scaling factor</param>
/// <param name="yFactor">Y scaling factor</param>
/// <param name="eInterpolation">Interpolation mode</param>
public static void Resize(NPPImage_32fC1 src0, NPPImage_32fC1 src1, NPPImage_32fC1 src2, NPPImage_32fC1 dest0, NPPImage_32fC1 dest1, NPPImage_32fC1 dest2, double xFactor, double yFactor, InterpolationMode eInterpolation)
{
CUdeviceptr[] src = new CUdeviceptr[] { src0.DevicePointer, src1.DevicePointer, src2.DevicePointer };
CUdeviceptr[] dst = new CUdeviceptr[] { dest0.DevicePointerRoi, dest1.DevicePointerRoi, dest2.DevicePointerRoi };
NppStatus status = NPPNativeMethods.NPPi.GeometricTransforms.nppiResize_32f_P3R(src, src0.Size, src0.Pitch, new NppiRect(src0.PointRoi, src0.SizeRoi), dst, dest0.Pitch, dest0.SizeRoi, xFactor, yFactor, eInterpolation);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiResize_32f_P3R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:20,代码来源:NPPImage_32fC3.cs
示例12: Copy
/// <summary>
/// Three-channel 8-bit unsigned planar to packed image copy.
/// </summary>
/// <param name="src0">Source image channel 0</param>
/// <param name="src1">Source image channel 1</param>
/// <param name="src2">Source image channel 2</param>
/// <param name="dest">Destination image</param>
public static void Copy(NPPImage_32fC1 src0, NPPImage_32fC1 src1, NPPImage_32fC1 src2, NPPImage_32fC3 dest)
{
CUdeviceptr[] array = new CUdeviceptr[] { src0.DevicePointerRoi, src1.DevicePointerRoi, src2.DevicePointerRoi };
NppStatus status = NPPNativeMethods.NPPi.MemCopy.nppiCopy_32f_P3C3R(array, src0.Pitch, dest.DevicePointerRoi, dest.Pitch, dest.SizeRoi);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiCopy_32f_P3C3R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:14,代码来源:NPPImage_32fC3.cs
示例13: ColorTwist
/// <summary>
/// 3 channel planar 8-bit unsigned inplace color twist.
/// An input color twist matrix with floating-point pixel values is applied
/// within ROI.
/// </summary>
/// <param name="srcDest0">Source / Destination image (Channel 0)</param>
/// <param name="srcDest1">Source / Destinationimage (Channel 1)</param>
/// <param name="srcDest2">Source / Destinationimage (Channel 2)</param>
/// <param name="twistMatrix">The color twist matrix with floating-point pixel values [3,4].</param>
public static void ColorTwist(NPPImage_32fC1 srcDest0, NPPImage_32fC1 srcDest1, NPPImage_32fC1 srcDest2, float[,] twistMatrix)
{
CUdeviceptr[] src = new CUdeviceptr[] { srcDest0.DevicePointerRoi, srcDest1.DevicePointerRoi, srcDest2.DevicePointerRoi };
NppStatus status = NPPNativeMethods.NPPi.ColorTwist.nppiColorTwist_32f_IP3R(src, srcDest0.Pitch, srcDest0.SizeRoi, twistMatrix);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiColorTwist32f_32f_IP3R", status));
NPPException.CheckNppStatus(status, null);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:17,代码来源:NPPImage_32fC3.cs
示例14: WarpAffineQuad
/// <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>
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);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:39,代码来源:NPPImage_32fC1.cs
示例15: Integral
/// <summary>
/// One-channel 8-bit unsigned image SqrIntegral.
/// Destination integral image is 32-bit floating point.
/// Destination square integral image is 64-bit double floating point.
/// </summary>
/// <param name="dst">Destination-Image</param>
/// <param name="sqr">Destination-Image</param>
/// <param name="nVal">The value to add to pDst image pixels</param>
/// <param name="nValSqr">The value to add to pSqr image pixels</param>
public void Integral(NPPImage_32fC1 dst, CudaPitchedDeviceVariable<double> sqr, float nVal, double nValSqr)
{
status = NPPNativeMethods.NPPi.Integral.nppiSqrIntegral_8u32f64f_C1R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, sqr.DevicePointer, sqr.Pitch, _sizeRoi, nVal, nValSqr);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiSqrIntegral_8u32f64f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_8uC1.cs
示例16: ColorToGray
/// <summary>
/// Color to Gray conversion
/// </summary>
/// <param name="dest">Destination image</param>
/// <param name="aCoeffs">fixed size array of constant floating point conversion coefficient values, one per color channel.</param>
public void ColorToGray(NPPImage_32fC1 dest, float[] aCoeffs)
{
status = NPPNativeMethods.NPPi.ColorToGray.nppiColorToGray_32f_C3C1R(_devPtrRoi, _pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, aCoeffs);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiColorToGray_32f_C3C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_32fC3.cs
示例17: Scale
/// <summary>
/// image conversion.
/// </summary>
/// <param name="dst">Destination-Image</param>
/// <param name="nMin">specifies the minimum saturation value to which every output value will be clamped.</param>
/// <param name="nMax">specifies the maximum saturation value to which every output value will be clamped.</param>
public void Scale(NPPImage_32fC1 dst, float nMin, float nMax)
{
NppiRect srcRect = new NppiRect(_pointRoi, _sizeRoi);
status = NPPNativeMethods.NPPi.Scale.nppiScale_8u32f_C1R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, nMin, nMax);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiScale_8u32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:13,代码来源:NPPImage_8uC1.cs
示例18: Compare
/// <summary>
/// Compare pSrc1's pixels with corresponding pixels in pSrc2.
/// </summary>
/// <param name="src2">2nd source image</param>
/// <param name="dest">Destination image</param>
/// <param name="eComparisonOperation">Specifies the comparison operation to be used in the pixel comparison.</param>
public void Compare(NPPImage_32fC1 src2, NPPImage_8uC1 dest, NppCmpOp eComparisonOperation)
{
status = NPPNativeMethods.NPPi.Compare.nppiCompare_32f_C1R(_devPtrRoi, _pitch, src2.DevicePointerRoi, src2.Pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, eComparisonOperation);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiCompare_32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:12,代码来源:NPPImage_32fC3.cs
示例19: AddWeighted
/// <summary>
/// One 8-bit unsigned char channel alpha weighted image added to in place floating point destination image using filter mask (updates destination when mask is non-zero).
/// </summary>
/// <param name="dest">Destination image</param>
/// <param name="mask">Mask image</param>
/// <param name="nAlpha">Alpha weight to be applied to source image pixels (0.0F to 1.0F)</param>
public void AddWeighted(NPPImage_32fC1 dest, NPPImage_8uC1 mask, float nAlpha)
{
status = NPPNativeMethods.NPPi.AddWeighted.nppiAddWeighted_16u32f_C1IMR(_devPtrRoi, _pitch, mask.DevicePointerRoi, mask.Pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nAlpha);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiAddWeighted_16u32f_C1IMR", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:12,代码来源:NPPImage_16uC1.cs
示例20: CrossCorrSame_NormLevel
/// <summary>
/// CrossCorrSame_NormLevel.
/// </summary>
/// <param name="tpl">template image.</param>
/// <param name="dst">Destination image</param>
/// <param name="buffer">Allocated device memory with size of at <see cref="SameNormLevelGetBufferHostSize()"/></param>
public void CrossCorrSame_NormLevel(NPPImage_16uC1 tpl, NPPImage_32fC1 dst, CudaDeviceVariable<byte> buffer)
{
int bufferSize = SameNormLevelGetBufferHostSize();
if (bufferSize > buffer.Size) throw new NPPException("Provided buffer is too small.");
status = NPPNativeMethods.NPPi.ImageProximity.nppiCrossCorrSame_NormLevel_16u32f_C1R(_devPtrRoi, _pitch, _sizeRoi, tpl.DevicePointerRoi, tpl.Pitch, tpl.SizeRoi, dst.DevicePointer, dst.Pitch, buffer.DevicePointer);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiCrossCorrSame_NormLevel_16u32f_C1R", status));
NPPException.CheckNppStatus(status, this);
}
开发者ID:kunzmi,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_16uC1.cs
注:本文中的ManagedCuda.NPP.NPPImage_32fC1类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论