/// <summary> /// Convert the standard vector to an array of ERStat /// </summary> /// <returns>An array of Byte</returns> public MCvERStat[] ToArray() { MCvERStat[] res = new MCvERStat[Size]; if (res.Length > 0) { GCHandle handle = GCHandle.Alloc(res, GCHandleType.Pinned); CvInvoke.VectorOfERStatCopyData(_ptr, handle.AddrOfPinnedObject()); handle.Free(); } return(res); }
/// <summary> /// Convert the standard vector to arrays of int /// </summary> /// <returns>Arrays of int</returns> public MCvERStat[][] ToArrayOfArray() { int size = Size; MCvERStat[][] res = new MCvERStat[size][]; for (int i = 0; i < size; i++) { using (UMat v = this[i]) { res[i] = v.ToArray(); } } return(res); }