Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if it's actually a bidimensional Array, you could even try to make a Mat from that:

Mat m1 = Mat::ones(3,3,CV32F); // placeholder for your mat there

float bd_arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
Mat m2(3,3,CV_32F,bd_arr); 
Mat m3 = m1 * m2;

note, that this won't work with an array of pointers, a dynamically allocated 2d array like this:

float **bad = new float*[3];
bad[0] = new float[3];
bad[1] = new float[3];
bad[2] = new float[3];

(totally different memory layout)