/// <summary>
        /// Converts std::vector to managed array
        /// </summary>
        /// <returns></returns>
        public DMatch[][] ToArray()
        {
            int size1 = Size1;

            if (size1 == 0)
            {
                return(new DMatch[0][]);
            }
            long[] size2 = Size2;

            DMatch[][] ret = new DMatch[size1][];
            for (int i = 0; i < size1; i++)
            {
                ret[i] = new DMatch[size2[i]];
            }
            using (ArrayAddress2 <DMatch> retPtr = new ArrayAddress2 <DMatch>(ret))
            {
                NativeMethods.vector_vector_KeyPoint_copy(ptr, retPtr);
            }
            return(ret);
        }
 public static extern void features2d_drawMatches1(IntPtr img1, KeyPoint[] keypoints1, int keypoints1Length,
     IntPtr img2, KeyPoint[] keypoints2, int keypoints2Length,
     DMatch[] matches1to2, int matches1to2Length, IntPtr outImg,
     CvScalar matchColor, CvScalar singlePointColor,
     byte[] matchesMask, int matchesMaskLength, int flags);