1

行列の各セルが 2 要素ベクトルである行列のベクトルを作成したいと考えています。このコードを使用しようとしましたが、割り当てでスタックします。

typedef Vec<char, 2> Vec2u;

Mat VecMat[8];
VecMat[0].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[1].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[2].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[3].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[4].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[5].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[6].create(FrameHeight, FrameWidth, CV_8UC2);
VecMat[7].create(FrameHeight, FrameWidth, CV_8UC2);

Vec2u elem;
elem[0] = num1;
elem[1] = num2;
VecMat[2].at<Vec2u>(row,col) = elem;

なぜ何かアイデアはありますか??? ありがとう

4

0 に答える 0