EMGU CV 中的相机矩阵初始化

Camera matrix initialization in EMGU CV

我正在尝试在我的程序中使用方法 findEssentialMat。我有两个图像,两个特征数组和焦点。但是这个方法需要相机矩阵(类型:IInputArray)作为一个属性。所以问题是如何在没有相机标定的情况下手动初始化相机矩阵?

此代码无效,因为 double[] 是表示 cameraMatrix 的错误类型。

        double[,] camMat = {
            { focal, 0,  imgInput1.Size.Width / 2 },
            { 0,    focal,   imgInput1.Size.Height / 2 }, 
            { 0, 0, 1 }
        };

        VectorOfPointF vpfpoints1 = new VectorOfPointF(mKPstoPF(foundedFeatures1));
        VectorOfPointF vpfpoints2 = new VectorOfPointF(currFeat);

        CvInvoke.FindEssentialMat(points1: vpfpoints1,
                                  points2: vpfpoints2,
                                  cameraMatrix: camMat,
                                  method: Emgu.CV.CvEnum.FmType.Ransac,
                                  prob: 0.999,
                                  threshold: 1,
                                  mask: null);

我用这种方式定义相机矩阵:

    Matrix<double> matr = new Matrix<double>(3, 3);
        matr[0, 0] = focal;
        matr[0, 1] = 0;
        matr[0, 2] = imgInput1.Size.Width / 2;
        matr[1, 0] = 0;
        matr[1, 1] = focal;
        matr[1, 2] = imgInput1.Size.Width / 2;
        matr[2, 0] = 0;
        matr[2, 1] = 0;
        matr[2, 2] = 1;