OpenCV's DMatch structure
Exemple #1
0
 /// <summary>
 /// Push an array of value into the standard vector
 /// </summary>
 /// <param name="value">The value to be pushed to the vector</param>
 public void Push(MDMatch[] value)
 {
    if (value.Length > 0)
    {
       GCHandle handle = GCHandle.Alloc(value, GCHandleType.Pinned);
       CvInvoke.VectorOfDMatchPushMulti(_ptr, handle.AddrOfPinnedObject(), value.Length);
       handle.Free();
    }
 }
Exemple #2
0
 /// <summary>
 /// Convert the standard vector to an array of DMatch
 /// </summary>
 /// <returns>An array of DMatch</returns>
 public MDMatch[] ToArray()
 {
    MDMatch[] res = new MDMatch[Size];
    if (res.Length > 0)
    {
       GCHandle handle = GCHandle.Alloc(res, GCHandleType.Pinned);
       CvInvoke.VectorOfDMatchCopyData(_ptr, handle.AddrOfPinnedObject());
       handle.Free();
    }
    return res;
 }