public static extern NppStatus nppiDiv_Round_8u_C4RSfs(
     IntPtr pSrc1,
     int nSrc1Step,
     IntPtr pSrc2,
     int nSrc2Step,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode rndMode,
     int nScaleFactor);
Exemplo n.º 2
0
		/// <summary>
		/// In place image division, scale by 2^(-nScaleFactor), then clamp to saturated value. Unchanged Alpha.
		/// </summary>
		/// <param name="src2">2nd source image</param>
		/// <param name="rndMode">Result Rounding mode to be used</param>
		/// <param name="nScaleFactor">scaling factor</param>
		public void DivA(NPPImage_8uC4 src2, NppRoundMode rndMode, int nScaleFactor)
		{
			status = NPPNativeMethods.NPPi.DivRound.nppiDiv_Round_8u_AC4IRSfs(src2.DevicePointerRoi, src2.Pitch, _devPtrRoi, _pitch, _sizeRoi, rndMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiDiv_Round_8u_AC4IRSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
 /// <summary>
 /// 32-bit unsigned to 32-bit signed conversion.
 /// </summary>
 /// <param name="dst">Destination image</param>
 /// <param name="roundMode">Round mode</param>
 /// <param name="scaleFactor">scaling factor</param>
 public void Convert(NPPImage_32sC1 dst, NppRoundMode roundMode, int scaleFactor)
 {
     status = NPPNativeMethods.NPPi.BitDepthConversion.nppiConvert_32u32s_C1RSfs(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, roundMode, scaleFactor);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiConvert_32u32s_C1RSfs", status));
     NPPException.CheckNppStatus(status, this);
 }
 public static extern NppStatus nppiDiv_Round_8u_C3IRSfs(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pSrcDst,
     int nSrcDstStep,
     NppiSize oSizeROI,
     NppRoundMode rndMode,
     int nScaleFactor);
 public static extern NppStatus nppiConvert_32f8u_C4R(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode eRoundMode);
 public static extern NppStatus nppiConvert_32s16s_C1RSfs(
     IntPtr pSrc,
     int nSrcStep,
     IntPtr pDst,
     int nDstStep,
     NppiSize oSizeROI,
     NppRoundMode eRoundMode,
     int nScaleFactor);
Exemplo n.º 7
0
		/// <summary>
		/// 64-bit double signal to 64-bit signed long.
		/// </summary>
		public static void Convert(this CudaDeviceVariable<double> pSrc, CudaDeviceVariable<long> pDst, NppRoundMode eRoundMode, int nScaleFactor)
		{
			NppStatus status = NPPNativeMethods.NPPs.Convert.nppsConvert_64f64s_Sfs(pSrc.DevicePointer, pDst.DevicePointer, pSrc.Size, eRoundMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsConvert_64f64s_Sfs", status));
			NPPException.CheckNppStatus(status, pSrc);
		}
Exemplo n.º 8
0
		/// <summary>
		/// 32-bit unsigned to 32-bit signed conversion.
		/// </summary>
		/// <param name="dst">Destination image</param>
		/// <param name="roundMode">Round mode</param>
		/// <param name="scaleFactor">scaling factor</param>
		public void Convert(NPPImage_32sC1 dst, NppRoundMode roundMode, int scaleFactor)
		{
			status = NPPNativeMethods.NPPi.BitDepthConversion.nppiConvert_32u32s_C1RSfs(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, roundMode, scaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiConvert_32u32s_C1RSfs", status));
			NPPException.CheckNppStatus(status, this);
		}
Exemplo n.º 9
0
		/// <summary>
		/// 16-bit signed short in place signal divide signal, with scaling, rounding
		/// then clamp to saturated value.
		/// </summary>
		/// <param name="pSrc">Source signal pointer.</param>
		/// <param name="pSrcDst">In-Place Signal Pointer. signal1 divisor elements to be divided into signal2 dividend elements</param>
		/// <param name="nRndMode">various rounding modes.</param>
		/// <param name="nScaleFactor">Integer Result Scaling.</param>
		public static void Div_Round(this CudaDeviceVariable<short> pSrcDst, CudaDeviceVariable<short> pSrc, NppRoundMode nRndMode, int nScaleFactor)
		{
			NppStatus status = NPPNativeMethods.NPPs.DivRoundSignal.nppsDiv_Round_16s_ISfs(pSrc.DevicePointer, pSrcDst.DevicePointer, pSrcDst.Size, nRndMode, nScaleFactor);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppsDiv_Round_16s_ISfs", status));
			NPPException.CheckNppStatus(status, pSrcDst);
		}
 public static extern NppStatus nppsDiv_Round_8u_Sfs(
     IntPtr pSrc1,
     IntPtr pSrc2,
     IntPtr pDst,
     int nLength,
     NppRoundMode nRndMode,
     int nScaleFactor);
 public static extern NppStatus nppsDiv_Round_16u_ISfs(
     IntPtr pSrc,
     IntPtr pSrcDst,
     int nLength,
     NppRoundMode nRndMode,
     int nScaleFactor);
Exemplo n.º 12
0
 /// <summary>
 /// 32-bit floating point to 16-bit unsigned conversion.
 /// </summary>
 /// <param name="dst">Destination image</param>
 /// <param name="roundMode">Flag specifying how fractional float values are rounded to integer values.</param>
 public void Convert(NPPImage_16uC3 dst, NppRoundMode roundMode)
 {
     status = NPPNativeMethods.NPPi.BitDepthConversion.nppiConvert_32f16u_C3R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, roundMode);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiConvert_32f16u_C3R", status));
     NPPException.CheckNppStatus(status, this);
 }
Exemplo n.º 13
0
 public static extern NppStatus nppsConvert_32f16s_Sfs(
     IntPtr pSrc,
     IntPtr pDst,
     int nLength,
     NppRoundMode eRoundMode,
     int nScaleFactor);