How to convert Java array to JavaCV matrix?

Is there an easy way to convert a Java array, for example, double[][]to CvMatin JavaCV?

I think in OpenCV you can tell cv::Mat Table(8, 8, CV_32FC1, table);where tableis an 8x8 array. But in JavaCv this does not work.

+5
source share
1 answer

Ok, now I figured out that JavaCv can put single arrays in a matrix. So I can convert my 2d array to a 1d array and put it in a matrix with Matrix.put(array).

+3
source

All Articles