cvGetPerspectiveTransform() приватный Метод

private cvGetPerspectiveTransform ( IntPtr src, IntPtr dst, IntPtr mapMatrix ) : IntPtr
src IntPtr
dst IntPtr
mapMatrix IntPtr
Результат IntPtr
Пример #1
0
        /// <summary>
        /// calculates matrix of perspective transform such that:
        /// (t_i x'_i,t_i y'_i,t_i)^T=map_matrix (x_i,y_i,1)^T
        /// where dst(i)=(x'_i,y'_i), src(i)=(x_i,y_i), i=0..3.
        /// </summary>
        /// <param name="src">Coordinates of 4 quadrangle vertices in the source image</param>
        /// <param name="dest">Coordinates of the 4 corresponding quadrangle vertices in the destination image</param>
        /// <returns>The 3x3 Homography matrix</returns>
        public static HomographyMatrix GetPerspectiveTransform(PointF[] src, PointF[] dest)
        {
            Debug.Assert(src.Length >= 4, "The source should contain at least 4 points");
            Debug.Assert(dest.Length >= 4, "The destination should contain at least 4 points");

            HomographyMatrix rot = new HomographyMatrix();

            CvInvoke.cvGetPerspectiveTransform(src, dest, rot);
            return(rot);
        }