int arr[4] = {64, 8, 21, 3};
Mat kp(4, arr, CV_32FC1, Scalar::all(0));
cout << r.size() << endl;
for (int b = 0; b < r.size(); b++)
{
for (int c = 0; c < r[b].size(); c++)
{
for (int h = 0; h < r[b][c].size(); h++)
{
for (int w = 0; w < r[b][c][h].size(); w++)
{
kp.ptr<float>(b, c, h)[w] = r[b][c][h][w].asFloat();
}
}
}
}
1条答案
按热度按时间ct3nt3jp1#
似乎没有什么特别的功能。只是构造了这个Mat: