I know this "looks" like a duplicate question, but -- it's not answered in any definitive way that I can see. In C++, OpenCv operation to init a Mat can be done like so:
float[,] camera = new float[,] {
{ 857.483f, 0.0f, 968.06f },
{ 0.0f, 876.72f, 556.37f },
{ 0.0f, 0.0f, 1.0f }
};
A = Mat(3,3, CV_32FC1, &camera);
Note that the array is 2D. Now, I want to accomplish the same thing in EMGU, //using managed C#; so Mat is constructed as:
Mat _cameraMatrix = new Mat(3, 3, DepthType.Cv64F, 1);
// and a similar 1D Mat:
Mat _distCoeffs = new Mat(8, 1, DepthType.Cv64F, 1);
// to be passed to the method:
CvInvoke.Undistort(bkgimage, ndimage, _cameraMatrix, _distCoeffs);
Unlike cv::Mat, EMGU Mat's constructor doesn't seem to have an obvious way to get that 2D "camera" data into it. Anyone have any success getting this kind of code to work?