I want to create a vector of matrices which each cell of a matrix is a 2 element vector. I tried to use this code but it gets stuck on assignment.
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;
Any ideas why??? Thanks