internal extern static IntPtr cveUMatGetMat(IntPtr umat, CvEnum.AccessType access);
/* * /// <summary> * /// Copies the values of the <paramref name="data"/> to Mat. * /// </summary> * /// <param name="data">The data storage, must match the size of the Mat</param> * public void SetTo(Array data) * { * if (IsEmpty) * { * int dimension = data.Rank; * * DepthType dt = Mat.GetDepthTypeFromArray(data); * if (dt == DepthType.Default) * throw new Exception("The specific data type is not supported."); * * if (dimension == 1) * { * this.Create(data.GetLength(0), 1, dt, 1); * } * else if (dimension == 2) * { * this.Create(data.GetLength(0), data.GetLength(1), dt, 1); * } * else if (dimension == 3) * { * this.Create(data.GetLength(0), data.GetLength(1), dt, 1); * } * else * { * throw new Exception("The Mat has to be pre-allocated"); * } * } * * using (Mat.MatWithHandle m = Mat.PrepareArrayForCopy(Depth, Size, NumberOfChannels, data)) * m.CopyTo(this); * }*/ /// <summary> /// Return the Mat representation of the UMat /// </summary> public Mat GetMat(CvEnum.AccessType access) { return(new Mat(UMatInvoke.cveUMatGetMat(_ptr, access), true, false)); }
/// <summary> /// Convert this Mat to UMat /// </summary> /// <param name="access">Access type</param> /// <param name="usageFlags">Usage flags</param> /// <returns>The UMat</returns> public UMat GetUMat(CvEnum.AccessType access, UMat.Usage usageFlags = UMat.Usage.Default) { return(new UMat(MatInvoke.cvMatGetUMat(Ptr, access, usageFlags), true)); }
/// <summary> /// Convert this Mat to UMat /// </summary> /// <param name="access">Access type</param> /// <returns>The UMat</returns> public UMat ToUMat(CvEnum.AccessType access) { return(new UMat(MatInvoke.cvMatGetUMat(Ptr, access), true)); }
internal extern static IntPtr cvMatGetUMat(IntPtr mat, CvEnum.AccessType access, UMat.Usage usageFlags);