Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2017-04-18 01:22:24 -0500

Nbb gravatar image

Passing multi dimensional array to opencv Mat

What is the correct way to pass a multi dimensional array into an opencv 3d mat vs a 3 channel matrix ? Is the following code below correct ?

int size[3] = {100, 100, 100};
cv::Mat a = cv::Mat(3, size, CV_64FC1, arr->data);
cv::Mat b = cv::Mat(cv::Size(image.cols, image.rows), CV_64FC(100), arr->data);