当前位置: 首页>>代码示例>>C#>>正文


C# NPP.NPPImage_32fC3类代码示例

本文整理汇总了C#中ManagedCuda.NPP.NPPImage_32fC3的典型用法代码示例。如果您正苦于以下问题:C# NPPImage_32fC3类的具体用法?C# NPPImage_32fC3怎么用?C# NPPImage_32fC3使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NPPImage_32fC3类属于ManagedCuda.NPP命名空间,在下文中一共展示了NPPImage_32fC3类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NormDiff_L1

        /// <summary>
        /// image NormDiff_L1. Buffer is internally allocated and freed.
        /// </summary>
        /// <param name="tpl">template image.</param>
        /// <param name="pNormDiff">Pointer to the computed L1-norm of differences. (3 * sizeof(double))</param>
        public void NormDiff_L1(NPPImage_32fC3 tpl, CudaDeviceVariable<double> pNormDiff)
        {
            int bufferSize = NormDiffL1GetBufferHostSize();
            CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);

            status = NPPNativeMethods.NPPi.NormDiff.nppiNormDiff_L1_32f_C3R(_devPtrRoi, _pitch, tpl.DevicePointerRoi, tpl.Pitch, _sizeRoi, pNormDiff.DevicePointer, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiNormDiff_L1_32f_C3R", status));
            buffer.Dispose();
            NPPException.CheckNppStatus(status, this);
        }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_32fC3.cs

示例2: 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_16uC3 tpl, NPPImage_32fC3 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_C3R(_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_C3R", status));
			NPPException.CheckNppStatus(status, this);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_16uC3.cs

示例3: CrossCorrValid_Norm

		/// <summary>
		/// image CrossCorrValid_Norm.
		/// </summary>
		/// <param name="tpl">template image.</param>
		/// <param name="dst">Destination-Image</param>
		public void CrossCorrValid_Norm(NPPImage_16uC3 tpl, NPPImage_32fC3 dst)
		{
			status = NPPNativeMethods.NPPi.ImageProximity.nppiCrossCorrValid_Norm_16u32f_C3R(_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_C3R", status));
			NPPException.CheckNppStatus(status, this);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_16uC3.cs

示例4: Copy

 /// <summary>
 /// Copy image and pad borders with a constant, user-specifiable color.
 /// </summary>
 /// <param name="dst">Destination image. The image ROI defines the destination region, i.e. the region that gets filled with data from
 /// the source image (inner part) and constant border color (outer part).</param>
 /// <param name="nTopBorderHeight">Height (in pixels) of the top border. The height of the border at the bottom of
 /// the destination ROI is implicitly defined by the size of the source ROI: nBottomBorderHeight =
 /// oDstSizeROI.height - nTopBorderHeight - oSrcSizeROI.height.</param>
 /// <param name="nLeftBorderWidth">Width (in pixels) of the left border. The width of the border at the right side of
 /// the destination ROI is implicitly defined by the size of the source ROI: nRightBorderWidth =
 /// oDstSizeROI.width - nLeftBorderWidth - oSrcSizeROI.width.</param>
 /// <param name="nValue">The pixel value to be set for border pixels.</param>
 public void Copy(NPPImage_32fC3 dst, int nTopBorderHeight, int nLeftBorderWidth, float[] nValue)
 {
     status = NPPNativeMethods.NPPi.CopyConstBorder.nppiCopyConstBorder_32f_C3R(_devPtrRoi, _pitch, _sizeRoi, dst.DevicePointerRoi, dst.Pitch, dst.SizeRoi, nTopBorderHeight, nLeftBorderWidth, nValue);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiCopyConstBorder_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:18,代码来源:NPPImage_32fC3.cs

示例5: SumWindowColumn

		//New in Cuda 6.0

		#region SumWindow
		/// <summary>
		/// 16-bit signed 1D (column) sum to 32f.
		/// Apply Column Window Summation filter over a 1D mask region around each
		/// source pixel for 3-channel 16 bit/pixel input images with 32-bit floating point
		/// output.  <para/>
		/// Result 32-bit floating point pixel is equal to the sum of the corresponding and
		/// neighboring column pixel values in a mask region of the source image defined by
		/// nMaskSize and nAnchor. 
		/// </summary>
		/// <param name="dest">Destination image</param>
		/// <param name="nMaskSize">Length of the linear kernel array.</param>
		/// <param name="nAnchor">Y offset of the kernel origin frame of reference w.r.t the source pixel.</param>
		public void SumWindowColumn(NPPImage_32fC3 dest, int nMaskSize, int nAnchor)
		{
			status = NPPNativeMethods.NPPi.WindowSum1D.nppiSumWindowColumn_16s32f_C3R(_devPtrRoi, _pitch, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nMaskSize, nAnchor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiSumWindowColumn_16s32f_C3R", status));
			NPPException.CheckNppStatus(status, this);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:21,代码来源:NPPImage_16sC3.cs

示例6: ColorTwist

 /// <summary>
 /// An input color twist matrix with floating-point pixel values is applied
 /// within ROI.
 /// </summary>
 /// <param name="dest">Destination image</param>
 /// <param name="twistMatrix">The color twist matrix with floating-point pixel values [3,4].</param>
 public void ColorTwist(NPPImage_32fC3 dest, float[,] twistMatrix)
 {
     status = NPPNativeMethods.NPPi.ColorTwist.nppiColorTwist_32f_C3R(_devPtr, _pitch, dest.DevicePointer, dest.Pitch, _sizeRoi, twistMatrix);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiColorTwist_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:12,代码来源:NPPImage_32fC3.cs

示例7: ResizeSqrPixel

 /// <summary>
 /// image resize.
 /// </summary>
 /// <param name="dst">Destination-Image</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 void ResizeSqrPixel(NPPImage_32fC3 dst, double nXFactor, double nYFactor, double nXShift, double nYShift, InterpolationMode eInterpolation)
 {
     NppiRect srcRect = new NppiRect(_pointRoi, _sizeRoi);
     NppiRect dstRect = new NppiRect(dst.PointRoi, dst.SizeRoi);
     status = NPPNativeMethods.NPPi.ResizeSqrPixel.nppiResizeSqrPixel_32f_C3R(_devPtr, _sizeRoi, _pitch, srcRect, dst.DevicePointer, dst.Pitch, dstRect, nXFactor, nYFactor, nXShift, nYShift, eInterpolation);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiResizeSqrPixel_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:17,代码来源:NPPImage_32fC3.cs

示例8: Rotate

 /// <summary>
 /// Rotate images.
 /// </summary>
 /// <param name="dest">Destination image</param>
 /// <param name="nAngle">The angle of rotation in degrees.</param>
 /// <param name="nShiftX">Shift along horizontal axis</param>
 /// <param name="nShiftY">Shift along vertical axis</param>
 /// <param name="eInterpolation">Interpolation mode</param>
 public void Rotate(NPPImage_32fC3 dest, double nAngle, double nShiftX, double nShiftY, InterpolationMode eInterpolation)
 {
     status = NPPNativeMethods.NPPi.GeometricTransforms.nppiRotate_32f_C3R(_devPtr, _sizeRoi, _pitch, new NppiRect(_pointRoi, _sizeRoi),
         dest.DevicePointer, dest.Pitch, new NppiRect(dest.PointRoi, dest.SizeRoi), nAngle, nShiftX, nShiftY, eInterpolation);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiRotate_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_32fC3.cs

示例9: Remap

 /// <summary>
 /// image remap.
 /// </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 Remap(NPPImage_32fC3 dst, NPPImage_32fC1 pXMap, NPPImage_32fC1 pYMap, InterpolationMode eInterpolation)
 {
     NppiRect srcRect = new NppiRect(_pointRoi, _sizeRoi);
     status = NPPNativeMethods.NPPi.Remap.nppiRemap_32f_C3R(_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_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:14,代码来源:NPPImage_32fC3.cs

示例10: Resize

 /// <summary>
 /// Resizes images.
 /// </summary>
 /// <param name="dest">Destination image</param>
 /// <param name="xFactor">X scaling factor</param>
 /// <param name="yFactor">Y scaling factor</param>
 /// <param name="eInterpolation">Interpolation mode</param>
 public void Resize(NPPImage_32fC3 dest, double xFactor, double yFactor, InterpolationMode eInterpolation)
 {
     status = NPPNativeMethods.NPPi.GeometricTransforms.nppiResize_32f_C3R(_devPtr, _sizeOriginal, _pitch, new NppiRect(_pointRoi, _sizeRoi), dest.DevicePointerRoi, dest.Pitch, dest.SizeRoi, xFactor, yFactor, eInterpolation);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiResize_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:13,代码来源:NPPImage_32fC3.cs

示例11: QualityIndex

        /// <summary>
        /// image QualityIndex.
        /// </summary>
        /// <param name="src2">2nd source image</param>
        /// <param name="dst">Pointer to the quality index. (3 * sizeof(float))</param>
        public void QualityIndex(NPPImage_32fC3 src2, CudaDeviceVariable<float> dst)
        {
            int bufferSize = QualityIndexGetBufferHostSize();
            CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);

            status = NPPNativeMethods.NPPi.QualityIndex.nppiQualityIndex_32f_C3R(_devPtrRoi, _pitch, src2.DevicePointerRoi, src2.Pitch, _sizeRoi, dst.DevicePointer, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiQualityIndex_32f_C3R", status));
            buffer.Dispose();
            NPPException.CheckNppStatus(status, this);
        }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_32fC3.cs

示例12: NormRel_L2

        /// <summary>
        /// image NormRel_L2. Buffer is internally allocated and freed.
        /// </summary>
        /// <param name="tpl">template image.</param>
        /// <param name="pNormRel">Pointer to the computed relative error for the infinity norm of two images. (1 * sizeof(double))</param>
        /// <param name="nCOI">channel of interest.</param>
        /// <param name="pMask">Mask image.</param>
        public void NormRel_L2(NPPImage_32fC3 tpl, CudaDeviceVariable<double> pNormRel, int nCOI, NPPImage_8uC1 pMask)
        {
            int bufferSize = NormRelL2MaskedGetBufferHostSize();
            CudaDeviceVariable<byte> buffer = new CudaDeviceVariable<byte>(bufferSize);

            status = NPPNativeMethods.NPPi.NormRel.nppiNormRel_L2_32f_C3CMR(_devPtrRoi, _pitch, tpl.DevicePointerRoi, tpl.Pitch, pMask.DevicePointerRoi, pMask.Pitch, _sizeRoi, nCOI, pNormRel.DevicePointer, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiNormRel_L2_32f_C3CMR", status));
            buffer.Dispose();
            NPPException.CheckNppStatus(status, this);
        }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:17,代码来源:NPPImage_32fC3.cs

示例13: Add

 /// <summary>
 /// Add constant to image.
 /// </summary>
 /// <param name="nConstant">Values to add</param>
 /// <param name="dest">Destination image</param>
 public void Add(float[] nConstant, NPPImage_32fC3 dest)
 {
     status = NPPNativeMethods.NPPi.AddConst.nppiAddC_32f_C3R(_devPtrRoi, _pitch, nConstant, dest.DevicePointerRoi, dest.Pitch, _sizeRoi);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiAddC_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:11,代码来源:NPPImage_32fC3.cs

示例14: SobelHoriz

 /// <summary>
 /// horizontal Sobel filter.
 /// </summary>
 /// <param name="dst">Destination-Image</param>
 public void SobelHoriz(NPPImage_32fC3 dst)
 {
     status = NPPNativeMethods.NPPi.FixedFilters.nppiFilterSobelHoriz_32f_C3R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiFilterSobelHoriz_32f_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:10,代码来源:NPPImage_32fC3.cs

示例15: AverageRelativeError

        /// <summary>
        /// image average relative error.
        /// </summary>
        /// <param name="src2">2nd source image</param>
        /// <param name="pError">Pointer to the computed error.</param>
        /// <param name="buffer">Pointer to the user-allocated scratch buffer required for the AverageRelativeError operation.</param>
        public void AverageRelativeError(NPPImage_32fC3 src2, CudaDeviceVariable<double> pError, CudaDeviceVariable<byte> buffer)
        {
            int bufferSize = AverageRelativeErrorGetBufferHostSize();
            if (bufferSize > buffer.Size) throw new NPPException("Provided buffer is too small.");

            status = NPPNativeMethods.NPPi.AverageRelativeError.nppiAverageRelativeError_32f_C3R(_devPtrRoi, _pitch, src2.DevicePointerRoi, src2.Pitch, _sizeRoi, pError.DevicePointer, buffer.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiAverageRelativeError_32f_C3R", status));
            NPPException.CheckNppStatus(status, this);
        }
开发者ID:kunzmi,项目名称:managedCuda,代码行数:15,代码来源:NPPImage_32fC3.cs


注:本文中的ManagedCuda.NPP.NPPImage_32fC3类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。