示例#1
0
 /// <summary>
 /// Get the item in the specific index
 /// </summary>
 /// <param name="index">The index</param>
 /// <returns>The item in the specific index</returns>
 public MCvERStat this[int index]
 {
     get
     {
         MCvERStat result = new MCvERStat();
         VectorOfERStatGetItem(_ptr, index, ref result);
         return(result);
     }
 }
示例#2
0
 /// <summary>
 /// Convert the standard vector to an array of ERStat
 /// </summary>
 /// <returns>An array of ERStat</returns>
 public MCvERStat[] ToArray()
 {
     MCvERStat[] res = new MCvERStat[Size];
     if (res.Length > 0)
     {
         GCHandle handle = GCHandle.Alloc(res, GCHandleType.Pinned);
         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 (VectorOfERStat v = this[i])
                {
                    res[i] = v.ToArray();
                }
            }
            return(res);
        }
示例#4
0
 internal static extern void VectorOfERStatGetItem(IntPtr vec, int index, ref MCvERStat element);