/// <summary> /// CvSparseMatデータから初期化 /// </summary> /// <param name="m">CvSparseMat 行列構造体へのポインタ.</param> #else /// <summary> /// converts old-style CvSparseMat to the new matrix; the data is not copied by default /// </summary> /// <param name="m">Old style CvSparseMat object</param> #endif public SparseMat(CvSparseMat m) { if (m == null) { throw new ArgumentNullException(nameof(m)); } m.ThrowIfDisposed(); ptr = NativeMethods.core_SparseMat_new4(m.CvPtr); if (ptr == IntPtr.Zero) { throw new OpenCvSharpException(); } }
/// <summary> /// CvSparseMatデータから初期化 /// </summary> /// <param name="m">CvSparseMat 行列構造体へのポインタ.</param> #else /// <summary> /// converts old-style CvSparseMat to the new matrix; the data is not copied by default /// </summary> /// <param name="m">Old style CvSparseMat object</param> #endif public SparseMat(CvSparseMat m) { if (m == null) { throw new ArgumentNullException("m"); } m.ThrowIfDisposed(); ptr = NativeMethods.core_SparseMat_new4(m.CvPtr); if (ptr == IntPtr.Zero) { throw new OpenCvSharpException(); } NotifyMemoryPressure(SizeOf); }
/// <summary> /// /// </summary> /// <param name="mat"></param> /// <returns></returns> public static SparseMat FromCvSparseMat(CvSparseMat mat) { return(new SparseMat(mat)); }