I am working with EmguCV and I don’t know how I can pass array of 2xN, Nx2, 3xN, Nx3 or 1xN (N is number of points) for image points like documented here.
I have a method to create an array of float[N,2] but Marshal.Copy has no overloads for multidimensional arrays and I have no idea how I can pass X and Y values as one.
You simply call the
cvCreateMatfunction to create these matrices. The documentation of the native interface contains good examples that show how to do this.In order to set the data you can use
cvSet2D. It’s not as efficient as direct pointer access, but that’s rather harder to achieve from managed code.