Example #1
0
        // vector_vector_Point3f
        public static void Mat_to_vector_vector_Point3f(Mat m, List <MatOfPoint3f> pts)
        {
            if (m != null)
            {
                m.ThrowIfDisposed();
            }

            if (pts == null)
            {
                throw new CvException("Output List can't be null");
            }

            if (m == null)
            {
                throw new CvException("Input Mat can't be null");
            }

            List <Mat> mats = new List <Mat> (m.rows());

            Mat_to_vector_Mat(m, mats);
            foreach (Mat mi in mats)
            {
                MatOfPoint3f pt = new MatOfPoint3f(mi);
                pts.Add(pt);
                mi.release();
            }
            mats.Clear();
        }
Example #2
0
        //
        // C++: vector_Point3f CharucoBoard::chessboardCorners
        //

        //javadoc: CharucoBoard::get_chessboardCorners()
        public MatOfPoint3f get_chessboardCorners()
        {
            ThrowIfDisposed();
#if UNITY_PRO_LICENSE || ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
            MatOfPoint3f retVal = MatOfPoint3f.fromNativeAddr(aruco_CharucoBoard_get_1chessboardCorners_10(nativeObj));

            return(retVal);
#else
            return(null);
#endif
        }
Example #3
0
        //
        // C++:  void projectPoints(vector_Point3f objectPoints, vector_Point2f& imagePoints, Mat rvec, Mat tvec, Mat K, double xi, Mat D, Mat& jacobian = Mat())
        //

        //javadoc: projectPoints(objectPoints, imagePoints, rvec, tvec, K, xi, D, jacobian)
        public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, double xi, Mat D, Mat jacobian)
        {
            if (objectPoints != null)
            {
                objectPoints.ThrowIfDisposed();
            }
            if (imagePoints != null)
            {
                imagePoints.ThrowIfDisposed();
            }
            if (rvec != null)
            {
                rvec.ThrowIfDisposed();
            }
            if (tvec != null)
            {
                tvec.ThrowIfDisposed();
            }
            if (K != null)
            {
                K.ThrowIfDisposed();
            }
            if (D != null)
            {
                D.ThrowIfDisposed();
            }
            if (jacobian != null)
            {
                jacobian.ThrowIfDisposed();
            }

#if UNITY_PRO_LICENSE || ((UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR) || UNITY_5
            Mat objectPoints_mat = objectPoints;
            Mat imagePoints_mat  = imagePoints;
            ccalib_Ccalib_projectPoints_10(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, xi, D.nativeObj, jacobian.nativeObj);

            return;
#else
            return;
#endif
        }