Ejemplo n.º 1
0
        /// <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();
            }
        }
Ejemplo n.º 2
0
        /// <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);
        }